/* called by: entrance ctrl of the object 'track'
1 ]$ C- A8 j4 y* U% V*/
: Q/ x$ j" X2 ]; D) o$ w# Nis
7 b K0 p. Z( x* K7 N3 h9 X part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 _% H: S5 ]* o6 g k
do6 c2 V6 |; _* j4 p8 G' W$ T- ^
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 c8 J7 x3 P x; C& { if current = @.Destination -- else return, t- G; M4 w8 v& j9 w6 Z
then
6 z" F' d2 T, p5 L) Z @.Destination := void;
. s1 d/ ?3 k, F& S5 \! {- o if @.occupied then8 x0 G7 v- }! Y6 O w
part := @.cont;& c- v5 x# G9 W0 n3 \- w
@.transpOrder := void;& Z! u) E( ^: Z8 m3 S: R& }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, G! Y) \8 e+ Y y7 Y: H* z5 d( O
@,root.eventcontroller.simTime);% h6 o+ K6 B' ^9 S& n: D
@.HasOrder := false;$ T! N9 K+ m% C4 U: F ], b6 `- ]
@.DrivingHome := true;. Q2 t0 X7 d$ j T
rgManager.tryToStartTransOrder;
( {0 _2 j) k& c! b+ v: N6 u' i8 c if @.Destination = void
I# `3 r) C+ f8 \! G then -- no transport order for vehicle @6 E) P* k/ P" c/ @
@.Destination :=
g/ i1 {" ]5 B' n6 r rgManager.nearestFreeStation(@,track.~); P1 D9 k8 R4 M
newDirection(@); + d/ R0 O* r! @& ?- P
if @.Destination /= void then# _/ b& V. S4 b" i
@.Destination.NumReservation :=) b) h; |' M' i$ q/ d
@.Destination.NumReservation + 1;, v; B4 K, b9 D9 }. E* p* G
end;
( P- s" y% z+ s @.CurrIcon := "drivingHome";
' b2 z9 i6 d& W4 R8 n* l; f ` @.DrivingHome := true;
0 P6 B6 P+ g; U! V& j5 e& B end;* f! C) L" J7 J e3 z. e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ W7 n( r C+ L, L' ?3 \- z5 f
part := @.transpOrder;
2 B1 X# L. ]" k, f7 y part.move(@);-- load part- Q4 {! M' c! t r r7 m
@.CurrIcon := "load";
& ^$ V, j% p) \2 j% ^ GlobalDistObj := part.globDestination;, o& n( |3 W. ~* W
assignLObj := rgmanager.rgAssignL;# Z- D& r# U) f5 ?
row := assignLObj.getRowNo(GlobalDistObj);. x6 u0 G6 C% s7 Y
if Row = -1 then -- since 70+ I$ E! E* r( D9 _6 m- c7 `' i
if lan=1 then
. n- f" v" L; u+ H# u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," |' V! h3 ^ \% c, L1 j+ S. v
to_str("in der Andockstation: \"",?.~.name,"\""));
' ^/ n! k0 [3 j. q9 C else8 j! L# v+ k1 O' p; [4 s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ b5 s9 D; e7 H, T
to_str("in docking station: \"",?.~.name,"\""));
' d( d) a. \- u5 |% F! c% j( ` end;
) c4 W; f6 }* k v else
. C8 p' U, w' ?; j" D _9 [ @.Destination := assignLObj[1,row];3 |, `1 x, F) p5 C; Y
end; 5 L- U6 R+ M. m
newDirection(@);7 X$ t+ r+ P6 ~5 k6 [, f B
@.HasOrder := true;
/ M1 F7 O0 C' W* D e' d/ \( s R end;
% b' V0 n) V* t! l4 i/ F& Y end;/ y( C* W" C' ~9 h- K. L; U; s. Q
end; -- of the method8 f, X. o' F$ K
|