/* called by: entrance ctrl of the object 'track', Z+ z3 X4 r# E
*/
( G: p% D' f W% S1 Vis
: u0 y0 ^( Z% x: j% O* ] F: K& V part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( l4 ^, m" f5 T% ido
0 ~% Q/ z: X6 G* d% @ Lan := rootfolder.Internal.Tools.AOLlanguage;
( a( n7 z! z/ ~ if current = @.Destination -- else return* J, L! N$ z$ i8 p8 ^
then6 d5 K( G2 W/ a* C
@.Destination := void;
: M* y) D m) e: v& N4 k if @.occupied then
' o0 |5 a. m; X" O part := @.cont;8 ?$ i' K4 ^9 B' k9 i
@.transpOrder := void;, I7 A3 Q' A6 b9 ~" l! u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) c; N1 N. v7 o( T* v, G0 V' l @,root.eventcontroller.simTime);
, x$ C& ~: q$ ]5 `8 v* F1 `# a' f' s @.HasOrder := false;
# P$ M1 k; Z; K4 Z2 M4 F. k @.DrivingHome := true;$ D. p$ b% g0 U9 w% Q9 ^! W0 g# c7 ]
rgManager.tryToStartTransOrder;
* z- O( W8 f! `$ E7 k3 H1 y if @.Destination = void
. P" {* L% k# G, d0 m2 z# ] then -- no transport order for vehicle @
( v) F6 ~, j1 q @.Destination :=
, F! W; _: C# N V5 O: m& M rgManager.nearestFreeStation(@,track.~);3 H* N; X7 L5 v- [
newDirection(@);
/ x6 f( l, W* k1 P- z5 {4 e if @.Destination /= void then
2 J+ Y7 g$ ]2 [( I' b% b1 D5 N+ S, a @.Destination.NumReservation :=
% ?4 h# F# a4 _. m& ^& i! ] @.Destination.NumReservation + 1;& \3 {- {2 \. e, S$ z5 c: m- D
end;3 H( r- C; n. ~6 y7 K
@.CurrIcon := "drivingHome";0 T* k+ o2 N7 w( H' I" b
@.DrivingHome := true;
) { x. r, ~3 |* e6 K G0 b end;' p+ _/ J" E8 c( l% ~$ O' Y' n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( t. X1 s" D: A, u6 a3 y
part := @.transpOrder;
" F7 l) V8 G6 f, v' ?, j part.move(@);-- load part# M4 I0 A1 d+ G+ S3 ^' A
@.CurrIcon := "load";7 l, l* a- r5 j$ u
GlobalDistObj := part.globDestination;
# q9 n. B. \/ _/ y' o assignLObj := rgmanager.rgAssignL;
) D2 O& r0 q% d row := assignLObj.getRowNo(GlobalDistObj);6 s+ X$ b v2 ~7 m6 T- R
if Row = -1 then -- since 701 q. [4 g. }5 H+ v% \" w& v
if lan=1 then
( i+ \8 @4 j/ K) ^% r6 }, t8 j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), C8 L. h$ \( L+ U
to_str("in der Andockstation: \"",?.~.name,"\""));
" H2 A, u; p8 o: w& ^9 q else E: T4 X; \- Q" O5 n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* c5 S9 ~2 e! \
to_str("in docking station: \"",?.~.name,"\"")); % B6 \( h( L( X1 e
end;
; `- x' }5 P( I5 o/ w) F y# F9 G else' o( H8 S; v2 t6 N5 q; L, W
@.Destination := assignLObj[1,row]; |5 A( e! {+ J+ M' x. [% M9 s
end;
7 ~7 j& W% z+ o* Q* f# b2 Y newDirection(@);
) w3 P- [6 N0 J$ c9 U @.HasOrder := true;* F' |0 H5 Q6 Y! D6 m# _) t
end;
% M0 ~" Z( `# q9 j. X end;
+ ]3 ]) o- l8 N; x: J# @0 P! D) yend; -- of the method
) {, M+ ~% Q# v |