/* called by: entrance ctrl of the object 'track'
) S4 A$ B5 |7 B& h5 C*/
" |. b r0 g& L) {* }: G+ D, C. T3 Yis6 A S2 K" m6 ]" l- T2 E6 H M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 z0 K3 H& e7 Qdo
' f9 t5 R$ n, y5 H9 N$ h Lan := rootfolder.Internal.Tools.AOLlanguage;6 r0 Y! x7 {& O( C; A, r
if current = @.Destination -- else return
0 e! o, E5 ?& D( B then5 J _, B1 i1 j- u
@.Destination := void;
$ v! T! }! k8 M- g if @.occupied then2 N0 h. e- t a4 m T; I# s
part := @.cont;6 t6 B8 A) d2 K% v3 }0 W5 c6 P- m
@.transpOrder := void;+ o" _, g' W' U" k
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! N( f- u1 w x1 @: s% u @,root.eventcontroller.simTime);0 q! `3 \3 ~) k( l+ F- g- I+ H
@.HasOrder := false;
7 z. a+ h2 A3 e! E @.DrivingHome := true;3 \' o% V! o `+ T3 \; J3 ]
rgManager.tryToStartTransOrder;% o& z2 |% i( s
if @.Destination = void
9 @& A5 e6 r% z1 ?; F6 ]6 j/ F then -- no transport order for vehicle @
3 ^4 J0 S* v$ @% u5 K @.Destination :=4 l, Y! [1 q; N2 b1 @) \' I
rgManager.nearestFreeStation(@,track.~); u' A5 U. o2 @! r, K) `/ Y
newDirection(@);
* B, l/ P$ \, }1 T+ x if @.Destination /= void then2 A) e; I- L6 u; r& R. h8 Z8 F
@.Destination.NumReservation :=8 G3 z' d& b. ]7 _5 X2 u/ m
@.Destination.NumReservation + 1;
8 K2 ^/ e( f! ]5 x- a( b% K0 I0 p) M end;
+ {/ N1 B' K# n! g4 a) s @.CurrIcon := "drivingHome";
2 \( T0 r4 o0 E. g$ D: }7 O( g6 ^4 F @.DrivingHome := true;) l5 ^& x: P- X( C ~0 n! C
end;
5 G M" H$ a2 Q# l else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 u" [7 K# y* A5 c) b1 M
part := @.transpOrder;+ e& I; G+ v F/ v5 Q0 |
part.move(@);-- load part6 ]9 K7 a5 e' s
@.CurrIcon := "load";
7 t# q' O9 }# W+ {& R+ y GlobalDistObj := part.globDestination;
0 ~ H8 e0 r6 F$ i assignLObj := rgmanager.rgAssignL;' u9 n/ R2 N3 H1 C
row := assignLObj.getRowNo(GlobalDistObj);" V8 o9 R: \; O7 k2 O
if Row = -1 then -- since 707 B" r! I5 b; H m3 z$ V+ o; k* Q; E
if lan=1 then. M' h1 o1 a, I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" K9 p8 {9 Q5 q& Y, V2 k to_str("in der Andockstation: \"",?.~.name,"\""));7 L" T9 v' P) _( {( q0 Z
else
( R4 D1 f( {( ~; C* ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; x0 v* Y) m b
to_str("in docking station: \"",?.~.name,"\"")); + H: e/ v, K9 ]* q4 R( g
end;8 `& _- ~( X4 n5 ?
else
5 w+ |4 q! C- d @.Destination := assignLObj[1,row];
8 o8 U5 q1 k7 J7 y2 S5 J ] end; . L/ U. B6 [8 L; `8 O. M# y
newDirection(@);, u# N0 m4 y9 X% D5 t3 Q
@.HasOrder := true;: l+ T6 Z: _# c
end;" }0 I% p8 u: N
end;- ]* Y B) M, f/ ?; u
end; -- of the method
* `4 v& e/ T; Q' E* Y |