/* called by: entrance ctrl of the object 'track'
) @+ l( W$ z A7 }*/5 r# t$ |1 Z o& u0 |0 G0 U
is# g7 U) C( i" F% M, A5 U8 Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 `9 H" z- a- t1 T2 Z
do
' Z E3 f) t/ R% q, f Lan := rootfolder.Internal.Tools.AOLlanguage;1 \" |9 \5 `4 S, u9 H2 q7 v- J
if current = @.Destination -- else return
7 L. U7 ?% v$ s then* |" u/ R0 {( c# K' X% d1 ~
@.Destination := void;# E* F( R d q6 m
if @.occupied then9 u' I4 q4 x. V
part := @.cont;" \* \) Q- H& T5 L7 F
@.transpOrder := void;
% T% ]' p, \4 C+ d6 S' ]7 b$ U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 y# V# I) j2 J) a# {- t" D @,root.eventcontroller.simTime);
! Z- V4 k9 |8 k; C/ q4 z @.HasOrder := false;
# i" V. {/ z3 Y6 @5 Q @.DrivingHome := true;: R3 X" k' d1 E& X+ d5 z; _
rgManager.tryToStartTransOrder;" C0 W) d( i6 d( g# j; W8 O( N
if @.Destination = void
/ f. k6 f5 p4 a3 {* R1 @ then -- no transport order for vehicle @6 X: u' [7 A$ w. R+ j
@.Destination :=
" S' h7 R {7 k$ c! f5 b rgManager.nearestFreeStation(@,track.~);
' r9 M8 _3 @1 n1 h( b' r; `7 |/ o newDirection(@);
( L) C. {* H) f2 q/ Z if @.Destination /= void then
6 w4 O+ M7 ?, F! H# O1 u @.Destination.NumReservation :=
" t0 {2 P' \; p: R9 j! J @.Destination.NumReservation + 1;7 e7 a9 y' a! ^8 f3 \ {+ B: s. {7 n
end;
8 O" E* l( v% d @.CurrIcon := "drivingHome";
Z d3 @; Q& S& r( V" X0 E, L @.DrivingHome := true;
@( ]: }- A: H7 X end; r5 ]- h" ~# n0 u; _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. I! f7 E2 T. ~! _5 Z* F
part := @.transpOrder;
2 r# f4 m, }' N- Y0 i part.move(@);-- load part
: U# f; w: L- j: u" g6 t @.CurrIcon := "load";
' S5 C5 w1 N: O# g" q GlobalDistObj := part.globDestination;
4 c, R$ N( C( i% ?2 E assignLObj := rgmanager.rgAssignL;2 n& E- p$ `( C) N
row := assignLObj.getRowNo(GlobalDistObj);& z' X: |- X/ v H# y( Q6 ^
if Row = -1 then -- since 70
; n- ^7 I8 H# c* n2 l' x1 [( G if lan=1 then
, [; p7 L: i1 X% X* S7 ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ U% z9 o O! O( V: T
to_str("in der Andockstation: \"",?.~.name,"\""));
( Z- ]5 {4 M% y5 C0 y' |1 f else! V2 r. s) x& o" b) R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 ~2 _( s; o o; { to_str("in docking station: \"",?.~.name,"\"")); 1 Q: N# S" z8 F6 f
end;7 ~/ D9 |; X/ H; h
else
% R1 s* k E: ^ z @.Destination := assignLObj[1,row];8 B2 [$ [$ q0 d$ n/ L. H& Z4 S
end;
1 B$ q/ u& X( M% d newDirection(@);
3 R5 b- a7 q+ x6 J. B3 y @.HasOrder := true;
- e2 M' u) }6 `1 B5 R' b7 t' ^ end;3 g! O; c5 y# I, r8 t
end;
. ?' c s" e+ _end; -- of the method
2 p$ Q- F9 i6 n, X8 h* A& [. s |