/* called by: entrance ctrl of the object 'track'
0 F/ n7 b# L1 G2 V- g0 H" H' R# q( j*/; {) t2 Y7 d/ N4 x
is# Y6 o6 {( |) Q* y4 E0 r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 ^' T7 `; K3 X- t
do
8 m( f9 z: @) F! q' M Lan := rootfolder.Internal.Tools.AOLlanguage;* C: y. M1 g( e" B
if current = @.Destination -- else return7 q, m9 `" h0 M$ a5 b/ X9 x6 G1 n
then9 @) K/ L' o8 W
@.Destination := void;% O3 B4 o- q' ]
if @.occupied then
4 A$ v2 Q* ?+ {1 r8 s8 v part := @.cont;7 A) q" i; N. q- B7 W+ i
@.transpOrder := void;4 |- ` i. g- h) u# g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 S# o, S1 y' E ]# i0 M4 y. X
@,root.eventcontroller.simTime);! y U N% i( E5 c: q2 N
@.HasOrder := false;
|% \2 M! W' j5 C: b% R @.DrivingHome := true;+ y/ b+ o! ? {5 G
rgManager.tryToStartTransOrder;; N5 l7 f: ?$ t, c% [9 p1 S) w
if @.Destination = void
* x" `* A: N6 y ~ then -- no transport order for vehicle @
2 m8 k5 f3 ^7 x @.Destination :=
+ [/ U ~% P! J rgManager.nearestFreeStation(@,track.~);) K5 l0 }+ `% E% W7 \
newDirection(@); " ~9 N# B O) b
if @.Destination /= void then% v3 `" Z# F$ i3 T
@.Destination.NumReservation :=% B; i+ w( A; g# R, J
@.Destination.NumReservation + 1;
' w+ d/ W+ @* D# s end;
, h% k0 a. K" T @.CurrIcon := "drivingHome";
1 d3 ] e. b+ h) J( q0 R2 A" U @.DrivingHome := true;5 D* W& s$ o7 O. T% q5 x
end;2 R3 i/ B3 x7 x6 Y0 J9 R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( Q& z4 s/ N- D( D- x( P) j part := @.transpOrder;
* A6 j7 J2 F/ S. I) o/ J) y5 ] part.move(@);-- load part
4 u6 N7 v) I8 b5 @4 d @.CurrIcon := "load";4 u+ C# i3 n* S( w* d. F, i: _
GlobalDistObj := part.globDestination;* p7 I8 x! L4 X3 o, _
assignLObj := rgmanager.rgAssignL;7 {5 p, j1 q9 k4 ?% c+ H
row := assignLObj.getRowNo(GlobalDistObj);! G+ q$ p7 t/ ^
if Row = -1 then -- since 70! V- h9 ]- Z" W* X4 H$ W9 ?1 `2 f
if lan=1 then( y. ]6 N4 F0 u9 R
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 e, E& l% k' Y2 X* A. k' X
to_str("in der Andockstation: \"",?.~.name,"\""));
: m* _% G' a. t+ y: } else
9 w8 e3 E# a) x" U) { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 @$ l j! I2 P9 n0 y8 ^ to_str("in docking station: \"",?.~.name,"\"")); # q5 G, B& h3 Q) K5 _
end;
) \7 a; d9 f+ G8 W. u. I# |/ F! U else
+ ^: x4 s" `- w+ {" y/ s* X4 @ @.Destination := assignLObj[1,row];
: Y) `3 R* i3 z3 c5 U end;
9 [' [; ~* g6 T3 q newDirection(@);
+ a* s. E) C5 k$ W9 O; J9 G @.HasOrder := true;# t G3 e' G7 t, N7 W
end;
& x% G5 h1 @/ h end;# W. i4 ?, `% w" w* `
end; -- of the method
9 k9 m7 I, v% O* w3 S6 _ |