/* called by: entrance ctrl of the object 'track'! d( ~! f4 j4 Q% _$ S
*/( Q% G: ], j6 d- m) K4 o, \- g
is7 k+ `! y" s$ q* A. e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ g3 u I5 L1 d2 E) cdo
4 r# o8 \4 E- l; g9 ~) u Lan := rootfolder.Internal.Tools.AOLlanguage;/ _, y: I8 `3 P" t
if current = @.Destination -- else return& k" e- T5 b4 \% q- x% @9 \: j
then
' v" i. y( E4 ]+ b @.Destination := void;
0 _7 z* k( c/ S# r( U( W7 {( L if @.occupied then
$ E, j4 e, A. l part := @.cont;
- s! J! U, b" i0 f, i$ |, A @.transpOrder := void;
4 ]% n' I( P/ q& \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' _4 |' t: j$ h9 E$ S+ P @,root.eventcontroller.simTime);
/ c+ L2 g2 Q5 R* r: O& A @.HasOrder := false;
; y5 `* P6 n2 m$ h# s7 W5 | @.DrivingHome := true; R) z1 h9 M' e7 ~5 q' w. E
rgManager.tryToStartTransOrder; H6 X" A; n! ?) |3 Z8 y2 o" i2 z
if @.Destination = void
0 C* s9 v. _4 O1 i O) Y6 M( H then -- no transport order for vehicle @
" O4 w1 O$ [) T+ _ @.Destination :=
0 v% B9 f) U4 n! R rgManager.nearestFreeStation(@,track.~);
5 d5 K5 i7 \# y- l# _/ s0 b" R newDirection(@); ) Z& V7 ]) f' I7 j# }: s' M1 S
if @.Destination /= void then
+ G, b& S7 @! Q @.Destination.NumReservation :=
, G) j# x6 [6 W8 v @.Destination.NumReservation + 1;8 O% L# T) `8 [' l
end;7 A+ y0 G5 a( F! q' E6 L
@.CurrIcon := "drivingHome";4 p9 k3 b* a# U; q7 _. H* f: Z) e
@.DrivingHome := true;
* ^* b9 n1 \& L) I7 Y( K end;# B$ ?4 _4 f: U- v: @: ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 t9 Z4 j$ ?7 @% a+ m) [) @ part := @.transpOrder;2 u. m! ~* ^# x$ l' C5 Y, x6 n
part.move(@);-- load part' m, o1 e# U( D4 x! v' v
@.CurrIcon := "load";
6 \( O4 ^$ T2 u GlobalDistObj := part.globDestination;
6 P+ `( l2 ]7 v( s9 v& Y: R assignLObj := rgmanager.rgAssignL;$ v/ u/ {7 c+ S( w! [5 {8 m
row := assignLObj.getRowNo(GlobalDistObj);! k' {% z( Z# k) o
if Row = -1 then -- since 70$ ] p* B) _. D8 q$ N2 D
if lan=1 then4 Q+ \+ T/ W" G, z5 v% \6 h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* a; U1 o3 _2 E t2 ?! q3 ~. j D0 @ to_str("in der Andockstation: \"",?.~.name,"\""));
0 h5 g- }' K$ U* j) B( M; ^+ D else( o# {; L: }: }, o) e/ [2 S4 X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; V9 W* A& R, O: v) ^
to_str("in docking station: \"",?.~.name,"\""));
2 @& ]" } U9 p' c. O( o$ g0 w. Q end;
0 e: N" W7 N' h+ J' B1 z; X else
' @/ |$ Q8 O; u4 U0 A @.Destination := assignLObj[1,row];
n" j) a: H- p' m/ \ end;
1 k. h& O, |+ {$ e+ \: H6 b2 Z newDirection(@);
. R8 q& R0 u4 E0 J @.HasOrder := true;
9 l N( ~3 X1 A ]" t0 p end;
. d& j' |8 i% p. z) x end;
0 G4 T3 @( D' x, Y+ Aend; -- of the method
% q1 }) c0 l, q |