/* called by: entrance ctrl of the object 'track'. R h4 S7 E; L: c$ ~) M
*/$ ~+ d0 K' A, R6 J/ U3 U0 c+ f& U
is4 z6 P6 O' b( G4 m7 j) ~) o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% p. P: C, x% }' e9 s5 Ydo9 G* n7 ^. C. F) f1 p# t( @
Lan := rootfolder.Internal.Tools.AOLlanguage;7 S" i5 f+ E) s$ R( F( P
if current = @.Destination -- else return
5 u" U1 V/ \7 A l+ G& u" l then ^5 N* L7 J8 h! U: z$ Q
@.Destination := void;
+ D$ m" T. k7 I5 s- ~ if @.occupied then
6 r9 n; _+ |3 K part := @.cont;
u. F1 U- ?) i! B! [% _ @.transpOrder := void;9 u* i; _! |# k3 W1 T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) \# G# T5 J8 V4 b% w
@,root.eventcontroller.simTime);
. i; [+ R' Y/ c1 v# A @.HasOrder := false;0 V/ Q9 i! L9 R* C+ o7 B
@.DrivingHome := true;# z& y Q6 Q- A- U
rgManager.tryToStartTransOrder;* M1 A3 \9 O h. |% s' Z5 { ~* q
if @.Destination = void
! y! J! s6 E: I) e then -- no transport order for vehicle @% o5 }. @) f8 {* p5 ]
@.Destination :=/ O, D" P9 a; S. ^" D3 S
rgManager.nearestFreeStation(@,track.~);
0 j5 A- q+ Y% o0 C* X; u0 \ newDirection(@); ' [2 E) k+ ?, f9 B: e1 m9 u
if @.Destination /= void then
& K/ W* b2 U" ?' v; p" d b \ @.Destination.NumReservation :=3 r- ]& v* u/ S
@.Destination.NumReservation + 1;
8 _4 O/ g# \6 x( J7 ]; g8 u5 Z$ p) G; M end;* n" _( j" }$ z3 d- J3 @- @
@.CurrIcon := "drivingHome";
) ]/ s* M3 A6 |: R3 A7 z! A @.DrivingHome := true;: W6 H& q; Q( U& R2 u$ K7 ~$ R
end;; {1 Y" H: d7 K8 M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ D& i \0 G* y) y part := @.transpOrder;
9 {" m. B: a s7 C. q6 q part.move(@);-- load part4 E) _: e! W# @' C
@.CurrIcon := "load";1 }+ Y0 t/ w* o2 U6 f
GlobalDistObj := part.globDestination;$ h' F$ v$ A9 }& ~* x# n. X% L& ?0 j
assignLObj := rgmanager.rgAssignL;# `6 r6 \# v1 O
row := assignLObj.getRowNo(GlobalDistObj);
+ M! p9 F, {5 L1 E; b if Row = -1 then -- since 706 U" L* R2 S P; {% q# T: b, m A) x
if lan=1 then7 Z$ B0 X1 g1 A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: ^; ~, {, U6 }6 j {& } to_str("in der Andockstation: \"",?.~.name,"\""));
+ @* O; t5 w; n else1 E% ^, X& y! i; a8 B/ Y& d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. q1 x8 v- f2 ~
to_str("in docking station: \"",?.~.name,"\"")); & \, M( \& }" h& q
end;3 @" Q6 t. q# K* G' m7 K# g
else
2 Q' t2 d' w. Z3 p9 w+ m. u+ M @.Destination := assignLObj[1,row];/ H' ^ D; e" c0 e6 u, r
end;
8 e5 C2 Y1 V& e3 R5 r) N$ L# O newDirection(@);
7 d5 B! f2 X0 z" L @.HasOrder := true;
) S5 z9 H5 m. s) E0 o end;
. J1 M) ~& K7 Y; W9 z+ i end;
" G* B1 e9 I- y6 kend; -- of the method
2 D* q% ?6 j9 _9 X |