/* called by: entrance ctrl of the object 'track'
; H4 j3 ]" B" x* u# K: t*/8 k( B) E6 ~# ]% X. M
is/ \% x' D* g$ D! L5 F2 e1 z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# K( F, Y+ r! g5 J; Z0 U5 Wdo
e0 i: H. s4 r; ~9 _9 V# r& C; M( ?9 e6 f Lan := rootfolder.Internal.Tools.AOLlanguage;4 v. ]6 P. L" ]4 H2 X) a
if current = @.Destination -- else return
( Z: b, O% ^* P then* r" D8 ^0 b8 S/ O7 I( Y; f. N
@.Destination := void;
% T" D/ X$ z# ~/ g I$ i- A if @.occupied then# \, e3 u1 n& @8 \
part := @.cont;
2 K+ M$ G' } ]+ Z @.transpOrder := void;
- W5 q; P- K: _' ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ A' ?0 {# W: ~" A0 t! z# B8 s" B @,root.eventcontroller.simTime);$ A% S G" V2 R5 ?( M
@.HasOrder := false;
4 P1 v5 s9 o) d0 ^ @.DrivingHome := true;$ L& e3 v0 E' _' A% u' Q0 P! s
rgManager.tryToStartTransOrder;
3 `5 m# n$ I$ q2 n- F! d' g if @.Destination = void' a2 E) M% v1 K0 p1 L& o& h1 {2 S1 b! C
then -- no transport order for vehicle @5 e, A' R; \' S; c, U
@.Destination :=
9 o( G8 q0 i" y6 N0 P$ A rgManager.nearestFreeStation(@,track.~);
0 X$ H$ V2 n% r) }6 W. D/ G3 M newDirection(@); * w& z# e2 k5 F) D
if @.Destination /= void then
: q6 n; |) L }% O3 @ @.Destination.NumReservation := K. a7 X' ]3 w5 \
@.Destination.NumReservation + 1;
. l8 j' t4 F( V4 s5 d end;
M( Q2 i/ _1 H8 Y @.CurrIcon := "drivingHome";; k7 r: R/ C2 u0 t/ n
@.DrivingHome := true;
# @9 {) o8 J, ]) M* T3 K- m end;
" m; `& O/ S9 ]: Y& u0 Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 N( S( K& p3 Y/ T part := @.transpOrder;
- ~ Y8 D! m3 L( O8 S' ^ part.move(@);-- load part
2 j8 a: c3 F6 k9 R @.CurrIcon := "load";; D! [* C7 D' H: o$ i' R
GlobalDistObj := part.globDestination; L+ a) K1 @" \, W" G
assignLObj := rgmanager.rgAssignL;
# d2 t8 r8 V w9 M row := assignLObj.getRowNo(GlobalDistObj);
8 |2 r' Y2 H" a4 ~ if Row = -1 then -- since 70
! j8 R! r8 Q0 a4 I9 I if lan=1 then
0 t$ A# A# e6 m( C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 d% m( L# L5 b: O- o/ U to_str("in der Andockstation: \"",?.~.name,"\""));
4 Y* { y1 T5 [4 F; m! } else
6 Y' j: N2 n1 x- j% f3 ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 }% o. ]7 T, L X& y to_str("in docking station: \"",?.~.name,"\""));
2 ]8 u7 X" }3 b! V3 I end;
1 ^3 p: F9 o, }5 l! F else
$ P5 T' I I7 o @.Destination := assignLObj[1,row];
( P) A$ R9 {7 p end;
; z" }4 o6 _, t5 t- V0 I newDirection(@);: D: ]2 b4 F% K* X
@.HasOrder := true;. B% ^. A- u( d7 i7 J
end;! C* x6 N* d$ e# B( o% r" s
end;4 ?0 \( V/ Z/ ~9 t
end; -- of the method
: m( \" Q, e- m. |9 a& k |