/* called by: entrance ctrl of the object 'track'
; R% a6 Q% a+ w( ]*/5 \# s0 x) z; \- I
is
4 B4 a$ }7 J5 P8 r; W part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# ^: i( K$ j/ m+ H. Z7 Rdo
! ^: b( l9 h4 f/ z9 A7 W" T3 f Lan := rootfolder.Internal.Tools.AOLlanguage;0 H% I% w/ W! e" O: A. Y2 G
if current = @.Destination -- else return; y* l; @# Z! q
then
2 x( S8 N3 @ X, o @.Destination := void;5 U9 V9 Q- ?, q, O8 ]
if @.occupied then
& Q: u2 d6 }: r part := @.cont;
9 {- t8 a% L4 u9 S, p0 e' Q' m D @.transpOrder := void;1 V' c: h) `& B) J: }5 N G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; B. X( m1 r* ]
@,root.eventcontroller.simTime);" r, V. r) e6 Y5 [8 q
@.HasOrder := false;
5 \& e, O9 q6 e @.DrivingHome := true;
2 p: b j# T* a+ ` rgManager.tryToStartTransOrder;& ~5 g0 r: N" W9 T |( h \
if @.Destination = void! c2 F7 @( |; t5 K/ N1 a
then -- no transport order for vehicle @
& [" R# O0 @/ ~* I- d @.Destination :=/ [9 C4 f R0 S4 O. f
rgManager.nearestFreeStation(@,track.~);# d6 S$ y( b/ q' c$ ^ b
newDirection(@);
' \) [# U0 W) O6 \1 I* f. w if @.Destination /= void then: a" Q* d: {- q
@.Destination.NumReservation :=
/ k) |9 U0 c0 ` @.Destination.NumReservation + 1;2 D: [3 w1 O# B& \* Z' y" {9 x
end;1 B/ N6 V+ z* P1 \2 r) p$ a
@.CurrIcon := "drivingHome";0 G$ r: t8 i, G
@.DrivingHome := true;# c4 }: H1 H7 l9 d% P6 \
end;
. I" V+ B4 ?6 Y ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station" ]' Y' B( v$ U* ~. w( O9 G/ L
part := @.transpOrder;
5 `, r( g6 b# O; e9 l" \) [ part.move(@);-- load part* ]9 p6 z* D Z3 p% s- b# d- E& r2 H
@.CurrIcon := "load";5 {# ^! ?+ W- |4 t. A+ u
GlobalDistObj := part.globDestination;
. U# w! t6 V) y0 ]- m( X0 K( x; L2 R assignLObj := rgmanager.rgAssignL;
6 ~( Y- P0 f0 S( I0 [ row := assignLObj.getRowNo(GlobalDistObj);
- A! w- r) `5 H/ `$ U ^; h4 J% \ if Row = -1 then -- since 70
% w2 R; m( l, }9 B/ c) I" |! y if lan=1 then
- s# u0 D+ b8 F% U: z& y* P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 p9 G( ~) E3 P* b$ O' v
to_str("in der Andockstation: \"",?.~.name,"\""));
/ a. B. c0 S) }" R- B9 [ else
; w- u4 ]1 y+ }& J! A u; i* { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& d! i4 r: K; H2 G. v9 g4 L
to_str("in docking station: \"",?.~.name,"\"")); 9 B8 j1 p( j: j2 V/ z7 v/ i5 J
end;4 Q7 Y9 [9 M4 K5 W* i
else
; e& K6 Y& L' z: @" u% ?% r' C @.Destination := assignLObj[1,row];8 p2 ~" o1 D3 Y) L
end;
8 K0 p. Q& ]( k9 W# a6 U7 B newDirection(@);
- G& R. m+ r0 D" y% }/ X" T @.HasOrder := true;, A9 n8 D: o; E1 t" t( q& @% t1 ^
end;; p) A! H" S( k s
end;
( B. f0 k2 \: U4 P4 w$ Iend; -- of the method
( l7 k- ~% x7 T5 | z r# h |