/* called by: entrance ctrl of the object 'track'* R8 X& u$ L$ c9 I
*/
( F7 O/ m9 p% z5 D# l3 M8 E) W9 [; yis% K5 r& I% \: T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( t, d. O. ]/ sdo
9 x. ^# K, s2 u& r+ I Lan := rootfolder.Internal.Tools.AOLlanguage;
1 H) @* Q5 A9 G3 p% D, ^4 A if current = @.Destination -- else return4 n1 j) r8 J" ?9 |: ?3 k& Z
then
' A: G! G( m* b ~0 @1 Z/ R @.Destination := void;: S* S: w# f: O
if @.occupied then
9 [; i8 n `: b* n# ~ part := @.cont;
! {. L5 n) g5 N! X* \: D6 K8 }$ q6 j @.transpOrder := void;
/ n: @) Q3 L. i. X7 \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 b1 O6 X0 e; K% P- O
@,root.eventcontroller.simTime);6 y; [$ ]- D x: U& U7 M$ @
@.HasOrder := false;2 Z$ E) T S; r7 P5 a
@.DrivingHome := true;
0 F8 b' v! e% G rgManager.tryToStartTransOrder;1 V# H. H0 g6 [5 d- H& W& n' L1 C
if @.Destination = void# O8 s, ~; l) f1 m
then -- no transport order for vehicle @ n8 ~4 k5 g5 d; s* j
@.Destination :=
4 t# J! ]8 m- R1 T3 L9 c3 M rgManager.nearestFreeStation(@,track.~);
/ w! v- R1 G' D/ b, g [# j) F newDirection(@); 3 i. ?8 d9 ^+ G) v7 n- M& C
if @.Destination /= void then3 k' h2 s- v" Z
@.Destination.NumReservation := q: R6 w0 Y2 n9 U# k/ `
@.Destination.NumReservation + 1;
1 V, D9 ^6 `3 T0 ~. T0 `4 h end;' p+ c9 g* x: J: X$ v
@.CurrIcon := "drivingHome";; z- M. y; v Q8 d
@.DrivingHome := true;3 s# L( D! s; D
end;
' C8 u1 c. T: } R& B$ b1 t1 I else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 }% v4 z- ?. U: m part := @.transpOrder;+ I' H; R0 }( C! z) D" r/ x
part.move(@);-- load part
/ g F2 z, p9 X* ]$ @! i. ~1 P0 x. ~ @.CurrIcon := "load";
% [" F) T1 C' D- o GlobalDistObj := part.globDestination;
/ p0 G3 J" k6 r8 m& i4 s7 | assignLObj := rgmanager.rgAssignL;
3 a: U9 ~ C) l2 k% T# ? row := assignLObj.getRowNo(GlobalDistObj);2 h+ r3 b0 ?, |. r8 f
if Row = -1 then -- since 708 E6 v9 c; |+ g$ F: G+ h: j2 ~
if lan=1 then! v. D }6 y- j: ~; F% P! _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 U: C( |0 K+ c4 L to_str("in der Andockstation: \"",?.~.name,"\""));5 M; X$ A6 b( i2 A
else* D. `# d3 ?- ^! W, Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 e; T1 ~9 x$ A. w* p to_str("in docking station: \"",?.~.name,"\"")); ; O4 b; E2 F* L4 C7 ]; x8 v5 b
end;7 q0 S, b' N4 p N: a
else
8 T0 F% K6 K2 _4 t" B# d% i) w" w7 q6 k @.Destination := assignLObj[1,row];
' D& x& F; y0 c" |0 \- T end;
w! I: u) X! M: { newDirection(@);; K1 t. A- [$ I# V8 s/ n7 H
@.HasOrder := true;
8 [/ `# [ E4 x0 d+ z. v* o5 | x7 a# c end;
1 c- g, [+ G) \' S end;
- p- A9 ^( J; y9 I& a- vend; -- of the method# G) c, D* E! Y
|