/* called by: entrance ctrl of the object 'track') v h! |$ k% ^3 ~: F5 [
*/
8 |# H) \' [" _( H5 |+ Ris
( N" }2 v- K0 r# e l0 s- n9 L part, GlobalDistObj, assignLObj:object;row,Lan:integer;! t7 w/ o6 |5 T
do# S+ {1 q ^& e; o
Lan := rootfolder.Internal.Tools.AOLlanguage;( Z' \8 ]3 c: q
if current = @.Destination -- else return" o! D# T/ V/ E9 g$ w" _
then' F& \: R4 A8 ?
@.Destination := void;
. H% O8 N7 U3 u/ [& R6 w if @.occupied then) B' t- u+ i1 g* u' y5 a( r3 M
part := @.cont;" D n% J+ R# y( L
@.transpOrder := void;" f% z M% H U. j7 g1 e) k
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, b' z6 L* [& i7 @9 G @,root.eventcontroller.simTime);
1 o H9 L, A9 T2 k/ [+ Z+ P @.HasOrder := false;
! q+ A& y' k# t) z' W0 B @.DrivingHome := true;
! p. O7 q- n! X" @ rgManager.tryToStartTransOrder;
4 E4 ?* @/ u5 k8 M& M+ \ if @.Destination = void
9 U4 H. N8 n% c) H) ~( }1 d }: V then -- no transport order for vehicle @5 K. J! R I' l" Q) ~
@.Destination :=8 v/ a2 j: f+ H: ^
rgManager.nearestFreeStation(@,track.~);
4 l9 B; d2 |- h9 u2 z1 ~ newDirection(@); {6 D( C; r M0 `, D
if @.Destination /= void then
% h" e# j/ H' w: \ X& i @.Destination.NumReservation :=, N/ }$ S) f" M. u3 \' T( q, O
@.Destination.NumReservation + 1;+ }0 ~; U% m# K9 X4 q @
end;: L( z0 ~0 ?$ [" R
@.CurrIcon := "drivingHome";( h9 N- Y% b1 a$ n; f
@.DrivingHome := true;, w! ]3 k+ {6 e
end;
$ c$ h( Z8 s: n else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ q4 X! W q3 a q; s
part := @.transpOrder;9 S/ ^+ ^) g5 s3 S4 }
part.move(@);-- load part5 u7 c- u: [, @6 C+ c; z, v: l
@.CurrIcon := "load";" A6 E2 ]7 I/ A; b( X8 v- I9 L: v
GlobalDistObj := part.globDestination;
& `- Q S& W5 M* w; i& W assignLObj := rgmanager.rgAssignL;7 d6 Z, t& q7 ^& l1 Y
row := assignLObj.getRowNo(GlobalDistObj);; v- G1 ?& C5 |, e/ [" C7 }0 | C8 G
if Row = -1 then -- since 703 y- O4 x# y( I5 K* r; b) c4 x
if lan=1 then$ k4 M0 |: }5 y) A* F9 x# Q1 o4 u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ ?1 {5 ~" t2 s. ^+ C9 k( G
to_str("in der Andockstation: \"",?.~.name,"\""));
4 D: L2 {8 L2 h1 g% M5 [ else# z# V4 G+ {- ~4 ?. m, u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) P; o n4 q Z1 b to_str("in docking station: \"",?.~.name,"\"")); - D4 z x$ j1 B$ e ]
end;
/ w% B i$ t% E' E else
; p; g, I4 C2 `& S% M8 R# D @.Destination := assignLObj[1,row];
+ U" X# I2 o, a; [ end; 9 E3 i0 H! O8 y* t% s
newDirection(@);1 ?8 |8 Z, ~) S9 }. B/ P: ^
@.HasOrder := true;4 \( j! w6 ^. [5 ^, B) E
end;- ~* Z; L2 b: V( ]: t
end;
; v* t* M9 D$ Z( T. c: Dend; -- of the method
$ u0 h l* q0 N# y* i" H# T |