/* called by: entrance ctrl of the object 'track'# s' F: q) K8 o" R
*/' t! c' u3 @8 x) g
is
2 y: t% i9 E( t5 E5 o/ K+ \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;! h/ u8 @2 m6 G$ I
do( o7 `; s6 B1 X- `; T
Lan := rootfolder.Internal.Tools.AOLlanguage;
" x, H4 {' F7 u if current = @.Destination -- else return
1 f) C* [# W! D$ r- u# t( \ then
- S% I2 _7 H. m' k% A @.Destination := void;
6 t9 N9 z& A6 Q if @.occupied then+ v# u3 E8 }8 { T* A1 k4 X
part := @.cont;- m/ n3 g: @" w- ?
@.transpOrder := void;- T0 _, a, C" T2 w; b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. C1 C+ b4 b- H) w5 B
@,root.eventcontroller.simTime);8 T: n# S/ _- \" H; N
@.HasOrder := false;
, q6 k; q. P- t, p @.DrivingHome := true;* n' z3 g6 [$ d$ W8 f# L0 O
rgManager.tryToStartTransOrder;
! l8 L( H1 k6 b/ J. e if @.Destination = void
- A) l) j1 s7 ^2 x8 t! h1 [, D then -- no transport order for vehicle @
+ v `+ i/ }# ~4 X @.Destination :=
0 I0 O8 o# [+ p: r$ T5 b; \) Q { rgManager.nearestFreeStation(@,track.~);' a# L) \4 A3 U$ e( n
newDirection(@); 9 u6 [9 _6 f$ c; O) i6 x
if @.Destination /= void then. U4 }: L. k0 \! _3 o1 W
@.Destination.NumReservation :=$ r( d! |1 f8 P% I6 m% Y5 M
@.Destination.NumReservation + 1;
4 W7 I2 m0 z9 D, _. N# h5 H, h' B2 O end;
' b, S& @9 a' y+ i( T L; S, V+ s @.CurrIcon := "drivingHome";
" _1 q8 b' ]( p @.DrivingHome := true;% H( l4 E8 b, i9 }
end;
! O; |6 c: F& q( T* g else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: l, M* L' Y* V. G# M0 n part := @.transpOrder;
; T! s& |! n& q part.move(@);-- load part
+ G3 c1 I/ {$ _+ Y4 l @.CurrIcon := "load";# z$ D f3 G- F/ G2 p e) k
GlobalDistObj := part.globDestination;
- P( C, Q6 g: f# Y" Q( ~, J assignLObj := rgmanager.rgAssignL;, K* n! H/ R4 b6 ^/ c
row := assignLObj.getRowNo(GlobalDistObj);& d6 ]1 V/ C! s8 W9 G
if Row = -1 then -- since 70
- h, k7 X. A, o& a4 K if lan=1 then
" C V2 d+ m8 K+ T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- z' \5 m1 m" I" B W9 l) G) q0 J to_str("in der Andockstation: \"",?.~.name,"\""));
% }$ {+ q4 p }# d, c* t; Q else
# {8 e" I n8 @ z4 f- }* T, X v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; J1 ^2 B6 @0 a7 `. { to_str("in docking station: \"",?.~.name,"\""));
+ V( l: U1 ^0 x8 H2 D. T& @* d end;9 a) \# B3 W4 d2 Q4 @4 O' p
else
6 R/ n/ C- j& {0 Y @.Destination := assignLObj[1,row];! h0 d: r0 X- X2 D9 ?8 l r' a! \
end; # ~5 J' s0 I5 `4 }3 i
newDirection(@);
9 K7 G" D" B" [9 p% G( j( W @.HasOrder := true;
, n& k+ ?& F9 [3 k# g end;( q/ v3 x# B6 D* `- Z& C
end;7 G. ]; y" }* [+ b7 Z! Y( \
end; -- of the method
; B9 V% y3 P2 I* T" H+ S& q |