/* called by: entrance ctrl of the object 'track'4 Q" X( E& p" ~+ N0 R2 h
*/+ o, I. @! J( Z+ k
is5 k2 t" m! u& j8 {2 Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ G- E% B; t6 `$ edo
1 e6 `2 X. q9 }1 z1 U p Lan := rootfolder.Internal.Tools.AOLlanguage;$ j6 O6 d4 U6 w; i2 y
if current = @.Destination -- else return8 Q+ v7 R$ h% H; B1 o
then
! ?" j6 N$ F" s. p0 e1 _ @.Destination := void;. q* U0 ~! c4 O4 ?0 C/ P- j" x: T t
if @.occupied then( O( F# W& U% K y* i
part := @.cont;) d( Z8 l$ I" X8 q
@.transpOrder := void;8 Q5 j$ U3 K2 N# H" R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 |( @) C! A( z$ k } @,root.eventcontroller.simTime);
7 D# u+ m* `/ _6 a; G" Z* n4 {3 y4 U @.HasOrder := false;5 n! p9 K/ i/ t6 L/ d
@.DrivingHome := true;* }1 f4 t; F# B3 D7 w& P6 l$ j0 H
rgManager.tryToStartTransOrder;6 w! H1 u* ?7 y4 V9 E5 I" x9 a0 I
if @.Destination = void6 n2 @8 p! J& Y: i9 B3 U
then -- no transport order for vehicle @
. M: B2 Y% |$ n$ r U# v9 ^+ J @.Destination :=8 v$ O9 b' E' K
rgManager.nearestFreeStation(@,track.~);
( p+ O- {% f8 Y3 t: m, c) |% T6 [ newDirection(@);
3 F& r5 y0 |) L, t% K' {' J2 _! m if @.Destination /= void then e# l2 W( O. m) H" x1 i
@.Destination.NumReservation :=
# P9 ?, U% w+ N" ^ @.Destination.NumReservation + 1;
6 q' q+ L9 \* |/ G1 R7 T" [: D6 Q end;
# a6 q* _0 r+ O0 v# _ @.CurrIcon := "drivingHome";7 P% n$ a% a0 n+ E6 H+ R5 ?
@.DrivingHome := true;6 M% r# k4 ~* d4 a
end;
4 a( z5 O, `* x8 x; ^6 G) I else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 x) T3 @: P( k' W; e8 l$ C+ x1 N part := @.transpOrder;! F1 d( I- V$ |' g4 m2 _: ?+ x
part.move(@);-- load part
/ ~% Y: x& h4 C5 c* f+ w @.CurrIcon := "load";: h/ B+ w2 s) S4 ~: V+ n
GlobalDistObj := part.globDestination;$ s( V t2 x" m
assignLObj := rgmanager.rgAssignL;
0 o' _' C' }3 y7 g8 X- o2 n, h row := assignLObj.getRowNo(GlobalDistObj);
8 s+ X6 K. `2 m2 Y) g if Row = -1 then -- since 701 P; l: q- X8 m9 n5 k# D4 t
if lan=1 then0 r1 O$ _, k9 Y7 V' o9 @7 i" X h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 d/ f/ @. h: y. d9 }, r" | to_str("in der Andockstation: \"",?.~.name,"\""));+ Z& a% G! W5 V' ]* d) B1 E( i7 ^) a
else
" a. J) O6 T$ B7 S# \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 D p" X6 Q; F7 H/ T
to_str("in docking station: \"",?.~.name,"\""));
% v+ z6 @( m7 M' j end;1 a9 _0 p) `, N# B* |
else
( w3 k1 D y( v3 G! d @.Destination := assignLObj[1,row];
6 E- r3 f) y ^! w end;
, `4 p! i) h: x0 b- K. b: J newDirection(@);
2 _$ \/ J9 Y: }" y0 V8 e1 K% N8 l1 u, `" q @.HasOrder := true;
_# l5 ~% e8 g$ s' w( q P end;( T1 t- {- ^; d9 B" w) c) e
end;' ]2 c+ V7 O7 u8 |
end; -- of the method
, b0 |; E, W& Q4 F3 G |