/* called by: entrance ctrl of the object 'track'
; n4 |# t7 Q2 n0 g8 Q*/
6 P1 v7 D; q p8 ?% C6 Q( v* x! Tis
5 ?% K) V5 S3 z/ C: b part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 M' D0 m- b' l. @9 C3 m" ^do
4 H" ?/ F1 O8 b4 x# ^1 I; _ Lan := rootfolder.Internal.Tools.AOLlanguage;
; a2 z" w$ E0 T7 C* z% Y% Y" X if current = @.Destination -- else return9 I4 @8 s& Z5 C4 L4 e
then/ r3 f `6 t& ^0 L
@.Destination := void;
1 g& i2 |+ [5 W4 y8 V if @.occupied then
- J; j3 k6 b/ [& L part := @.cont;
+ \) \% w$ c3 x, W( ] c! O @.transpOrder := void;) G) ` l- ^" C' {3 Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 _$ d6 u- `, @& ^ @,root.eventcontroller.simTime);5 n5 k8 X/ [. P
@.HasOrder := false;
4 L ]; `: W& E5 d6 \ @.DrivingHome := true;
3 L% I& o: s" A& g& X rgManager.tryToStartTransOrder;
4 `4 r9 P! L" p if @.Destination = void
$ s! U; ]& Q4 {8 Z- ^- O then -- no transport order for vehicle @
G) ^ Q2 l( e3 Q @.Destination :=
+ v' J( p1 }0 l( p2 \) f rgManager.nearestFreeStation(@,track.~);
# h; A( q% d& h& k$ E+ s newDirection(@);
( D* w% L# `# g7 z- B5 i- l( C+ l. C if @.Destination /= void then! E3 l: ~* E) {: {
@.Destination.NumReservation :=
. a3 n3 B3 C2 a: [" } @.Destination.NumReservation + 1;- `& m4 Q7 g, @/ r
end;
; N7 Q0 i |: ^& F/ k8 M @.CurrIcon := "drivingHome";+ G& c3 O) V* k, u
@.DrivingHome := true;6 G# b8 y* }# z/ v5 b
end;
* `/ K) H. ~' Q: k( o7 e else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 W- E+ t. C- z4 F: l
part := @.transpOrder;, ~# X& U" c# K" Y
part.move(@);-- load part5 O/ s C9 {3 V* P! O
@.CurrIcon := "load";6 G5 ~' p( v1 t* H2 }
GlobalDistObj := part.globDestination;
$ q/ V1 ^+ K4 E' p assignLObj := rgmanager.rgAssignL;
) L7 T3 I$ f- Y9 n row := assignLObj.getRowNo(GlobalDistObj);6 I t5 [5 }6 j* h% a" m" T
if Row = -1 then -- since 70
, \+ \$ o% o# w6 o5 b if lan=1 then
( e/ q6 y1 j9 `( d$ e: T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& m S$ j; d3 ?6 j+ j/ b
to_str("in der Andockstation: \"",?.~.name,"\""));
& t# F* O/ f+ ]5 K; u* X else6 r( k$ ?, F, v7 {* C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 Q8 E1 s& k' P3 c* b/ t- X* D3 |- U" S
to_str("in docking station: \"",?.~.name,"\"")); 6 Q4 G2 J; }: ]4 H
end;
. E# ^8 V) @" j* Q3 U% n+ p else* d- v' ]+ L: O/ e3 P
@.Destination := assignLObj[1,row];
+ \4 R3 O( B a1 ~9 i end;
6 w2 h8 G" ` B# A newDirection(@);
/ N) t: j; f1 R" a2 S! _; E @.HasOrder := true;
' _; Z& N$ x; @7 k end;
$ ? t6 r% Z# G0 I end;* `3 V& |. `/ n) ?# Z; M- ]
end; -- of the method
0 r/ @3 \- W& M2 a' T+ B4 ~ |