/* called by: entrance ctrl of the object 'track': H1 X' ~" |3 {4 ]' u
*/
! d% G$ s4 ~8 W% S: l) U2 |* jis
. A6 O. R0 I6 Y1 x part, GlobalDistObj, assignLObj:object;row,Lan:integer;# N& t3 L: }, C3 n. b0 V
do3 t, q& l7 O4 X0 p" F5 }8 F" ^
Lan := rootfolder.Internal.Tools.AOLlanguage;
. k3 t4 `# n! P. ^( u if current = @.Destination -- else return0 w0 z" g$ a, {3 w' q5 X& ]
then" F8 ]$ P. t q; R
@.Destination := void;
+ ]' |3 K( D+ j- f: T5 J) M7 ] if @.occupied then& \8 C5 S# X- T. A) M
part := @.cont;
+ ?; c2 f& b$ `% M; n @.transpOrder := void;
0 k0 ^* p0 {3 }0 R+ H) Y* E+ ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 _ X4 {# k# y, w" W- @
@,root.eventcontroller.simTime);
7 B) u4 @ C0 a0 z O3 H) {" L @.HasOrder := false;0 G" u5 F' M/ b0 O* U/ C
@.DrivingHome := true;/ V5 G( h+ J0 Q# A4 N
rgManager.tryToStartTransOrder;( S' h3 ^, Q% k. r
if @.Destination = void+ ^' _4 K- h4 U2 G
then -- no transport order for vehicle @
3 l1 k+ j' }3 C/ e k @.Destination := R8 B! a; x* _1 n. S6 D
rgManager.nearestFreeStation(@,track.~);
; a, N) n$ x' t newDirection(@);
2 C) e4 D0 k8 P% L' G# h) @ if @.Destination /= void then4 E6 y5 p8 r' p2 t% Z1 I( \
@.Destination.NumReservation :=2 \7 z( z" L! N, ?* c" v& q1 r( V
@.Destination.NumReservation + 1;
- ~% f0 R# H" D. q+ j7 _ end;3 @/ q2 i. `1 H
@.CurrIcon := "drivingHome";- j3 g; i; { K' M/ v
@.DrivingHome := true;
+ h* {* E! g; F7 n2 [ end;
2 s: S s1 d! n; x2 y else -- the vehicle @ is empty, both vehicle and part are in the same dock station& [* w! S8 |) f( z6 I- L0 {/ I
part := @.transpOrder;6 Q& E0 @4 k# q, F
part.move(@);-- load part8 L% w3 [: K5 @3 b, c9 P
@.CurrIcon := "load";
% K0 P/ A. e) ]. C3 o GlobalDistObj := part.globDestination; O4 f) j; l |& I: A3 o- L# w5 i. n
assignLObj := rgmanager.rgAssignL;; ~6 J, C( J7 h
row := assignLObj.getRowNo(GlobalDistObj);
/ N. q+ v6 K( r% o. v* J if Row = -1 then -- since 701 o7 w& q: ^3 q1 e7 t, t& S
if lan=1 then
4 _) w: Y/ Q0 l5 h9 q2 k$ \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' d" m8 g7 y1 j# U to_str("in der Andockstation: \"",?.~.name,"\""));
L+ v, m- ~2 x7 g+ z; n% N% E& P else2 ?& J; w) x- W: Y" f/ P1 E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* O+ o0 i. p6 r to_str("in docking station: \"",?.~.name,"\"")); 5 h, V0 m! x: ~+ {4 T7 @
end;
3 @+ O# L* i5 K else+ q& m# u' ]- Z6 G* w
@.Destination := assignLObj[1,row];& r4 v& ]$ S$ `: B
end;
7 O4 M0 f2 u9 k, w7 Y$ S newDirection(@);
' t2 ~3 f+ V2 B5 o; h @.HasOrder := true;7 [+ F6 V& @5 v+ o8 h5 h
end;
8 T, s+ }% _ B/ d1 V6 N5 R end;
4 [9 j/ {2 j. N( ?* J; zend; -- of the method
# y% h% L) b$ @ |