/* called by: entrance ctrl of the object 'track'
4 u6 g5 E3 [! V! I*/
* Z2 b* ^- D& s1 nis
( k" ~6 c% J2 O% r part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 t( t: S* m+ X# v9 N6 edo
& F# n5 z, s' e, k/ R, b3 C Lan := rootfolder.Internal.Tools.AOLlanguage;
1 K) C& `) r p/ B: ~ if current = @.Destination -- else return
) u8 D4 g9 a9 B. k then6 n( a( H% S% f- k
@.Destination := void;
1 R4 s, I3 k( E( s# c+ o9 n if @.occupied then
" O: k: U0 x _" ^. Q/ K0 o part := @.cont;
* G2 F; y7 \; B: Q- X8 w( g* ] @.transpOrder := void;7 k0 [" w3 T! Q( d+ m: Z; z* F8 m& @6 o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- n- R' j. U! F2 |) O" g3 R @,root.eventcontroller.simTime);
0 c0 ?. g) ?3 b7 ^7 W s @.HasOrder := false;0 p1 `. t6 F# ^/ B- w
@.DrivingHome := true;
h' E- _: Y; K5 j rgManager.tryToStartTransOrder;# A% ^: Y) g" p. U2 Y
if @.Destination = void6 n. y, O V+ l: h5 V4 c* g* _) H
then -- no transport order for vehicle @- k. i4 D3 ^! z* F+ d( W( k+ B
@.Destination :=
2 I8 Z" H; U' {: \2 _ rgManager.nearestFreeStation(@,track.~);
( X& f( D& G' E9 D9 Y0 R newDirection(@); F# |) e: K y4 C1 B
if @.Destination /= void then/ P3 R! Y8 {: b! w; P, i6 S+ y
@.Destination.NumReservation :=
5 s! B1 B7 j) L @.Destination.NumReservation + 1;
1 @! X# {; l4 e4 l end;& B) v4 k! i( S2 c7 @2 W
@.CurrIcon := "drivingHome";
3 v l; u* z6 C# R+ t8 o @.DrivingHome := true;/ W% K+ Z" L! h$ ^* ~1 A
end;
& H; c0 n- _ T5 F2 `9 b" S5 C0 C else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 a& J, B# K- I& c6 l. F
part := @.transpOrder;
2 j+ X# E4 M& [+ f H/ r0 Y: e$ m part.move(@);-- load part
$ A( G2 |; i( k3 L @.CurrIcon := "load";
& D+ O1 D5 x/ N GlobalDistObj := part.globDestination;0 v8 h8 {) ^$ u# b/ }( {- ?
assignLObj := rgmanager.rgAssignL;5 |" q. w2 B& M C& @) D; y7 E
row := assignLObj.getRowNo(GlobalDistObj);: Q5 M3 p1 b Q8 M5 \: J
if Row = -1 then -- since 70
! O- y; d- D$ ~6 @ |) q4 F if lan=1 then+ {; N) P9 \% }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# V& F0 X' `4 N9 z ` to_str("in der Andockstation: \"",?.~.name,"\""));. j; R; j5 A' a! W2 U7 x
else- @) |7 @8 C- x! _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- x5 Z3 C5 I9 s* a) f to_str("in docking station: \"",?.~.name,"\"")); ) {$ J2 p* U) u+ o
end;
& p6 ~" j2 ]5 K0 h; I9 Y( ~ else
9 [( k+ S0 a4 B1 p6 h1 t @.Destination := assignLObj[1,row];! u, g& k. O/ F7 Y
end;
2 J3 f5 I5 W! K- T newDirection(@);
) C% ^. w8 R; \ D$ z$ O @.HasOrder := true;
! m6 n/ v( ?4 v/ P end;
# M1 V$ R, w0 q: S0 \# D end;
3 j8 u+ S2 l, }/ C# Xend; -- of the method
}- }8 F( ` R& V" y: S+ F |