/* called by: entrance ctrl of the object 'track'' G( y3 y1 g% S* O. E* k9 t
*/: I F9 K) s" o. \2 s. p" d; k
is) B$ P0 |1 v* S) x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 J% _& i0 S6 z( G4 E. {4 V1 O
do0 L) y. B9 y8 G4 z6 Q
Lan := rootfolder.Internal.Tools.AOLlanguage;
. B P- E: ?: X) u6 X- b2 _% d if current = @.Destination -- else return) Q9 G2 m1 c$ f- q4 c
then& z) i1 X- D5 J1 W
@.Destination := void;1 s3 E: i7 c6 G3 L, T
if @.occupied then2 U/ z9 V5 h/ |' `
part := @.cont;$ v1 A. s7 e9 p" y
@.transpOrder := void;
1 H7 B4 K/ F4 n2 G part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& O( q) Y1 u! ~) x }( J/ N @,root.eventcontroller.simTime);5 w$ P6 Q) p: x1 G4 `
@.HasOrder := false;3 s# B* S& f- ]) ?9 A3 Y! U
@.DrivingHome := true;( r) Y) N# d! V
rgManager.tryToStartTransOrder;! r$ G0 P: I! M! \/ O
if @.Destination = void
6 H# d) t# b8 z: {" n: U( ~1 D! z then -- no transport order for vehicle @
3 ?3 C, a0 S2 q5 m @.Destination :=: m0 y, U1 Z C: Z. ]
rgManager.nearestFreeStation(@,track.~);
: r, p* i7 E/ b; ~8 C newDirection(@); 8 t4 C. s; j8 ^/ j; B& R; \
if @.Destination /= void then
, J3 w( Q0 ^+ i. S @.Destination.NumReservation :=
6 J! S) {5 H4 {! L0 o3 @. ^7 l @.Destination.NumReservation + 1;
* ]. N+ ^1 h8 V6 Q& C end;
8 G+ } {! c4 t5 f; m7 b0 U @.CurrIcon := "drivingHome";
& X8 E, E" S6 ?7 ]4 s/ a% H: e0 \3 ` @.DrivingHome := true;6 ]; A, l- h9 B/ v
end;
+ O- b' Z5 ?% w else -- the vehicle @ is empty, both vehicle and part are in the same dock station! ~/ ?8 U1 ~7 R+ K) v% W; \
part := @.transpOrder;
' z- W+ O, `) ~$ ^$ u5 @ part.move(@);-- load part: {( p* W" S4 j7 c0 a: Y3 w: p9 H
@.CurrIcon := "load";4 b# J: r( z1 q
GlobalDistObj := part.globDestination;
7 Z+ f% E( q/ _- H. ~. g8 k/ P assignLObj := rgmanager.rgAssignL;
' t, w y$ q5 H% ]; k2 H Y# n row := assignLObj.getRowNo(GlobalDistObj);
* e+ Q% i H3 ]$ ?; y' ] if Row = -1 then -- since 70
' `3 \* d; Z* ? if lan=1 then% D3 V0 w. T7 D2 ~! w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 Z' n- T0 C0 P* J& P) v! ?7 z3 y to_str("in der Andockstation: \"",?.~.name,"\""));0 v( b$ q4 H7 c x2 U9 s
else
/ M- ?: ~8 }- F1 f2 H promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
P* b- a) l7 Q0 M, ?$ U to_str("in docking station: \"",?.~.name,"\""));
" ?5 I0 R5 q5 b+ h% k- | end;9 y8 B9 F+ O6 O1 G) z9 Q8 f0 r+ X6 c
else Y. V) G8 f" u+ N6 e# n
@.Destination := assignLObj[1,row];
, G! B( V% G2 [, a g6 m+ p* y end; 1 G* L. [) K ^8 _. ~
newDirection(@);# _) l8 r D+ E. |* U$ L
@.HasOrder := true;# q' v6 t# k6 K+ I" `: y
end;
6 p% Y1 t% L# \% C0 i end;
. ~) D% h) q: } dend; -- of the method
) m( T$ ~3 Y0 J5 x" j |