/* called by: entrance ctrl of the object 'track'
) c( S1 A5 v! \ N5 y K- L*/
8 M) J5 ^( e& u: k8 ~2 y5 U, Tis+ b. `$ j5 T+ X8 S* s4 D
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* I5 C8 Z& j1 n- C. X6 I/ g" o
do
" S4 A4 ~& O+ m1 d Lan := rootfolder.Internal.Tools.AOLlanguage;" Z' w. o% P3 Q3 a# ?+ _
if current = @.Destination -- else return
& ?! t' Q8 v8 D% d then
% K9 `' h A7 i: d: t5 W @.Destination := void;: x6 m! O* p* B$ G* F6 V k1 K
if @.occupied then
+ P# I0 I, `+ {' Z4 @' r part := @.cont;; m8 w& x' j) k$ d2 h) }# H4 V
@.transpOrder := void;
; ^; |( U5 M4 d A& E! Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 l# ^+ b8 Q) m
@,root.eventcontroller.simTime);
x+ [+ V; _: `: [: f/ a# V$ R @.HasOrder := false;8 F2 U: }# Z; S# `3 Y
@.DrivingHome := true;
- N8 c; G$ P- K: {" `! e rgManager.tryToStartTransOrder;. S) _( x4 u% e6 F1 `, S5 m/ T- R3 C
if @.Destination = void
- o9 ~$ X7 D$ N2 @/ { then -- no transport order for vehicle @0 ~8 b" C1 v0 [) c: X2 U5 i8 X4 D: K
@.Destination :=) Z/ c( v( j5 H- E K( Q
rgManager.nearestFreeStation(@,track.~);
- i0 f% ~% t+ g6 |2 h/ B newDirection(@);
/ z- I( v2 b: Z5 o& Y" D if @.Destination /= void then+ U! m+ [6 R9 \9 n; u. ^- u: e
@.Destination.NumReservation :=9 w4 g, ~6 a: U# `- C" ?8 Q, x4 [7 o
@.Destination.NumReservation + 1;; n5 S7 L* |6 a6 [ ]
end;
" X; f; f' ?: [5 W! ~) k2 O @.CurrIcon := "drivingHome";% N. b: b$ X7 T" g
@.DrivingHome := true;9 n3 N; k4 m7 `+ w2 b
end;
0 ^8 g$ Z3 m# {5 J0 U! M% {7 L+ q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% L5 r. L( L1 I: U4 r4 P E$ x part := @.transpOrder; u3 R! ^* T4 ^7 `: z% i
part.move(@);-- load part
% X" _7 Z8 D! y* K @.CurrIcon := "load";2 ^& `' y9 y) `' q
GlobalDistObj := part.globDestination;2 _' a, Y7 W3 s1 E [
assignLObj := rgmanager.rgAssignL;% H+ o; v- Q& n! z
row := assignLObj.getRowNo(GlobalDistObj);! O# p3 \$ `: \% h
if Row = -1 then -- since 70
9 d# _# t; ~" e; G, b/ I# x if lan=1 then* t1 U: n8 |$ {8 d
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ E* \: T$ ?1 b5 W! \- {$ I
to_str("in der Andockstation: \"",?.~.name,"\""));/ k/ M! q; l" E
else* O0 }+ ]; E1 e1 B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; t) R. q6 |1 m2 s7 }, E. ~1 n
to_str("in docking station: \"",?.~.name,"\"")); 1 ^8 d0 c. u/ C5 o5 k
end;
, _6 j# n H% c$ e# ? else
# L# W8 K) ]: p: Q @.Destination := assignLObj[1,row];
1 Z" K7 h2 y* E4 D1 b5 y ? [$ R# A& Q4 B end; ?7 _, }4 F, J. n0 _; x Q( k
newDirection(@);
# x- N- C% n: a5 }3 ]/ j8 E @.HasOrder := true;5 x, X1 ]9 e! V Y9 [
end;
% D! L( ^5 s' F8 D) b end;8 @% O3 a! @; T7 a
end; -- of the method) O7 r& P3 x! c" q" ]% Y* C! k" O: B! S
|