/* called by: entrance ctrl of the object 'track'0 L, N0 G. z7 }! t! e: X; F
*/
7 z: \2 @0 |/ R( s, T# ?is' A* @* r y/ _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) \+ \0 L' Q& V) B
do& I; r# j8 O2 ^+ F* ~0 w0 q
Lan := rootfolder.Internal.Tools.AOLlanguage; @, r z( d( Y2 D4 n
if current = @.Destination -- else return
* g) ~# B+ k1 I9 x- L: N" a, G then: Q3 K; O, g% A, ?- u
@.Destination := void;5 c0 b0 ` h1 ^
if @.occupied then" K: g; ?( u3 C. o. X
part := @.cont;
3 t9 l( p( O. \( v* k' M @.transpOrder := void;* g, q% g8 A+ g6 O- k( I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! I8 m: {2 Y% _6 B0 y- h. ^
@,root.eventcontroller.simTime);* | w- K0 ]3 u+ T& c9 O ^
@.HasOrder := false;
/ u6 d* ~" p" h E @.DrivingHome := true;
. ` g1 c' u6 t" \4 X rgManager.tryToStartTransOrder;
: h; _, g& e$ v) s) y0 q if @.Destination = void
( Y& e8 q3 @+ O2 a8 G then -- no transport order for vehicle @" d. M; h# P% o$ Y! g
@.Destination :=
, w' I! }7 l: {! r ^ rgManager.nearestFreeStation(@,track.~);% G* z+ S% J# L8 e8 K& J+ u* b5 n
newDirection(@); ( g' A# u3 [6 ?1 V! E, V+ [/ @
if @.Destination /= void then ]3 @; s3 H) q6 B; X( _5 Z
@.Destination.NumReservation :=' u) U2 Y! q* z
@.Destination.NumReservation + 1;
& h+ U# S6 j9 n. n5 p2 j% k2 o! A end;6 j5 a( h" ^8 X, Q4 F
@.CurrIcon := "drivingHome";. D5 X7 ]) U E6 O3 L
@.DrivingHome := true;
( ^ w$ I2 ~3 H: _+ _ end;
( b+ V- A2 U8 B; f* G/ w& a else -- the vehicle @ is empty, both vehicle and part are in the same dock station% j7 B2 a( P. Q8 N6 s- V
part := @.transpOrder;
4 U3 V7 L6 j# s8 D/ B: o$ p) s( t part.move(@);-- load part
& `7 L; U0 t% z; w ~* c: z @.CurrIcon := "load";
" D- y+ `5 @1 r' G- B- O% c& ]; } GlobalDistObj := part.globDestination;
' \" e. N/ j; v, D assignLObj := rgmanager.rgAssignL;3 Y0 z& a& } I2 ?+ W& |% o
row := assignLObj.getRowNo(GlobalDistObj);7 P; B5 e- P% @9 l
if Row = -1 then -- since 70
" I$ r$ G2 U' G+ W if lan=1 then: U d3 [* N4 P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 G+ z: H* v1 F7 J+ |6 P% ?
to_str("in der Andockstation: \"",?.~.name,"\""));1 ]7 G$ Q0 V O- F |9 w/ V
else# w+ M2 T$ U& ~$ t+ {' k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. y( z1 T# |2 F% t! `: o/ L to_str("in docking station: \"",?.~.name,"\""));
3 Q' R& L/ N G! V9 i5 y+ \9 K' f end;
: @! F) G' i0 N* h: a, A; {0 Q else
. N4 y- F8 x( J$ K! Y @.Destination := assignLObj[1,row];
( H+ |! b* I: l/ v1 p end; $ P" R/ N3 `/ m9 I9 c
newDirection(@);
1 k# S4 y! a6 n! L9 W+ f! | @.HasOrder := true;
5 C& M; R1 w" B- ^! P: w6 ` end;' ]8 H# Z! s: r, g1 y% @
end;7 d7 Y j& X/ _# s
end; -- of the method
( \% p% q* a" e1 O2 N2 V; q |