/* called by: entrance ctrl of the object 'track'
8 @0 B0 V6 q$ y( {- }*/" i5 o5 C7 m. j2 y
is( x# P u( \- h! ^* g4 ~0 p* k( p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 y% i- K# ~# ydo7 z1 P4 `6 f: O; C
Lan := rootfolder.Internal.Tools.AOLlanguage;4 G' V7 D9 T2 X% p
if current = @.Destination -- else return5 W7 t8 z+ {' G
then7 g0 o# q5 E' x9 U2 i
@.Destination := void;; b# q9 z4 e- `: F- y1 @; q
if @.occupied then
4 Y4 J: F1 _! p( q" p7 U! g" e0 R part := @.cont;3 `$ f9 a6 X: P/ ^6 u" G; ?
@.transpOrder := void;
8 d+ ^0 v& {7 L' v- t% w x$ k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' b- u2 u- H/ w+ B- }$ j
@,root.eventcontroller.simTime);
1 N; P4 W$ h# V( x( t @.HasOrder := false;
3 e' Z) H$ Q7 S @.DrivingHome := true;- U3 K( n) u& F5 W
rgManager.tryToStartTransOrder;4 R9 Z2 K. L: y
if @.Destination = void
1 H" ?% B" e, n# Y. p then -- no transport order for vehicle @5 [8 z2 t" B% S$ n/ d- b4 U9 Y1 @
@.Destination :=: ^7 m* _5 Z! m5 M% P
rgManager.nearestFreeStation(@,track.~);/ b: ?0 A ?; o# l* S
newDirection(@);
' t/ N7 @& c1 [/ V+ p3 Z if @.Destination /= void then
# n) G, w, J8 x* U+ y @.Destination.NumReservation :=0 k0 V' a* D) ?/ j2 S6 V ^2 S: v# N
@.Destination.NumReservation + 1;
% Q" R8 Q, h" j& P- _7 p. X, ~ end;, t0 j6 c& n7 T- p2 r3 s
@.CurrIcon := "drivingHome";" C/ c0 C7 \2 O+ I/ w8 {6 H% ?
@.DrivingHome := true;
6 @+ W, M$ W6 d1 d$ u! z end;" P9 X' c6 F# ]% k1 k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. N0 b2 C- v A4 i! c
part := @.transpOrder;2 E, C, P- c9 M3 @) | x$ F9 y0 H
part.move(@);-- load part, L! B- {" T$ R1 R; [7 E9 e
@.CurrIcon := "load";
+ p: f- d2 X. {2 M$ Y4 j GlobalDistObj := part.globDestination;
2 t G% Q) P7 ]; o2 r7 {! o9 A assignLObj := rgmanager.rgAssignL; A( j7 H2 f7 m9 j# ?0 s
row := assignLObj.getRowNo(GlobalDistObj);
. w( M9 x! E5 a8 e$ A if Row = -1 then -- since 70+ n' o" B' v S# D% O( R, f/ a' d
if lan=1 then9 Z+ ~4 K% }: g h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. n4 J+ p7 m- g0 c to_str("in der Andockstation: \"",?.~.name,"\""));1 I* U9 b3 I1 Z1 \' X
else( E* _6 l; `/ c1 }. ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" r: H5 }, n, y8 a( s+ A to_str("in docking station: \"",?.~.name,"\""));
3 x v6 y; o! |5 F. R8 k end;7 }: z& R0 A; U8 H/ D
else
9 p6 ~) } j% @/ |& v @.Destination := assignLObj[1,row];# S: C9 Y" h; M( B
end;
U2 _. X' f8 }5 B. D$ p newDirection(@);
9 [2 g- R# q/ K" \2 g' S& l @.HasOrder := true;
0 l q; Y! z, `, K7 { j8 w1 V end;
- G. J* }1 Q& d Q end;
0 z0 v$ n- `2 G# |2 D& g1 Yend; -- of the method
' y! T. C+ Y- P4 B |