/* called by: entrance ctrl of the object 'track'6 Q. h7 f6 i( l7 ]5 e) L
*/% F' g' l9 d8 P0 i% d
is
, y' z K3 ~* x" } part, GlobalDistObj, assignLObj:object;row,Lan:integer;* c& [! Q, J( F: E5 t3 F( t
do8 F! {, M9 r! J# P9 u1 f+ L
Lan := rootfolder.Internal.Tools.AOLlanguage;
% b3 Q- i% e4 ]: E3 r, f5 C8 v, E if current = @.Destination -- else return' o6 Y6 F* z2 x6 b+ P
then
& T! V' B7 k; g- @8 @6 c" Q* r0 c @.Destination := void;7 }1 m* U" _+ M: a2 G
if @.occupied then3 g5 Y2 h9 d; l: t, [! r# K
part := @.cont;
9 y6 h% b5 h: T @.transpOrder := void;0 f6 s+ d( N- v8 S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 c- c) e, g) s
@,root.eventcontroller.simTime);
9 s: z; _2 [2 w) D3 `& L9 p1 s @.HasOrder := false;. w- y; K6 B3 f- r0 r" J# C# Y
@.DrivingHome := true;
) ?# X, m; r* Q7 Y rgManager.tryToStartTransOrder;
2 D( f3 D& V. k& h if @.Destination = void8 S7 x2 U# D% l4 {, r' g" N! L1 E
then -- no transport order for vehicle @$ m: b. c2 `- N
@.Destination :=
, j V% a" V. R4 F: X. A3 i0 k8 }# o } rgManager.nearestFreeStation(@,track.~);: h1 {& u4 f9 w
newDirection(@);
Y* F$ v# k4 v/ Z7 D) A% r, T3 t if @.Destination /= void then7 o _9 L; _* `3 v/ W( z4 A
@.Destination.NumReservation :=
3 E- x1 Z% C2 c: j6 S( m# Z @.Destination.NumReservation + 1;
9 g G6 h g+ `: N# O1 e9 J end;
5 `2 M2 o* h, L* P @.CurrIcon := "drivingHome";3 H# ?! j7 J) f: L, g' }" Y
@.DrivingHome := true;
$ l( o* e3 \- p: I2 c end;( }% G. P7 r% z2 ~8 ?7 u' l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# W* v+ i2 A5 K4 @0 {( y. b3 c
part := @.transpOrder;5 W- D/ F. Y; X5 R9 a4 R8 B3 A1 W
part.move(@);-- load part3 P) S7 c: J2 X$ e
@.CurrIcon := "load";1 B! ~! s) A) g, ^4 o
GlobalDistObj := part.globDestination;
& k; Q4 R, }; B7 F assignLObj := rgmanager.rgAssignL;3 _; P) q8 p* w+ |% s/ h" `
row := assignLObj.getRowNo(GlobalDistObj);
7 {- }- x& ~$ O% m; \; l5 o if Row = -1 then -- since 70, I1 P7 Y$ D9 w, Z9 O; x; g
if lan=1 then
2 { P8 A$ p& D# N; _, N3 v! ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, j! e4 q) p6 ?4 `5 A T3 K. h to_str("in der Andockstation: \"",?.~.name,"\""));! Z) d) @$ p4 r6 l4 Z
else) m$ R5 S" l8 D: g# f$ a. E3 \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ U: H8 k* ]. f+ H) T' x to_str("in docking station: \"",?.~.name,"\""));
0 ? p- e' N* q5 q7 } |1 M; ~" A( ~ end;& S/ X- f. z. L. K) V0 R1 {2 f
else
! ]4 ?" B/ _) ^5 ~ A @.Destination := assignLObj[1,row];0 A' z) u6 R6 c$ V9 l; G7 D
end; ! S; X& ~; r4 ?9 u1 ^
newDirection(@);
4 Q/ v: y( ?! I& B: x @.HasOrder := true;# O, c+ n5 W% {6 v% e
end;
' G: }+ z/ w% r1 Q, A end;& r3 C" S. T7 h* |- ~# P5 `9 ~
end; -- of the method
8 i0 R# H4 {8 w! S6 G$ ~4 t |