/* called by: entrance ctrl of the object 'track'( _8 k: [, ^/ {+ b
*/
9 ^& M7 E4 K4 E A' \8 M* V: _is8 z: W; R8 d, h2 n/ c7 O @, U4 L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; k& t. U! ?2 z5 l; x0 {/ B6 w r
do; B& ]& J! k; }8 @8 B8 ~
Lan := rootfolder.Internal.Tools.AOLlanguage;, C$ S, U5 q" P7 M5 p* g
if current = @.Destination -- else return
* r9 q8 H( g- V) t6 W* u then
2 M/ t6 l( L% I @.Destination := void;+ N6 y; [$ f, Z/ F9 {6 c
if @.occupied then
1 a% [9 _/ ~# z7 P5 w part := @.cont;
' N* C p* w2 |4 l+ ]6 ^ @.transpOrder := void;# Y9 i4 ~" X0 f; U: k
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 U( N: D- P0 ^$ B' s& i @,root.eventcontroller.simTime);* c4 R8 a- L1 p5 ], b0 Q8 F; U8 a
@.HasOrder := false;% k1 z3 A& i1 H5 y$ c
@.DrivingHome := true;+ k3 v$ H2 v& }5 l! G R( L
rgManager.tryToStartTransOrder;- W! f [, M8 M5 n( Q! |
if @.Destination = void
# ?: F* w/ N6 Q* j8 [# R. q then -- no transport order for vehicle @9 @! l; R' Q z3 ~
@.Destination :=# F' h- \: I. A4 i
rgManager.nearestFreeStation(@,track.~);
9 H, T: w" l4 E% |5 W newDirection(@);
" s9 p5 h% `! M if @.Destination /= void then* S/ F4 B8 b& x& G9 `/ u
@.Destination.NumReservation :=0 K1 S5 A8 o. \! j% P
@.Destination.NumReservation + 1;3 j* \0 s1 @$ M" P* B. C* T
end;. \1 ^; v& u* b' [% q
@.CurrIcon := "drivingHome";& Y& F$ C2 n5 G
@.DrivingHome := true;
. W) ?' Z6 I" l0 S- N. z end;
9 @& P/ R5 ]9 `! f0 U else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' n' C, C0 F# b, I1 ^ part := @.transpOrder;8 G3 J3 V b! G' n
part.move(@);-- load part
0 ^/ w: k3 ?0 m" r* G$ f @.CurrIcon := "load";/ `" G& T2 W6 P( B3 T) A2 d: L
GlobalDistObj := part.globDestination;
* M# S& [' L8 F: L' R. Z2 b assignLObj := rgmanager.rgAssignL;5 }) n! `3 l* l; f
row := assignLObj.getRowNo(GlobalDistObj);
5 I3 s/ q- C. C if Row = -1 then -- since 707 t P2 h1 x8 B7 ]
if lan=1 then! Z: h6 n( Z; L6 p! y) F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. t' y3 H1 u2 Q" }7 T7 f
to_str("in der Andockstation: \"",?.~.name,"\""));5 W3 J8 `7 C+ c
else
9 V/ m; s1 k+ ^" } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 z4 f; u1 X6 q4 l& n0 \* b
to_str("in docking station: \"",?.~.name,"\"")); ' d# b4 M9 Y7 l9 P, E
end;
0 {; {3 f2 ~- ^( M else
& m1 U h2 z% i9 }2 L9 F* |& v @.Destination := assignLObj[1,row];+ X, D& X1 N, P* X/ i
end;
* H3 {, u% ^- l! T5 C$ e/ D/ l7 P newDirection(@);
; R! n- R- h1 Q# @ @.HasOrder := true;
" X% N# r' D* z; @: l1 O/ R end;
6 a4 M2 b1 @4 C5 Z, W5 e end;
) G/ n- b) ?1 }' j. {" I! x( Tend; -- of the method
4 ^- C+ w% ]% O' o% H |