/* called by: entrance ctrl of the object 'track'
% d$ n6 j- U0 D*/8 G& Z' ~" [0 b% {: e' e
is
n- `8 o+ d( D/ a9 _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# U" c+ O* A1 N+ y, M, ?9 pdo
9 z8 C4 d. S7 B; ^/ }) r. [ Lan := rootfolder.Internal.Tools.AOLlanguage;# a! ?9 u1 q/ i5 [* l2 J% P1 A
if current = @.Destination -- else return
. ~, Q: E5 i' _0 ? then
! f+ e% v% |- s% i; Q @.Destination := void;! Q2 ?! | R# x/ \2 C9 x( U$ F* U) ?
if @.occupied then8 k1 B. S7 k7 C5 m8 a6 P' o% C8 A2 R
part := @.cont;& t/ c# X+ M3 y( `
@.transpOrder := void;; @' ]; `* V; M) [8 {' k x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 `, m8 U1 Z- {& k
@,root.eventcontroller.simTime);
9 F5 `. M% Y9 {: R7 c @.HasOrder := false;, {% i/ \3 Y" l5 ~/ D" n5 [+ }9 r( Y6 @
@.DrivingHome := true;
; y7 z# o- ?6 A0 l- t! r8 X rgManager.tryToStartTransOrder;+ F1 _- L' C! l- p. s0 y; _
if @.Destination = void
, p2 C, {" {6 M/ V" ]) K* A( e then -- no transport order for vehicle @
! ^0 P# y; m9 Q8 S& U4 D8 R+ l @.Destination :=3 g$ B' V8 \: i: S& p0 \- A
rgManager.nearestFreeStation(@,track.~);
/ `, J/ e1 c! }4 R& m newDirection(@); / S2 L2 X; f% u: |7 ~! X
if @.Destination /= void then
, s$ c* y8 L2 n4 g( E9 l @.Destination.NumReservation :=
4 L' o1 L4 ~9 Y: o$ A- J @.Destination.NumReservation + 1;. v& j. S( i; E# d N, t
end;7 _5 n* t2 s$ N& F4 M0 @3 W" h1 p4 j0 d
@.CurrIcon := "drivingHome";! R% P5 T5 k; [- z* V) [' Q7 \
@.DrivingHome := true;
0 [9 U- z1 B& z1 v5 B! O7 k, Y end;$ y' B' C+ S5 ~5 x0 g! T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& H: C2 x7 q1 G( a, [4 b+ P- _
part := @.transpOrder;
( E0 Y' g5 K; z* m9 z7 i4 a part.move(@);-- load part
) Y9 Z) l1 R5 x7 a/ ~ @.CurrIcon := "load";2 c B4 a# N+ m6 i2 z5 `
GlobalDistObj := part.globDestination;: K5 N7 W5 s6 g9 n+ ^
assignLObj := rgmanager.rgAssignL;. m7 U0 n1 d- R6 z7 L
row := assignLObj.getRowNo(GlobalDistObj);
1 P1 s4 z' A; s if Row = -1 then -- since 70- \0 ?/ Z& r2 W
if lan=1 then0 v$ }/ E( Y" Q$ o, P( x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) ?6 l6 Z5 H- [ to_str("in der Andockstation: \"",?.~.name,"\""));
) x% k' ~- }; I# P' x' m! s# m3 Y else
, V6 y8 d) B' ?# `3 _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# Z' m. X; h& n1 E5 T1 X
to_str("in docking station: \"",?.~.name,"\"")); / `2 m, y, m- M( n( B4 f% \, ^
end;
4 ]( ^3 ?3 c6 L/ q else; l* S- L: C4 z7 [" Y
@.Destination := assignLObj[1,row];
7 X$ r" t+ V2 u! p$ T end;
' o0 f& Q6 Y8 P! u newDirection(@);9 [2 u: U, n3 X1 ?; N( }' r4 ^
@.HasOrder := true;
9 M; G, k7 @8 P- A2 V+ `( i( H end;
$ f H8 ?' x1 @ end;
; G" X- I8 b) R& e3 Yend; -- of the method; [/ M: f* m) B8 O( J: `+ B$ ]8 n
|