/* called by: entrance ctrl of the object 'track'; k/ z& P; P# E1 Z3 X
*/. S4 |, s7 b, e Z4 j7 h1 p, r( {
is" }3 _# J/ M- \) y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" m! W) x* W/ v9 W' W3 N9 d) u
do8 {+ Z. |! J3 X V4 j' F
Lan := rootfolder.Internal.Tools.AOLlanguage;4 t3 G3 o& g$ q9 p9 E% G
if current = @.Destination -- else return
) A! N7 H) L! \, x$ H then
; L) n1 o/ J; U { @.Destination := void;
* s- J, S1 y. d4 j if @.occupied then
: Z. H4 n8 q7 s0 E part := @.cont;. Y$ K1 [6 Q' w$ {# Q
@.transpOrder := void;
, j/ T' o& {4 A2 R' }: m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; J) x9 u% B7 h4 i4 c
@,root.eventcontroller.simTime);+ X- y F' k+ S% d) ]3 X& p; [
@.HasOrder := false;
7 h7 m: N- h- A' `2 h7 U; d @.DrivingHome := true;
9 ?% N3 ]$ L. E. x8 I( M rgManager.tryToStartTransOrder;* p3 f8 X* ]2 k/ ~0 L
if @.Destination = void
/ S4 ?/ [7 S& x {* l# u y then -- no transport order for vehicle @1 b+ y3 P- r; A3 P
@.Destination :=
, y2 `0 ?2 f3 H8 O% \# N/ N4 q rgManager.nearestFreeStation(@,track.~);
, O/ b5 B5 x4 I newDirection(@); $ x9 \& h; {. Q' w( v; M
if @.Destination /= void then- T2 R; m. B- V% h: ]
@.Destination.NumReservation :=2 J, c C( f2 ^. z: l5 f
@.Destination.NumReservation + 1;" ^& O- @: A% [, E
end;! `$ }: _ t0 B% \6 z6 s
@.CurrIcon := "drivingHome";
5 Z3 o! [: D" f# U% l @.DrivingHome := true;
% |3 j% P, q$ y! z L$ d end;
( l% r, ]' n( k# I& u* _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% }0 v# [6 N; [. e- l: {4 \ H part := @.transpOrder;
& X6 F9 X5 R3 v8 d* H part.move(@);-- load part
+ g4 {" C7 O$ l5 A1 v% z @.CurrIcon := "load";' V+ \# z$ [; j2 s' S5 K/ X- K
GlobalDistObj := part.globDestination;
. s& n5 x0 g1 e/ t1 _ assignLObj := rgmanager.rgAssignL;: T ~9 h3 r$ z6 ?$ v6 Q
row := assignLObj.getRowNo(GlobalDistObj);
. w( j7 d9 V3 ^5 }' J) X if Row = -1 then -- since 70
7 H0 ?; F/ a) Q& A: h8 X8 G if lan=1 then
: B; u+ d) ~$ G6 w( e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! C% M0 s0 j4 ^% O( x
to_str("in der Andockstation: \"",?.~.name,"\""));( b. }3 M( M0 a# P0 x- q
else
7 m) w: X$ t+ ?& {8 h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), U0 r# R5 c$ l$ \) K
to_str("in docking station: \"",?.~.name,"\"")); 8 L7 m" u" x6 l: l% y8 ]
end;
" t* I I; i6 t else
# ^8 ~" R0 o+ R/ _6 y/ |3 j @.Destination := assignLObj[1,row];& F) Z+ z/ \7 X4 u8 q% P' l
end; # S( S; H9 D+ e" P$ ?4 r
newDirection(@);
# \5 Y( ]2 f5 G: r0 N: P @.HasOrder := true;
& D; |( s& b7 K7 Y( t4 ^3 k end;
7 K+ l) u% T9 p* `4 x& u end;
: C- @5 T0 i* w/ _" i8 b4 U+ m; `end; -- of the method
( y I: J3 g$ O2 i) p |