/* called by: entrance ctrl of the object 'track'+ s4 `* W: B2 H# d
*/
+ e, T+ @4 S) x' @2 s" S. Dis
Y, L7 p) H0 w& e/ N1 d part, GlobalDistObj, assignLObj:object;row,Lan:integer;- J5 I2 A' o/ V9 ]$ k* `
do n. n7 O! t. _
Lan := rootfolder.Internal.Tools.AOLlanguage;
* \/ U: b4 [1 z- M R# y3 V if current = @.Destination -- else return, t# F9 b! C" E" S
then/ K7 B! N( W5 [
@.Destination := void;( V0 c7 q' X" m# C: M$ B
if @.occupied then
# s. s, i s# e) M2 U' X3 U part := @.cont;5 p+ F* C: [- Q0 ~0 Z: p
@.transpOrder := void;4 {* a& Z6 T% ^8 I' d7 `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, B5 C2 [, ?8 S
@,root.eventcontroller.simTime);8 h1 m- ~, z, ?. g) k Q
@.HasOrder := false; Y) t; p$ N0 }* E" Y
@.DrivingHome := true;( u; D& w5 _" f/ r! Q
rgManager.tryToStartTransOrder;
, q4 b0 \1 h- i/ u- Q" M! X if @.Destination = void
$ b, e+ j& `( { F& ] then -- no transport order for vehicle @
! y' l' C3 F" s( n- U( C @.Destination :=
7 G/ z2 L/ G$ u6 D3 \: j4 J# Q3 Q rgManager.nearestFreeStation(@,track.~);
5 s; K- l5 Z9 a _3 @ newDirection(@); 2 R' N0 R% d! @) ]; C. Z
if @.Destination /= void then
8 ~' d, m' b+ O5 Z) e @.Destination.NumReservation :=
$ ~) g- H9 d& _5 z9 W @.Destination.NumReservation + 1;
8 e4 z# u! m2 [2 m# T end;% v* d6 d+ R1 Q& O& `, j6 A V
@.CurrIcon := "drivingHome";9 d6 b' w6 p$ @" z, |, V U2 t; c% R
@.DrivingHome := true;: c( N# n S6 ^! C$ p
end;
/ X5 H" _, m2 O8 j3 x# B2 ^- d else -- the vehicle @ is empty, both vehicle and part are in the same dock station& K! H5 D# F/ m/ C) @, [6 X
part := @.transpOrder;2 I/ v) l& b8 C( k$ P
part.move(@);-- load part4 W% g, F% ?5 U% A2 g/ d
@.CurrIcon := "load";4 t, ?; ^% {) N! R# j. _- F; \
GlobalDistObj := part.globDestination;) v+ d# G7 p$ A7 i) \, R( A7 u
assignLObj := rgmanager.rgAssignL;
% n* `7 L- E0 @; w row := assignLObj.getRowNo(GlobalDistObj);" Y6 c( N, e! d# \
if Row = -1 then -- since 701 l( y' R" P6 p' v' }* t2 b6 i. V# Y
if lan=1 then" A H. W6 b2 U2 r3 j; n u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," @* `$ }- J( C5 G4 p2 H
to_str("in der Andockstation: \"",?.~.name,"\""));) Y. x: K7 t( c$ t. J1 c8 d
else
/ p* W8 R& x7 ?8 c' P5 ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 m! h; _: Z5 y to_str("in docking station: \"",?.~.name,"\"")); 6 u; S1 y6 e9 T a
end;
1 W1 `) e$ G* S* R$ Z: _/ ~ else
; }6 k# y$ `. ^, S0 K+ g) H' j: D% N @.Destination := assignLObj[1,row];3 N; V: R6 [; j9 g* m5 T/ f/ G
end;
' p7 b8 |5 \+ Q, p+ { newDirection(@);+ V( c8 y. L4 L
@.HasOrder := true;! Y Y" Z& _- u1 C `( d, g
end; X. n: {! D' Z% s. u4 h, ?8 w d
end;
: ]* E l. ?& {; a9 d( mend; -- of the method
, |* k4 l* g7 \+ C8 G% J, D |