/* called by: entrance ctrl of the object 'track'7 y0 F1 s$ a9 |$ O0 {
*/
, j, V3 p" Z0 Nis
# A- B3 B2 G7 W8 G" p8 V8 D+ J9 n2 v part, GlobalDistObj, assignLObj:object;row,Lan:integer;, M: r! V- ?% S5 [% ~. U4 a3 r7 g
do3 ^( M$ m' b7 E6 F. b
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ H: o3 W/ R q7 l2 r if current = @.Destination -- else return
. Q2 z# A/ [7 F0 t' ?6 C1 ?# c; w. d then( r7 o) O2 e+ w# @8 N" A! R
@.Destination := void;% _( q$ Y% Q+ Y) u7 Q1 p9 T
if @.occupied then
% Z, o- K1 D$ B- q( t1 i2 S, h) k part := @.cont;
9 y5 c9 A/ `. A B: K @.transpOrder := void;
9 w1 ^1 f! O7 x7 k( ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 x5 P) c% R9 K$ i& x @,root.eventcontroller.simTime);
6 t1 f, S7 F/ U @.HasOrder := false;6 }/ h( r4 ~+ _% _( q& c
@.DrivingHome := true;
5 ?3 \1 L; p0 Q* x rgManager.tryToStartTransOrder;
9 u- \1 R; {% J# i- l, V if @.Destination = void0 H0 q/ R- D b7 W& u# _6 J
then -- no transport order for vehicle @/ D6 D4 z7 g# ~) M
@.Destination :=! p7 N) c* L7 @0 v% H
rgManager.nearestFreeStation(@,track.~);
8 h5 R* m, [" k. [2 g newDirection(@);
9 R, N* k5 y1 R6 x9 `2 Z. | if @.Destination /= void then
7 l* C1 A+ l5 ]% b* c4 s2 e* Q8 s @.Destination.NumReservation :=
# X6 B! x' z" L3 G @.Destination.NumReservation + 1;
3 ]; C* o" V0 X! s- C: n+ `0 q* a end;
w( P9 P5 z3 Q3 C9 G% x @.CurrIcon := "drivingHome";+ P1 c5 ]8 b/ z( `
@.DrivingHome := true;
( U3 v2 {& h2 d+ U+ U' Y% X$ ^+ o# I1 ? end;7 ~$ I8 ]+ h3 a7 R) ?% v- c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station V0 h( \5 j$ w
part := @.transpOrder;
d; I! e' ^, P part.move(@);-- load part: h. x+ K! |1 M! W3 f l) L
@.CurrIcon := "load";
2 Q) L- w$ P: Y1 Z. p0 c GlobalDistObj := part.globDestination;1 `2 L0 c: u- v# l! x
assignLObj := rgmanager.rgAssignL;: f9 e; W% `" o
row := assignLObj.getRowNo(GlobalDistObj);
% C* s# Q! g9 [ if Row = -1 then -- since 70! b5 [8 d% _. a/ m( ?4 i, g+ ^
if lan=1 then5 ~% ?4 t+ f) e- q4 a6 V( w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ |% k% h7 v( `2 z+ L; t9 s
to_str("in der Andockstation: \"",?.~.name,"\""));
( `, \/ I- y+ { t5 a3 s else5 L$ B) J6 b$ R" F0 `& H0 c
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! M; r# h, k/ \- e2 y0 e3 m to_str("in docking station: \"",?.~.name,"\"")); # A1 b7 Z+ r" E, Y$ Q+ s S2 Y" }
end;
) n2 r* O- m u% y' z1 P# V* `+ ]4 t else
9 E" c3 N: z0 Z9 C+ Z) V# y @.Destination := assignLObj[1,row];
- i9 ~6 d5 u, Z9 L" B end;
, l6 Q2 P8 b4 G2 d& g1 ` newDirection(@);
' b$ ]% _! P9 k3 Y' B' C8 B9 l( y3 P @.HasOrder := true;% r9 \) x; ~, u' P6 W/ D
end;$ A3 l |" f2 I$ n
end;
) p2 @( M4 j0 x. lend; -- of the method9 J2 E# D( _+ G9 M
|