/* called by: entrance ctrl of the object 'track'6 x- x' R& p* U$ R
*/. k2 A' j* \+ B6 |5 X
is
. x5 j* F+ g( g E! y" } part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, q- q0 U8 f. n* B% }/ [. @do9 D# s4 O7 v7 i; w# `8 A$ ^0 Y" l J
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 L& u* E" O" ?6 ?' f0 X5 \% s if current = @.Destination -- else return i* I' P. V9 i
then6 X% k1 p. V9 \( L7 r+ Z
@.Destination := void;
; Q$ ~9 L9 |) O) ^ if @.occupied then; P. Y; G: q- r- o" N; `: B) Y/ p
part := @.cont;' n# h: @5 B% c0 k* v
@.transpOrder := void;# ]+ {& c, B% s
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ G3 i9 P$ R% r2 V- W' i( l8 C @,root.eventcontroller.simTime);0 e) H7 \+ L7 h7 Z
@.HasOrder := false;
) P9 m7 |& p& F% n2 J& ^% s6 ` @.DrivingHome := true;
4 n4 Y7 O( |+ `. P% P rgManager.tryToStartTransOrder;6 O: N$ ?, a" u8 P) ]
if @.Destination = void
* j4 ?" z. p1 ]" ]. ], D8 y; D2 ? then -- no transport order for vehicle @
: M: }* S$ J, }; ~# [ J @.Destination :=
8 H: n- A% f& c9 N9 B rgManager.nearestFreeStation(@,track.~);' t* |% s9 E; l' x! |, s6 ^
newDirection(@);
# t' b3 w8 f4 d) x. o; E, n3 j if @.Destination /= void then' P& K4 `. O0 N" a; h3 \" b$ I
@.Destination.NumReservation :=4 e0 T) d j0 ?+ e8 F8 W3 _
@.Destination.NumReservation + 1;
( f' Y* d' ~: o% ^' I end;1 ]( R5 o' A2 a/ E' [
@.CurrIcon := "drivingHome";
* i$ o' x8 o: N, u" U6 ?0 ^ @.DrivingHome := true;. o9 V! P5 V% T# ~* L7 y
end;/ V/ j% [9 s! I* V6 e8 \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( _" E# y5 I0 b% B& Z3 {
part := @.transpOrder;
& C* f; R) r; B part.move(@);-- load part
8 r d9 g" ^& \% M. l @.CurrIcon := "load";* Q/ x+ d/ @; q) ?. L& Z$ W
GlobalDistObj := part.globDestination;
9 p, F7 q' n* c* y4 J0 g assignLObj := rgmanager.rgAssignL;
6 L- w! x/ `. ~8 I! X, B( D row := assignLObj.getRowNo(GlobalDistObj);
" Q% A2 [ e& D1 V9 ] if Row = -1 then -- since 70
]6 j1 o+ N0 A/ E if lan=1 then
y+ H7 V. ]9 g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) {8 S/ P* g8 e, U2 |% Q+ Y to_str("in der Andockstation: \"",?.~.name,"\""));
2 L* y* a# o, r- v0 v else
1 D* }4 C- s1 [& J( O# ]+ Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 x- _. l1 b6 \* W: u* S
to_str("in docking station: \"",?.~.name,"\"")); ' [4 E9 }& d/ ^0 G: F
end;4 a E8 s# L1 z* S& H- W
else
d% u" Q+ `- m' A- t. g; d @.Destination := assignLObj[1,row];1 w3 h0 @& T9 P
end; ! l6 u% v+ N2 S. W& h% U( o
newDirection(@);
' D. X+ h) l8 Q# F# m2 _. f7 R1 o7 D @.HasOrder := true;
! P3 J+ w9 a# U8 M C0 ?9 R9 M& I& R end;2 g9 _5 V' [ h0 X
end;
9 C+ o$ C+ y6 p1 ^! z3 Uend; -- of the method
1 K) [" X2 ~4 B& u |