/* called by: entrance ctrl of the object 'track' Y! M5 q$ ]/ ^! V+ e7 _
*/0 e( o$ H8 }: M: a4 H& c) `! E
is1 A" h+ K) {% _. ~9 u t* U$ k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 P0 ]/ o: }5 ]1 g6 ^/ F+ }do
; x" N1 k) C7 M Lan := rootfolder.Internal.Tools.AOLlanguage;6 Z W* Y. m) A, ~, @2 m3 K
if current = @.Destination -- else return
' W% }/ k0 U8 T0 \! H then4 u, `* ]9 z A! I" e ^
@.Destination := void;. K# E+ h2 b" o2 c
if @.occupied then7 H' {6 O& ]) g8 v E
part := @.cont;
0 f7 q. J' L$ U* v7 H+ v @.transpOrder := void;3 F" {6 v4 q5 M& ] z0 u3 e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 q2 L) b$ ]. ?6 _. E+ j6 W @,root.eventcontroller.simTime);6 z. X0 y+ G1 r- |9 ^ w' x7 y
@.HasOrder := false;
1 I( P) W; q; ?, m @.DrivingHome := true;
J5 Y( @+ i1 L2 K rgManager.tryToStartTransOrder;
, H( t4 Z3 g# D9 n if @.Destination = void; ]- S$ N- F! m! r0 j$ P
then -- no transport order for vehicle @7 X( _$ n5 N& R; v9 L
@.Destination :=5 s3 a% B) m1 y
rgManager.nearestFreeStation(@,track.~);
& x0 Z6 I7 [$ J! m( |5 a) t newDirection(@); $ K, D8 h0 Q5 V# C7 c
if @.Destination /= void then
( i) w$ J& k7 q; ]( I! v" ?$ Z @.Destination.NumReservation :=1 B5 _! _! w F) v9 s# p e
@.Destination.NumReservation + 1;$ j; j) W7 Y$ M/ n) ~7 c
end;
& k. Q0 N5 k( p# {2 c u6 B @.CurrIcon := "drivingHome";
6 Z5 y+ W3 d4 p1 {& I7 r% p( G @.DrivingHome := true;- L {7 A$ C& @4 d' e
end;+ I6 r5 l4 I. W& z8 [, A) O/ ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- g' z1 h! O4 ^5 f: y
part := @.transpOrder;0 k7 d, X, Q( c2 q4 ^9 u) K* J
part.move(@);-- load part
8 v, Z* J( ~, o" K2 n/ v @.CurrIcon := "load";
. b- ?, D$ b: [. w* H: F: L% m GlobalDistObj := part.globDestination;2 E1 Y( E' P9 w8 z. I$ e
assignLObj := rgmanager.rgAssignL;$ p& f S' R6 ]4 Y& ?; X$ K$ W
row := assignLObj.getRowNo(GlobalDistObj);! g2 C4 c6 o7 @& B8 P. I# Y; P
if Row = -1 then -- since 70
: r2 [) r3 } J, v if lan=1 then6 t8 w6 q! G% \/ f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& V' w6 W2 d8 b" e" G S
to_str("in der Andockstation: \"",?.~.name,"\""));
( Q. s! e0 o3 [' ?7 v else
- h1 {7 V# C+ T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 m. [" X* C/ T0 B! t" g to_str("in docking station: \"",?.~.name,"\""));
4 A9 n/ z0 J5 w6 k7 s& d# X end;
6 x1 A- p7 B8 h/ @ else# f G' c7 y T
@.Destination := assignLObj[1,row];
0 `4 S% c- C X5 r# l9 i; F, q( d end; # o5 t0 L! U$ n8 B9 j- O
newDirection(@); i5 G- A& P6 @2 K5 H
@.HasOrder := true;
! D0 N5 ]6 U. I2 ?7 S; R( ` end;: Z w* L% T/ c% y& ]. L3 i
end;
* ]' a$ T" B9 i8 g7 Wend; -- of the method
- T9 Y4 M% }1 p" e6 ? |