/* called by: entrance ctrl of the object 'track'
2 A+ n! b- J& ?9 r0 Y*/
' e2 t+ `6 E/ i+ u! Iis" i& v2 l3 ]2 q6 K" w4 M% R( t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 |% ?7 j( g+ W% y
do. [- z0 Z0 R' Q$ w! w
Lan := rootfolder.Internal.Tools.AOLlanguage;! F% a9 n9 o2 n- d9 ^0 x
if current = @.Destination -- else return
5 A5 U! q% P" u; K9 f5 D8 |4 ~ then
, U1 p5 z) \. u* y @.Destination := void;
* x$ B6 v* |" p1 x1 r+ j" W if @.occupied then$ }( C, P) Z; u; V. ^
part := @.cont;* } o7 R" o7 A
@.transpOrder := void;7 g1 k; A9 \0 p6 p# g, I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 X ~1 s6 H8 K/ \& q+ s5 x1 j. D
@,root.eventcontroller.simTime);& C* A8 X( b j# }, t% i8 O" Q
@.HasOrder := false; R2 W# Y# V4 X- j
@.DrivingHome := true;) ^ w9 @4 e( @% j( i
rgManager.tryToStartTransOrder;& h; y2 s) E: S: r7 N( K8 U
if @.Destination = void0 E) k& x" |& H8 ]
then -- no transport order for vehicle @
( g) z- }# C1 @, X# x/ T2 y @.Destination :=
* @' Y! y! l M, ^& k rgManager.nearestFreeStation(@,track.~);+ ?7 Q5 g7 R R
newDirection(@);
, n; t% ~% J9 c' o6 t! m6 X/ j if @.Destination /= void then
4 C' x$ x- w; W+ u' P$ U, g @.Destination.NumReservation :=
1 n$ F8 \/ h% e( L- G0 F @.Destination.NumReservation + 1;$ ^$ c0 w+ ~1 _6 w \
end;
- {+ g" `* ]' C! @' e+ P @.CurrIcon := "drivingHome";
. }- ]& N8 T+ N" m( x4 G: G: a4 | @.DrivingHome := true;. F& I& |9 f& |" ^$ H
end;4 w7 y2 q7 q. @1 t$ ~/ I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( Q( e( b! o, i) p4 R. O+ y! U part := @.transpOrder;5 [2 f( d1 j, d) H: g; a1 u
part.move(@);-- load part
; V/ o0 B- z. U9 k @.CurrIcon := "load";0 r" \1 u: a9 }5 n3 B5 n" m
GlobalDistObj := part.globDestination;# N( {+ i$ B4 `5 q+ h5 b- D
assignLObj := rgmanager.rgAssignL;
3 j$ c/ K2 u! D/ E, M% [8 P+ V row := assignLObj.getRowNo(GlobalDistObj);/ U/ V+ ~: k- f1 K
if Row = -1 then -- since 70
9 W7 e* c% d' Z C( z5 l. _+ B if lan=1 then
. w( o4 W$ i6 U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," c6 Y/ L$ n* M3 s
to_str("in der Andockstation: \"",?.~.name,"\""));9 y( ]3 k# Y: d! A" z8 L
else4 I+ s4 ^6 I0 h& F/ f0 }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) e; S9 ]& O. t* C1 o/ i
to_str("in docking station: \"",?.~.name,"\""));
' T0 n5 Z2 C2 e+ E W end;" e- d$ n. l# y( v6 y+ B
else
) ?# Y8 K& C% K1 ~, `' R! q+ } @.Destination := assignLObj[1,row];5 a; p9 i. S& V" N, ?( |
end;
4 N$ K1 ^- C3 \3 T- k2 n: _ newDirection(@);
/ s* }3 q8 A8 |4 E @.HasOrder := true;
& i+ h& ^2 u0 z0 A8 Z' c end; |5 p2 \( p) h8 b
end;
4 W. N% N1 Y* u6 H; yend; -- of the method
! N% E$ f+ ]) U/ T1 L" M1 m) t |