/* called by: entrance ctrl of the object 'track'
1 ^( V9 \% O% n. s( n x1 [*/ E$ W! i: U; r" c( a; g5 D9 T
is
1 Q. j1 S6 U9 r: V5 q+ i" s part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ X" _" T4 v8 q* P' q6 pdo3 H& Z! F& Y1 r7 S" X7 M' M p
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 a/ R# l( g. N# f if current = @.Destination -- else return
5 z3 C7 J7 g+ T, O$ r# b% `+ h( J then& C9 J: B* K# _5 t& h. @
@.Destination := void;
0 ]& G% t$ P0 t. R if @.occupied then
) x. \* ~$ O, E( } part := @.cont; { c' {7 S7 D7 d" Q! f
@.transpOrder := void; [+ C0 W3 o$ t) K1 h T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ }3 |6 z! H/ w4 n
@,root.eventcontroller.simTime);
$ x7 a x8 |8 n2 P. u @.HasOrder := false;
& `8 p; }- g9 w6 A @.DrivingHome := true;
% w' n9 _" [8 K$ N: r' e rgManager.tryToStartTransOrder;
' N" H+ y' u3 ]! T# v6 G# Q if @.Destination = void3 h9 T0 A B# B3 e
then -- no transport order for vehicle @
: m5 }; o' b2 d8 C" t6 }" r+ y @.Destination :=
1 k. F' Y6 a: j7 m9 a0 }- j1 A$ Y4 c rgManager.nearestFreeStation(@,track.~);
8 U# |' R5 c( j2 ~. y. Z' R& \/ ~ newDirection(@); $ k( C' B. Y' z; [' r) m
if @.Destination /= void then
9 E( }' W# d, u- } @.Destination.NumReservation :=
: y+ K: Q( R6 c: a& I/ q6 } @.Destination.NumReservation + 1;2 I; a9 U1 a4 y3 `: ]+ b
end;
5 |1 O! B1 t8 }& t- f" W8 \ @.CurrIcon := "drivingHome";! [9 p6 X, l/ _
@.DrivingHome := true;* d& S* a2 _4 \% X4 I1 o* K3 Q& t
end;
2 q* @+ K/ P5 r else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ V& e+ F5 l% i7 ?- U0 c' F% C part := @.transpOrder;. a, s* e1 Z* Y7 S! N6 @ k1 d7 S
part.move(@);-- load part6 Q0 n R; g; \+ h
@.CurrIcon := "load";9 S7 D" @" z1 |6 w
GlobalDistObj := part.globDestination;% {) A7 r4 I% W! |7 w* _
assignLObj := rgmanager.rgAssignL;4 o/ f# D6 y( L9 s3 r& e) {
row := assignLObj.getRowNo(GlobalDistObj);; R0 }8 u) x( |$ H% M& k
if Row = -1 then -- since 70
9 j8 T, a8 {7 t3 D! o1 t if lan=1 then& z7 G) O6 `& C* N# {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 c4 d/ E$ i) `/ q4 | to_str("in der Andockstation: \"",?.~.name,"\""));
. V9 f3 ~& |* }4 e6 b2 X! {& Y% _ else: o! O6 H. o; R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 s1 z4 H9 Z4 f; @
to_str("in docking station: \"",?.~.name,"\"")); 4 R/ ]: b2 D3 x" O
end;5 q0 w$ R8 o8 z: J: B
else1 X& ?$ [% k8 S! y
@.Destination := assignLObj[1,row];
2 s! H/ l: z& |# P8 t% l2 V end; 8 o+ _& V; g5 P9 h- a* a9 |
newDirection(@);
! i8 D2 v! }$ z9 E7 W) W @.HasOrder := true;
* w8 u8 n- ^) A end;
+ a, W* Y% M. B8 f8 p I end;
, x1 X# H7 i9 oend; -- of the method6 i" }7 X, f' U: G; s
|