/* called by: entrance ctrl of the object 'track'
# Z) l+ q* W$ b, P*/2 U k5 C/ b2 j
is+ x* H1 @$ s9 b8 v4 H& y6 s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) e7 N; s1 t3 f( j( ldo+ C/ I8 U8 z; N3 T' N+ @ ^
Lan := rootfolder.Internal.Tools.AOLlanguage;2 P" l+ a% E# l8 Q8 c
if current = @.Destination -- else return
' M& u; _# i* b then
' U; [: H) m, U3 Q6 \ @.Destination := void;: L5 @2 K* M' u$ r
if @.occupied then& c$ a0 j8 X7 e- T8 X P$ C
part := @.cont;
. n- H7 I D& e a4 } @.transpOrder := void;
# p* u6 \7 l% b3 n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," u. ~& N- Q$ g
@,root.eventcontroller.simTime);- z% q1 O0 i& d) |* u
@.HasOrder := false;9 C1 d* O! @ _# U
@.DrivingHome := true;
; ^. G+ `) o v+ s7 \- W( D' z rgManager.tryToStartTransOrder;1 S5 T/ d& S) P
if @.Destination = void
7 I# V, f4 v( i3 a' { then -- no transport order for vehicle @) k' j; l; b$ M; ]" ?; |
@.Destination :=3 Y$ Q5 J( \9 i) S' V% X' }
rgManager.nearestFreeStation(@,track.~);
4 {: u, @ _+ G+ t/ C, } newDirection(@);
' m2 f* g# y( Z* a0 E if @.Destination /= void then; h+ U2 s0 O" y5 y/ R! g& W, r
@.Destination.NumReservation :=# u2 y8 ~; ^# {# m0 ^# P
@.Destination.NumReservation + 1;
0 N+ m8 T' d' C& f/ K end;( K8 Y' i: O# }
@.CurrIcon := "drivingHome";3 V! t7 i# ^4 f" i! T
@.DrivingHome := true;% u3 P7 O# K7 S2 m
end;9 s% Y/ w6 f8 y3 `6 g: r/ n/ v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 c& }* {' c7 ^! } part := @.transpOrder;
$ }3 I: T- L& v part.move(@);-- load part
6 ?' H0 `6 T: d/ }. m! Y$ v% J @.CurrIcon := "load";0 x& \+ H( `4 z# n" u X" r6 i
GlobalDistObj := part.globDestination;8 }+ D. j6 [8 v _1 n
assignLObj := rgmanager.rgAssignL;
1 D/ ^9 k' L6 ]3 l2 } C row := assignLObj.getRowNo(GlobalDistObj);: k. W r1 U3 `- k9 \7 I6 l
if Row = -1 then -- since 704 q% A9 p% } e$ e
if lan=1 then
1 d8 ? \* O6 K4 K* D4 M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; d' t! b0 a z$ Q& N
to_str("in der Andockstation: \"",?.~.name,"\""));3 E& v) A) Z4 W+ t7 z# ~$ G& m7 G
else, x* v; {2 a. |1 M- w& O
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 P: X9 |% Q7 p! E2 m! v' K to_str("in docking station: \"",?.~.name,"\"")); 3 V9 f3 \2 q1 f" z& l. T5 d7 m
end;+ ?% q6 P% l! ]0 d
else9 t% f, P4 y2 U+ F: d, r; J: T
@.Destination := assignLObj[1,row];
* F: i5 M* V: e& g( o& ? end;
0 Y N/ z0 ]; Y6 m newDirection(@);
, u0 F5 z/ w) ^" w/ J @.HasOrder := true;- X# E1 w2 Z5 B
end;
. O2 E8 w4 g5 a( M end;
+ w; N# z5 l8 {: u: u1 Fend; -- of the method/ I0 N. V: C9 `" \4 i
|