/* called by: entrance ctrl of the object 'track'
0 n4 H# h8 X7 |$ I5 c. t*/+ g4 J& |' l+ L1 V; e; x4 b/ A
is. r9 w) h5 i) ?, ^( {, k0 c& {% Y! a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 S, W& C7 u3 E" U1 W& {) W. Q6 C# g W
do
0 c0 E* _7 _5 O& j% X+ \5 `! z8 D: K Lan := rootfolder.Internal.Tools.AOLlanguage;
# y( P1 O/ F: ~ if current = @.Destination -- else return
" S _3 |; ]) Y. _; H then l2 e9 X5 ~) z$ ^- n
@.Destination := void;
# m+ m4 X: G2 T3 Y1 W1 O& A if @.occupied then# _1 d. i9 F, ?! j$ Q
part := @.cont;
# B% v8 F/ y+ m1 N @.transpOrder := void; o2 W" m6 ?: y8 t- u% Q1 l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 N0 B2 a" `1 }2 r: b$ J
@,root.eventcontroller.simTime);
& Y% v% Q9 ~5 j( N) o @.HasOrder := false;
, H/ W, d* z- [0 K @.DrivingHome := true;/ W9 y6 `8 k( L T$ N8 J
rgManager.tryToStartTransOrder;7 R9 J' ]7 d" c9 E* R u7 ?5 N
if @.Destination = void/ u$ _8 v. G7 `4 O
then -- no transport order for vehicle @
/ \/ W7 H4 L) B7 _! N1 S: A; f @.Destination :=
& k! ]4 O P% P/ L$ j5 q& N' m3 | rgManager.nearestFreeStation(@,track.~);6 e- {1 j$ N9 K7 H3 ]9 a
newDirection(@); ) ]7 d* p# L7 Q, a; ^+ O! S; @
if @.Destination /= void then: j7 T! N4 ?* |% Q- Q
@.Destination.NumReservation :=* I5 Z, Q2 k$ h0 \6 l& W# h
@.Destination.NumReservation + 1;
9 \& ^: s" h% J% s5 T end;
% t! E$ |+ M: ?2 a# {5 E6 k @.CurrIcon := "drivingHome";( }1 U. t% ~% Y- `4 B/ Q
@.DrivingHome := true;
; c& {8 Q. Z( W/ h+ g, _5 _2 S end;/ X+ }7 {, X' Y# c6 ~% X2 u7 k' V/ O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ C/ e9 y" k1 u' N2 m/ L( X
part := @.transpOrder;' d- w: k7 D+ G2 Y# M& ~) a
part.move(@);-- load part" X6 L9 |7 u9 W$ `2 J% k4 S: \! i
@.CurrIcon := "load";! [: E0 e4 u2 F7 v
GlobalDistObj := part.globDestination;
: {! V0 C5 s' q2 M. l/ }9 @ assignLObj := rgmanager.rgAssignL;. t4 y @/ J- C! {
row := assignLObj.getRowNo(GlobalDistObj);
/ W a4 `6 w5 S( \( O9 i/ C' F if Row = -1 then -- since 70
! u. r }0 G* @; Z4 {0 k6 T, z if lan=1 then+ U& s4 k; T3 e. ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 b* p! S, V% b4 a; g/ e$ h
to_str("in der Andockstation: \"",?.~.name,"\""));* c& ]) r* s4 s& |5 v
else
' S$ a: Z- Z( K0 P. J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ a4 a5 z/ {0 I+ O7 @0 }1 G
to_str("in docking station: \"",?.~.name,"\""));
' _, W" M/ }7 }& \5 J end;7 y$ K( g d$ l% n" p5 L0 ~
else; c5 ?2 M) [* X/ b
@.Destination := assignLObj[1,row];/ O% a. _0 }; K: E T- x- K
end;
O+ z, l+ ]/ Q, Q$ g/ V+ u newDirection(@);* x" K. H3 ]9 w1 s
@.HasOrder := true;- I: Z5 Q6 \$ H3 X: x/ z
end;
7 L3 f/ \9 C; L) q/ q7 m+ x/ F4 Z+ O end;
& J1 D. {- s$ P8 q% r6 S8 Aend; -- of the method- l! {; E9 Z) u5 ^, |# j
|