/* called by: entrance ctrl of the object 'track'
( H: ~" Y+ J9 ^( q* W/ w# I. D5 ]. H*/
( N# ]9 c+ S% U& ?is
( b% v& H/ b( Q' |: }$ E2 I part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 \0 D9 r; V; }
do
% ]4 n' S' q8 G. g( n: F6 u* F% V Lan := rootfolder.Internal.Tools.AOLlanguage;
' U s6 n2 j+ H3 f if current = @.Destination -- else return
/ P4 |9 ^+ Y" X5 _/ H" B then
9 x" f, ~4 V% c6 r+ I3 N @.Destination := void;
: ^1 r4 Y' Q2 ]# }0 n Y if @.occupied then
$ S! d' C( f7 D( k/ _ part := @.cont;( E/ Z# `2 v9 l+ k% @+ d
@.transpOrder := void;% p5 [4 R8 |8 u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* @( K% v- `, ]/ T- ?6 I @,root.eventcontroller.simTime);
& l# {1 R% \" r: H( Q @.HasOrder := false;
; h% Y: l( M" g @.DrivingHome := true;: m# E" O5 B4 G8 N2 x
rgManager.tryToStartTransOrder;
; \; @- _5 M+ M" s# K" \3 x& I' s$ x if @.Destination = void
% Q( ^6 n6 P$ P( \+ B# a2 t$ }" p then -- no transport order for vehicle @
) y% E5 J/ Z5 e( W2 {' D& m% C' ` @.Destination :=
: W; [ [ y5 S5 w- x8 {3 Y9 t rgManager.nearestFreeStation(@,track.~);2 a# Y1 O, X/ {' m, H+ f
newDirection(@);
9 D, S1 h1 e7 w$ |( w. ^2 D( @ if @.Destination /= void then
9 X1 [6 r% L/ x% R @.Destination.NumReservation :=
7 `" b% U' n7 U. ?9 ^4 f% O @.Destination.NumReservation + 1;. I( I7 Y9 j. y; M
end;
! f4 _0 _. Q0 f# n" P% }/ E* N @.CurrIcon := "drivingHome"; b/ Y5 [7 f6 N G
@.DrivingHome := true;
. C1 V2 S9 ?& J4 U' I end;
: S$ ]2 x/ g, H( c, H8 l else -- the vehicle @ is empty, both vehicle and part are in the same dock station& A2 K' s1 N% k9 q; F
part := @.transpOrder;3 m8 l7 d% ?( p' g
part.move(@);-- load part
3 f5 \4 {+ I( P' ~ @.CurrIcon := "load";# r' w" c" x& c1 }( n$ n# N9 f
GlobalDistObj := part.globDestination;
, v$ L4 B9 q4 j assignLObj := rgmanager.rgAssignL;3 Q6 S& w) h" q2 |) ^6 f. ^
row := assignLObj.getRowNo(GlobalDistObj);, x& h6 V5 r' C( r4 f
if Row = -1 then -- since 70& Q' H% B. x7 I; E8 [
if lan=1 then
- g7 I) U/ W4 q+ v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( C1 I$ k$ X, l' z* X% S
to_str("in der Andockstation: \"",?.~.name,"\""));$ J% v j6 q! R+ R6 c; m9 P
else
; A$ M, _9 t( A; n9 m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" R' X& z8 ?7 r& x7 P to_str("in docking station: \"",?.~.name,"\""));
; g8 Z, f0 X9 {9 n: E. n end;, u1 d7 [: Y3 k d9 g" j
else
$ m0 Y1 D4 W1 c7 R X @.Destination := assignLObj[1,row];5 e5 z4 t8 Y$ s" X6 }+ e$ l
end; 4 s2 t; k0 O$ p. K; X* s# y# ]
newDirection(@);
" Y3 M% m4 C4 a0 | @.HasOrder := true;3 Y: K9 b: I0 J5 |& j _& x' @
end;
* W& ]( [6 X7 x2 R- j end;% R O; e5 k! e8 ?& j
end; -- of the method
: G$ l; t9 P$ A3 S; r. X( M1 _" ? |