/* called by: entrance ctrl of the object 'track'+ v% d) a2 J0 h9 l
*/
' N3 L/ u, @# i; h# @8 n/ pis2 y- V( e4 p! v# q6 l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. P; x4 } m. v' w3 Ado
/ `0 `! D6 |; ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
" Y. C0 c& R8 Y# i8 ~* _ if current = @.Destination -- else return
! X6 m( C7 K6 x' C2 ] then' d& J" H# Z2 P
@.Destination := void;
3 e7 r) u$ E3 B if @.occupied then
* l/ J5 r0 s4 D; N part := @.cont;
9 L3 M8 f$ S) c5 S7 T) ?. M1 A5 R @.transpOrder := void;
e' R; {9 I0 E& n i. t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 F- I1 G; c/ }0 t( c @,root.eventcontroller.simTime);
4 Q" z% N7 M# U7 ?0 A; T; {9 e @.HasOrder := false;
/ Z2 h3 Q# g" \ @.DrivingHome := true;
+ \0 h: ]5 }. k+ c* h1 x: v rgManager.tryToStartTransOrder;4 \* L! c2 f9 L: E
if @.Destination = void
% @8 {* f7 ^$ j* } then -- no transport order for vehicle @
f( A! y" b7 r' p: l @.Destination :=# M, |8 Y/ O- o; T8 t
rgManager.nearestFreeStation(@,track.~);$ q" D- U* i0 G' ^* `; l% n
newDirection(@);
3 n" e( N* f0 E/ p1 Z: P2 ] if @.Destination /= void then& i* M8 p5 x+ ?
@.Destination.NumReservation :=+ a( u+ m* i5 {6 e @& g: I# I$ g
@.Destination.NumReservation + 1;# l8 S+ s2 V/ d: V) J/ B
end;4 t* j% P# q7 Q' j6 {+ R4 `/ Z
@.CurrIcon := "drivingHome";- K0 q0 B+ k. ~0 b
@.DrivingHome := true;) \& @6 D( u* l; a
end;
( k+ B! ^/ T: [" p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: m, Y& ]% ], I D6 f) w part := @.transpOrder;
6 p. I+ V u; W5 s7 X part.move(@);-- load part; ?8 h2 w) b" i7 W. ~8 D
@.CurrIcon := "load";
6 F6 I9 q3 p Y. m# T. |$ [ GlobalDistObj := part.globDestination;0 J& N7 _. ]& d9 \
assignLObj := rgmanager.rgAssignL;; a5 f7 k3 g0 r& {# l: u2 @( u
row := assignLObj.getRowNo(GlobalDistObj);' X7 D- `- q( {9 k
if Row = -1 then -- since 70. R/ P" k# x4 o+ k
if lan=1 then
$ l, x; {$ } q1 K6 s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 H- ?9 w' a: l% Y0 P8 |2 x to_str("in der Andockstation: \"",?.~.name,"\""));' @! \9 J' e6 V* V
else
/ k: n" D) m3 S; P7 x7 B. D; N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ l. P; g& P, B1 Y- ?' a. a- e to_str("in docking station: \"",?.~.name,"\"")); - p# _, K6 y7 r" F: f9 t6 I
end;
& H) ~3 X& f! a! x5 s5 |& y else
( ]0 X+ U" i5 z! b7 z5 e( U @.Destination := assignLObj[1,row];
3 g2 h& y- r: k! w end; % a/ V6 }/ h( n4 B' [, g
newDirection(@);
/ R0 p6 X9 r( p+ z. p/ t @.HasOrder := true;
^) j ~- Y9 Y end;
/ L0 l) [* R5 [. d! l1 N end;
% j) `9 \" c* Z2 t1 q% Qend; -- of the method
2 Y, G K. q! }9 X' |9 x3 U2 E |