/* called by: entrance ctrl of the object 'track'+ E( ~+ n; S5 I- d
*/# c* f+ n+ l6 _( m9 v4 n
is; P! E! ]2 H3 u: U( h! ?8 B0 Y3 L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 e8 l# |( k/ X, F. k
do
+ K* G0 ?+ m7 U; d' D Lan := rootfolder.Internal.Tools.AOLlanguage;
9 `1 G/ C* U1 `. K if current = @.Destination -- else return+ q5 M) x9 S: P& ~* x
then
8 P z$ G |- F$ ?$ z @.Destination := void;% ?" o. K( R4 k6 e- I
if @.occupied then
. I& D9 M, {, D N part := @.cont;
! e ~" B' K" d6 ~1 A @.transpOrder := void;
# \1 H+ ]1 b4 O R W/ m* u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( W4 q1 d+ i$ P, ~0 i# r @,root.eventcontroller.simTime);3 X0 i) M1 ?9 H" m' ?* `% a3 h# D4 B2 H
@.HasOrder := false;
) y3 \7 o5 a2 D0 X @.DrivingHome := true;+ _0 n$ t; S t/ s& M' u
rgManager.tryToStartTransOrder;+ h" o+ W# e6 u6 r7 o2 T7 Z$ d
if @.Destination = void1 ]3 Q# }( B$ A1 [/ s2 Q
then -- no transport order for vehicle @
5 E! p$ Z5 u0 Z W( \6 R @.Destination :=
+ \5 d1 J2 y. U rgManager.nearestFreeStation(@,track.~);" M, q& Y- x4 \9 m" ~9 ^
newDirection(@);
: {; z4 I% P9 Q2 \( U. v if @.Destination /= void then
" P! n0 D1 ~/ s% a @.Destination.NumReservation :=
9 y1 M9 k. _1 Q* Q5 R0 ?* I8 x @.Destination.NumReservation + 1;
7 R4 r; {5 y5 Y" b* G8 z end;( ]+ U3 A: x: f* j! q: g4 H
@.CurrIcon := "drivingHome";% s8 j: o& G; ^- G9 R
@.DrivingHome := true;
7 ~1 i. ~4 x) [! n$ e7 l end;9 R6 \5 }% m& p, O; b# p- z" `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* K5 \7 _$ _ B9 @ part := @.transpOrder;( H1 [- o5 f- h5 K; x5 V) G
part.move(@);-- load part4 G9 ~! w* i; z$ N5 s ?- B* r# E
@.CurrIcon := "load";/ _( v* H1 R% P7 }
GlobalDistObj := part.globDestination;
3 b6 T! j& ~( ]% d9 C4 X. { assignLObj := rgmanager.rgAssignL;/ K( B7 @5 \9 o2 q! \. \
row := assignLObj.getRowNo(GlobalDistObj);
7 T( \$ F1 h5 B# c( ` if Row = -1 then -- since 70
- d2 `. n3 U1 s. y9 f if lan=1 then
. d; j" x6 |& `8 _6 Z" s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! Q$ X! A9 w% Z% k0 s to_str("in der Andockstation: \"",?.~.name,"\""));
5 B4 e# x( ~0 u9 |3 n- _0 X else2 O/ |0 g# z: y" E" T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. U: P, Q* B/ G% N( b {7 R
to_str("in docking station: \"",?.~.name,"\"")); ! K0 r& [ P4 ^2 B
end;. e" h' ^. X8 a: _5 d" J/ {: `9 p
else, R9 z" {$ [5 \7 I( E0 X
@.Destination := assignLObj[1,row];2 q% G) k% L2 f5 L( v' y7 p7 Q
end;
R( }, {2 O9 W( F newDirection(@);
M* T) G. A- j @.HasOrder := true;. r# ^ j/ g4 q
end;/ r' l, Y# s4 [7 h
end;
! B/ g+ y0 q5 X4 A+ ~! Qend; -- of the method% v% L% W) S) x% U. r- ?. \
|