/* called by: entrance ctrl of the object 'track'. t0 w( f+ R7 ^! k
*/
. s) M, a# n8 ~/ l+ L& Iis& l% Q& Y& b9 ^ u2 w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" {7 i0 k5 r" R5 o) k. ?do
. |9 L/ `6 D4 T; t2 T9 P0 D! i: _/ X% ~ Lan := rootfolder.Internal.Tools.AOLlanguage;& J1 `4 T$ p+ j, m, h* D
if current = @.Destination -- else return6 q6 v' S5 m! j$ v& N: A
then3 b3 c& n: b$ p8 l
@.Destination := void;
1 w: f5 n' @4 `; V0 e( M0 w9 ^ if @.occupied then
: I# A) `- K c2 E part := @.cont;
* t* P9 @' i. l: o6 L @.transpOrder := void;
! q7 U+ T. F: L: Q" ~# I6 H! a1 r$ g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 g \8 ?0 _' H/ e6 a4 G! }
@,root.eventcontroller.simTime);% ~! y+ K r; W- c3 |- U G& m9 `* P
@.HasOrder := false;' s: }$ h2 [4 F( T
@.DrivingHome := true;+ E* R" [$ ?; f; j5 K+ w
rgManager.tryToStartTransOrder;
- N' E( c- l1 g* G# ? if @.Destination = void8 X) I" q) Z- G* @, d
then -- no transport order for vehicle @
' b0 E' y( z6 F I& {) z @.Destination :=
) d( X, s2 s; E+ ` m3 i' I rgManager.nearestFreeStation(@,track.~);
/ C2 l1 U. N4 y' W' {& }+ {+ n newDirection(@); 1 i; U1 |: J* e
if @.Destination /= void then3 c& A6 Y& D: h( P3 s
@.Destination.NumReservation :=1 Y, o& Z z6 Q* ~& z1 b/ _' g- X
@.Destination.NumReservation + 1;
2 U0 I, ~- D6 D- q) k, Q2 g end;
7 r6 g% Z/ c( o/ L) k @.CurrIcon := "drivingHome";0 s7 w _- C0 ~1 \* ~
@.DrivingHome := true;" J3 [6 g: x9 b( O% |" L9 b0 @/ W
end;
4 B2 P7 [) p# g" z+ r else -- the vehicle @ is empty, both vehicle and part are in the same dock station% k X$ T+ x7 t0 }
part := @.transpOrder;
9 x: k+ N" y6 n. Q" g' z/ @ part.move(@);-- load part! F. u( j7 H9 v
@.CurrIcon := "load";, C7 `) F7 i$ t( c1 E
GlobalDistObj := part.globDestination;3 h" Y: [' I9 G2 A
assignLObj := rgmanager.rgAssignL;
1 ^6 P9 A7 K* D& i& C row := assignLObj.getRowNo(GlobalDistObj);
% h( Y' y8 S) F# G$ p if Row = -1 then -- since 70
1 b2 @( i+ n% q9 E& A# w% t if lan=1 then
7 U% K! _$ t0 D4 I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 o8 @" w1 s* t( R* G& N+ _& a
to_str("in der Andockstation: \"",?.~.name,"\""));. G5 u( U$ r3 q* Y. |/ H' N4 ^; x
else
8 c" e* H8 d7 ~& B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 w% L; a9 M$ \* L to_str("in docking station: \"",?.~.name,"\""));
4 `; w! t3 t: A end;: V, v+ _" r& Q- w
else$ n; i2 X* b+ V H. q
@.Destination := assignLObj[1,row];
3 Z% K; c8 M; s6 n. c( { end; ( D8 _# g; N4 A+ Y
newDirection(@);. z3 s" s" a' E" K! a! U
@.HasOrder := true;. Y" B5 @* ?9 c
end;2 N$ g( ^% v4 b+ m; Q
end;
& Z3 i' |+ y4 W# R0 Uend; -- of the method
; \7 Z6 h9 L( P7 ?$ w |