/* called by: entrance ctrl of the object 'track'$ [ {9 z; ` B+ C
*/
! p4 s3 z* A4 O% J+ s. S: tis
6 B4 R+ B/ f$ d3 d2 w1 ^# G9 k part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 [+ [+ \. A) y, U9 W: @do3 m( N1 W: t {7 L
Lan := rootfolder.Internal.Tools.AOLlanguage;- r- G1 m0 l# t, ?
if current = @.Destination -- else return
7 T) g+ f/ O" w" `# ]' f then9 k4 G; e8 h, m7 q
@.Destination := void;
0 c3 P8 o6 C: S$ G* r if @.occupied then% |( c% Z4 `" B% A" o) L$ C/ q9 {
part := @.cont;
! t" `3 E" W: p* | @.transpOrder := void;
. |3 n! Q3 N8 g' Y _) G# P% \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, k& h- u' x3 z4 t9 ?. G @,root.eventcontroller.simTime);
) u7 j4 ?9 A- f! t9 N1 I. T8 g @.HasOrder := false;+ B) u6 o+ ^( o; Y' Z
@.DrivingHome := true;: K" | t; A) ^
rgManager.tryToStartTransOrder;
# v( i7 A% b% `; l, v7 a6 F% t if @.Destination = void' r7 k( u9 m1 {4 k4 {
then -- no transport order for vehicle @
% R0 `# X9 H5 O9 i! \( j. N @.Destination :=7 Y/ O) }& S4 @: d' P- d; @' s$ K' R
rgManager.nearestFreeStation(@,track.~);
7 j4 f9 I/ `3 G3 g d" z newDirection(@); $ C M6 q$ ]' q- e; K0 L
if @.Destination /= void then0 H% v b/ i" _
@.Destination.NumReservation :=# x/ U3 p/ F! c& Q! g* A; d
@.Destination.NumReservation + 1;5 t" b% |) z' V' a
end;" y( s+ M/ G7 J( v
@.CurrIcon := "drivingHome";
) a" ^1 F# S" A- ]% K @.DrivingHome := true;
+ B, O# D. m) Y; c( ] t4 X end;
0 X, W% K& @( W1 d2 m# J+ M; A1 v2 \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station) ]/ T" A; S& g. V$ ~# F
part := @.transpOrder;' u: O& h, q; f+ `
part.move(@);-- load part
6 Q' W: l% N' O8 C2 {/ Q) s. Z* s7 U @.CurrIcon := "load";1 k2 I# Y$ S% `. c# D! m
GlobalDistObj := part.globDestination;
4 L' ]( H. ?; h9 Z1 C assignLObj := rgmanager.rgAssignL;
/ _# `) H0 O, J row := assignLObj.getRowNo(GlobalDistObj);* E9 S# D: F" Y
if Row = -1 then -- since 70
! u. X$ U( Z* x4 f8 c* l# H. ~. R8 X if lan=1 then: e- E: p& {& V& b6 J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- m# C2 S1 t0 i+ V
to_str("in der Andockstation: \"",?.~.name,"\""));
9 f+ k* t; ^1 ] else& N, W, a5 m+ R7 B5 K/ A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; x# E( i: q+ e M( Z+ @% t
to_str("in docking station: \"",?.~.name,"\"")); , |6 D8 t) v8 T+ J( n
end;+ c, _- Q- N% Y& j
else; I+ g. L. q" b3 T' K/ O- v/ Z6 L
@.Destination := assignLObj[1,row];
: W) b2 k8 }/ W1 v; x& s end; : H& F8 }# `0 K% x( m$ ^
newDirection(@);
; }8 |3 _$ e* [( K* O4 A8 R @.HasOrder := true;
5 X& D: G- C' m8 w! x' v2 P" T7 p end;: Q2 E6 b6 w; ~( S
end;- m# O6 z% X5 z+ h
end; -- of the method
0 a$ P7 t2 W1 d: ]! B& @" ` |