/* called by: entrance ctrl of the object 'track'8 \$ h! @ g% R( t
*/
- B+ b/ Z' S |' J1 p' Lis& y1 i. K$ n$ \. ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 ^& x" ^- [; ?1 c5 n
do
( ~) v; p' e" u- m3 r% n Lan := rootfolder.Internal.Tools.AOLlanguage;" _: q" p$ s9 v$ P' }' o8 M% L* _
if current = @.Destination -- else return
+ I, e7 N5 a2 J( E! W& C7 P then
* `/ O, E8 p9 L3 y @.Destination := void;
" h- |& Z8 u% W1 ^* g1 M( _ if @.occupied then' T! L, {! x: @7 u( C. b9 U" ~* `4 ]
part := @.cont;+ ?& {& s ~4 o1 L- z# i/ E, o# I
@.transpOrder := void;
# U0 }8 _. o# B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ M6 B2 Y, F' ?4 O3 _* I0 G: d; j @,root.eventcontroller.simTime);- h5 I( {+ T \
@.HasOrder := false;$ ]0 e% T- _9 \/ w
@.DrivingHome := true;7 Q2 S @) ~5 x7 [& v
rgManager.tryToStartTransOrder;! V; \0 Y5 ~8 U( K
if @.Destination = void$ ~: O. |4 ?: Q8 Z7 M5 f5 q
then -- no transport order for vehicle @: S. o: v, ~' m: L/ P
@.Destination :=: D0 p# b. Q7 q, O) x3 ~* \/ \
rgManager.nearestFreeStation(@,track.~);
1 |! ]6 g. s* D$ _! Y; Q newDirection(@); ; ^$ @: A9 V) f2 O
if @.Destination /= void then
0 P5 Y" W7 s9 P3 s7 B @.Destination.NumReservation :=1 N/ b' p( ^( B+ r+ Z
@.Destination.NumReservation + 1;$ r$ W( N: G7 f/ c; B2 Y
end;
+ O% F4 j2 L" V" t @.CurrIcon := "drivingHome";6 I4 f8 l0 }. f. k- o e# j; n
@.DrivingHome := true;
7 P7 A' X/ R& C4 D end;
3 A+ ^9 m0 X j. S0 D8 Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 J" H" H" P% F t- K2 m+ i
part := @.transpOrder;
" S3 q) D- n0 c" D+ ]- B$ H# G part.move(@);-- load part' [! H" W* g# |2 X! J5 F* K3 L
@.CurrIcon := "load";
4 r" J; T, `, J$ T8 m GlobalDistObj := part.globDestination;! G0 o/ K/ a% A: p' u" f' X0 G! r+ G
assignLObj := rgmanager.rgAssignL;7 V* ]7 U& e. \ ]( V
row := assignLObj.getRowNo(GlobalDistObj);
k# H. h. ^! Z9 e. q if Row = -1 then -- since 70
' w$ z7 ?, C8 w3 j" A2 t, n2 c if lan=1 then3 R' c m0 o7 ], _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) w- D1 {( x# j to_str("in der Andockstation: \"",?.~.name,"\""));
2 Z3 M' ?" N5 p( s5 h7 n else r4 Z. W r8 Q& X7 @* r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 X" S0 e0 Z$ d' l, n. {( F5 _ to_str("in docking station: \"",?.~.name,"\"")); ! A- E7 V g, O* m9 z
end;
3 O* r" K, z8 I" C else, t7 i" {7 L% [
@.Destination := assignLObj[1,row];) F. e; o& I0 I+ ?% _: l2 d
end; 4 G7 V% B$ K- X& g1 F# x9 _- `
newDirection(@);
/ ^; ]' z4 Y# `* {' ]5 [5 w @.HasOrder := true;
( R- |% ~: R7 s1 S! ~ end;+ C/ P/ V- X0 L2 r* q/ v! T4 p4 t
end;
$ _+ @( f* N/ E W, d) f( n! lend; -- of the method
+ X/ W/ \, r5 @6 _: b |