/* called by: entrance ctrl of the object 'track'
+ L" ^8 \5 E9 i( N, m- j*/
$ u' O6 t# t1 Y' `/ n* I4 Dis
9 q7 }1 ?# D/ |- C+ q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) k7 O0 K/ }& {. r5 {# s" Vdo
k' r$ b3 w8 y/ F9 n3 G. j Lan := rootfolder.Internal.Tools.AOLlanguage;
0 X4 Q- U; c+ L$ n( ~ if current = @.Destination -- else return
) n6 H( a/ Q/ a' d. Y2 u then
$ _ y: u9 F# P& N0 x' p @.Destination := void;
) Z% n; n: q- B" O! U/ U if @.occupied then' f C+ R; p6 _3 y( ?# r
part := @.cont;
+ d3 v! Y& }' K, t' M7 w( H7 L( s- U @.transpOrder := void;
, C1 }: x. n% t$ o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 @, x7 E \+ {& B2 t i
@,root.eventcontroller.simTime);; w, y* u' x9 p* b+ {6 e
@.HasOrder := false;
6 R$ U2 H" G7 F n' M) ^; g @.DrivingHome := true;
" P, u. r6 N! W4 U! q1 V* q rgManager.tryToStartTransOrder;
2 x5 n, e R P8 u9 g/ M0 X if @.Destination = void7 }8 U6 _; K. t" } }
then -- no transport order for vehicle @6 V( p( ~4 a- D+ b: q/ T
@.Destination :=
2 P9 Q* H0 z$ I& Q2 f% J9 a rgManager.nearestFreeStation(@,track.~);
7 E' z4 k. _6 D D0 | newDirection(@); + k+ j, g4 W f q( H* \( p
if @.Destination /= void then
; r v/ N* n9 b' _8 ]) F @.Destination.NumReservation :=
4 U* L, v( L4 z: x' \3 }. i @.Destination.NumReservation + 1;+ w9 z# U, Y8 e6 T9 l9 ]: s' o
end;3 B! _7 K. m# y' ]2 S
@.CurrIcon := "drivingHome";5 N' `4 p1 S# c/ ~
@.DrivingHome := true;
0 A1 y+ v7 C! K8 i% u: X1 y& S# ]' E end;& O' O8 S. B, o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station {# v, B+ ~) F! C# N7 |
part := @.transpOrder;6 {3 a1 |1 u! K; m2 T3 u" n
part.move(@);-- load part0 R- p3 D9 ]4 v, |; q2 P/ Q
@.CurrIcon := "load";
/ F v! Z4 q' }2 ^ GlobalDistObj := part.globDestination;% D* L, S# Q' Q" [% i: I
assignLObj := rgmanager.rgAssignL;
# X9 y* W% I' [ b. S" u row := assignLObj.getRowNo(GlobalDistObj);
+ {& W$ T! I1 E* X- {# N if Row = -1 then -- since 70
/ k& t$ b* u( `5 ~3 i if lan=1 then
, \6 {8 x3 D2 b. Q& S5 M2 Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! o: f( Q+ D4 m1 V& Z to_str("in der Andockstation: \"",?.~.name,"\""));
1 g' K3 P! t: k* x2 n7 S$ x; ]1 h else
0 x. d& p# P9 C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: J( O- u4 _# i) R! N( u; j4 T3 e
to_str("in docking station: \"",?.~.name,"\""));
8 }# h6 {7 ^; }- G1 E; l7 Q) c1 a end;0 k* b8 {+ W" A1 i. S
else4 _) k& m% n; y. p \- n
@.Destination := assignLObj[1,row];
3 t1 F! S6 S5 ]9 b9 [ end; ) i6 N% J) D* X! Q: M! `) I. r3 S
newDirection(@);
& G, `5 ^/ a/ u/ }3 W @.HasOrder := true;0 q( X$ Z) b8 d( w
end;* O6 @# F' u% f- M: d
end;
1 z2 t* F" q( a7 N. |! h# {end; -- of the method- P9 m& a3 m! s( u5 J: ~% E
|