/* called by: entrance ctrl of the object 'track'
3 G9 d5 Q: k q1 J*/
+ n% M' q2 `# S; C6 Eis
) }- L5 C) H6 R7 q( o. P- ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 b( {8 U$ S0 R
do# D( {0 [# H6 P% z8 b
Lan := rootfolder.Internal.Tools.AOLlanguage;5 i n( ^" G! l) Y# ^7 J" P" Z. J
if current = @.Destination -- else return
" M2 u. Z/ k& R then
9 v1 v: O7 G" }5 N, O1 d0 k @.Destination := void;
2 R* A- _" r @ if @.occupied then
% i/ \) Q- I5 Q: Y5 ~ part := @.cont;
7 d; H9 s+ M- E. {5 ?# {/ g6 Q3 u @.transpOrder := void;
4 c( {7 X9 k: w" S" E! a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ b9 y" S, o8 I g @,root.eventcontroller.simTime);
4 W' i. R: h6 n! c( F' @" u @.HasOrder := false;' D) h+ Y6 c4 Z. }
@.DrivingHome := true;
* E7 E5 d- o( i, O4 z rgManager.tryToStartTransOrder;
7 s; z, i4 I0 h9 o# }0 Y) | if @.Destination = void
! j7 H6 I& v7 G% B* ~" P. u* c then -- no transport order for vehicle @
1 G" t7 o3 O5 H6 o @.Destination :=- x3 B1 a7 _0 [( V+ u3 T3 T
rgManager.nearestFreeStation(@,track.~);
, q# m6 v t S/ K. w8 c newDirection(@);
0 Z. Z/ M$ P9 `* M/ K if @.Destination /= void then1 @& Y. {- r; x2 F1 O: s3 d3 p
@.Destination.NumReservation :=# z, W5 A. O, L
@.Destination.NumReservation + 1;
& x' y% @3 ~# {4 x; z end;
9 r- A; z# L1 s! C! }) @0 g9 f @.CurrIcon := "drivingHome";& c& \" H9 J0 F" `: q
@.DrivingHome := true;
. Y" v; x; ~4 @" {/ A1 A end;" w9 ?, s% Z+ A3 q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 U1 T& X6 H6 L
part := @.transpOrder;- v5 w0 ?: z8 L2 n# k
part.move(@);-- load part
% T2 F% y1 S& J, n; d% {$ W: q3 C @.CurrIcon := "load"; {) Z! p2 B; F& ]+ ]- R
GlobalDistObj := part.globDestination;7 c* A8 d8 w+ u1 a9 a5 K) {# g
assignLObj := rgmanager.rgAssignL;
2 y1 t$ y9 U! v$ N; M row := assignLObj.getRowNo(GlobalDistObj);
3 _- k% A# ?! ^& N$ `: @- h0 i; K5 o if Row = -1 then -- since 700 e, d1 G, Y5 m; S2 G9 V
if lan=1 then7 E X" I/ R6 i/ `; F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% Y+ u) g- y# K' N: @9 x/ D/ Z9 c to_str("in der Andockstation: \"",?.~.name,"\""));5 f( w% w1 @6 I! h* {
else
, |9 z2 v: \8 @4 u+ e8 i& o0 ^" B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 u" y/ J5 O$ V" ~; I& P. J to_str("in docking station: \"",?.~.name,"\"")); ! H' e9 Y) Q6 ]
end;
3 p0 }, S0 e6 P" q+ X* d1 B else5 z+ I. W/ n& {' q( E" S+ L( u
@.Destination := assignLObj[1,row]; H9 e# F1 {1 M/ g o: [
end; # C( G9 Z& z" Z. P* R4 N- Z
newDirection(@); P! U1 y. _% k0 h; v s
@.HasOrder := true;
0 S# u7 C1 d' T M' m& [ end;
- y* L6 G% j! S! L# E D end;
5 g. [, P- l5 |end; -- of the method6 F M- K+ M% S8 G m- \ z
|