/* called by: entrance ctrl of the object 'track'
6 M1 ~$ G- Q- L# m u*/0 F) B( Z/ i, s }* i) Y; n8 `# c
is9 O6 N& o# b6 c, T/ [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 l, C7 X8 |# v/ c. Ido/ i# `1 S( [& [$ u
Lan := rootfolder.Internal.Tools.AOLlanguage;
# x* C# ]4 J3 z if current = @.Destination -- else return
6 c6 a5 ~3 L0 ]% ~4 K' A) ? then
9 D- c% ~+ A$ W @.Destination := void;
/ L' r1 H! J0 V3 p7 ^ if @.occupied then
, B: b1 r6 J! W. J; Z( b part := @.cont;8 c. C _( X$ w
@.transpOrder := void;5 Z, p- g, T7 m* @3 ~. w: Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ b! c0 ~3 ]: V7 o
@,root.eventcontroller.simTime);* _* z0 B) p1 v% I
@.HasOrder := false;
; l# \7 e* ]1 m @.DrivingHome := true;
, m4 I+ |" ~) d0 ?* z rgManager.tryToStartTransOrder;
5 a9 r% @* O/ t; P7 a8 p) d if @.Destination = void8 K4 e/ a/ s/ j" a
then -- no transport order for vehicle @
' w1 k9 j5 V @$ D# t5 e; Q. l @.Destination :=
, \1 I4 a7 \ A) p- B: ^ rgManager.nearestFreeStation(@,track.~);: t( d5 B, q: Y0 W: w' T% p
newDirection(@);
9 ~6 v" x, {: C/ ?, |+ X8 d" { if @.Destination /= void then
/ C% [; _ g+ } @.Destination.NumReservation :=
) s1 ]7 q& y( F" r @.Destination.NumReservation + 1;
. J' D% G l0 m end;
w& B0 u+ B8 W% W8 B @.CurrIcon := "drivingHome";
7 g9 D( Y; z, B* c @.DrivingHome := true;
# I S- L& A* }7 V! ~; n0 F end;% J+ U/ E3 k% f0 d) Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( b9 L: k. P2 k# H part := @.transpOrder;
+ {8 t) t5 [' T- `/ b/ Z part.move(@);-- load part$ H/ h1 L5 j0 T" t- z2 U" a& F
@.CurrIcon := "load";
9 H$ f- w$ q1 y Y) K" X GlobalDistObj := part.globDestination;
" V0 l' z8 @+ H4 N2 _ assignLObj := rgmanager.rgAssignL;
; O, y: _4 y0 T4 Y5 }# T/ G row := assignLObj.getRowNo(GlobalDistObj);
0 j' T! S( k% {& Q/ c if Row = -1 then -- since 70, T2 d/ H0 |5 [
if lan=1 then' u7 x; D& I7 j4 l& {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# v4 ? w" m+ y8 ~9 {: C
to_str("in der Andockstation: \"",?.~.name,"\""));/ a8 C1 g; X5 t. o
else
' U+ z# W/ `/ b$ q& R/ j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), Q o3 E/ L( U
to_str("in docking station: \"",?.~.name,"\"")); , ~( ^+ r) P9 h( q0 N
end;5 n5 w& }* W0 A P. I' a1 Y
else
* W2 @ m5 ^: e. C5 b! r' e @.Destination := assignLObj[1,row];
0 R7 d' D$ Y$ D( M8 G end;
! I, E: R1 ?; P8 H& R# G6 { newDirection(@);
: m9 C* W! \6 | @.HasOrder := true;
, [6 S$ Y+ [/ |* F1 d+ ] end;
+ q7 J' T) s2 ?1 K end;
* c" B# _0 `+ xend; -- of the method
) X. [ }5 x2 U |