/* called by: entrance ctrl of the object 'track'9 W/ O0 m: l1 K" {, `
*/" A1 H0 q6 J+ h
is
* b6 f! j) Q6 ?5 [; c5 m) [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; i3 x' C4 ~# e1 c* i% \9 q. ddo6 m0 |- B" k2 f' t
Lan := rootfolder.Internal.Tools.AOLlanguage;$ p3 ~% ]# n% T, O* s" J3 O
if current = @.Destination -- else return
* n( O) F/ }( C. i3 J) M' l then4 D2 z2 }# K( m C0 L
@.Destination := void;7 R6 D) O2 v3 s# W8 C
if @.occupied then
0 s" u0 q9 ?! V$ C part := @.cont;( W+ p. c% B6 A
@.transpOrder := void;- M. m" k; L0 I' [3 l2 E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, N9 K/ T, F* n @,root.eventcontroller.simTime);
" T: F# t3 t9 v% ` @.HasOrder := false;( x+ T$ L* g. i5 v1 r% s
@.DrivingHome := true;
/ D% q$ }- q5 m rgManager.tryToStartTransOrder;7 s' u7 j0 i. r3 {
if @.Destination = void, {% j; O' i4 M$ e, m5 @
then -- no transport order for vehicle @0 A" {9 h! z4 i
@.Destination :=5 @6 s* Z" v; Z: a
rgManager.nearestFreeStation(@,track.~);6 Q; e _1 _ n, b/ W$ W
newDirection(@); 1 ]' {7 ` c+ z
if @.Destination /= void then! \6 O4 Z# Z, A% I
@.Destination.NumReservation :=/ [8 T0 B5 p9 g6 B! J* A
@.Destination.NumReservation + 1;
% {# Y* _# q8 @* s: O2 [ end;4 _- i; G0 Q5 c: X5 B
@.CurrIcon := "drivingHome";
- I0 K0 u1 Q: [; |; u @.DrivingHome := true;
* v% p9 H' o- R0 u' w5 G end;
- ]' x% I5 B! n. z9 @% p else -- the vehicle @ is empty, both vehicle and part are in the same dock station. w9 n1 s$ b# L4 e1 z
part := @.transpOrder;) t- v) g; d! V
part.move(@);-- load part
1 e g" j) N. g4 m0 q& F @.CurrIcon := "load";! G8 S5 {1 J0 z5 F8 F# Z
GlobalDistObj := part.globDestination;
+ W4 Y2 o& X% a assignLObj := rgmanager.rgAssignL;
) f" t8 {) [: }) x' y# b+ X row := assignLObj.getRowNo(GlobalDistObj);
6 `0 v8 u7 m$ e9 R: _, z if Row = -1 then -- since 70
: g" {9 C$ l$ g3 x: `) j if lan=1 then
1 X8 y% r7 u9 p5 I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# W* }6 v7 R6 i4 R5 l! U
to_str("in der Andockstation: \"",?.~.name,"\""));
' C5 E1 ^8 e; W$ P3 Z! s else
. _6 {8 X$ s) L. V5 y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 h2 r" Q3 [: A7 T3 L! \ to_str("in docking station: \"",?.~.name,"\"")); N6 j8 w; ]7 h @5 K) _
end;
" a5 q8 m. W" J8 n7 s8 h4 p4 T else) S' W. `+ ]' W# D' {$ s
@.Destination := assignLObj[1,row];
* D7 h; S& Z2 }3 v; ~# @9 z* @ end; # |$ J ?8 Z, U# R4 g+ }
newDirection(@);
8 n; [4 J( M! x @.HasOrder := true;- R: y6 `$ q& r1 m
end;) j6 U# R1 g* I2 S' E
end;( y* K& ~; }% t* s, Z z4 U- y) K
end; -- of the method
, F; s& Q7 v$ C% A |