/* called by: entrance ctrl of the object 'track'
! P% V+ u4 [7 ?2 m6 p*/+ `" A3 @! n( Z9 t+ J- P: e+ a
is p: x- h& g' h; X8 d) x, O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* o) i7 R4 m* \' s' `# Wdo/ G1 a. o- w# P! g# G2 E& L
Lan := rootfolder.Internal.Tools.AOLlanguage;+ h# p: H! }6 @+ i! K
if current = @.Destination -- else return
1 B, ?) d2 K0 s2 g- \+ J+ f! `) ^: ~ then
7 t7 s G$ `5 O- f' y @.Destination := void;8 ~- J7 w& O0 M4 }& p4 Z" l: M) Y
if @.occupied then4 [7 H" ]- G% [ k$ x4 `6 f
part := @.cont;; \8 v {: r- J
@.transpOrder := void;
& ~& d' T- ?5 X h' M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 v7 q# d, y2 h1 B6 a0 G6 @ @,root.eventcontroller.simTime);4 G* W. |7 J# Q6 z8 G! O2 v
@.HasOrder := false;! T/ j! Z2 u5 f) F
@.DrivingHome := true;: D9 V/ Z( |4 d" J6 U1 ~. d9 ^
rgManager.tryToStartTransOrder;
: D p6 g8 C+ ]( p if @.Destination = void% }/ y8 T. A' i6 y2 q0 w F
then -- no transport order for vehicle @
7 \" p, C. ]8 Q @.Destination :=
, c. P' m P+ o! y6 D rgManager.nearestFreeStation(@,track.~);) N9 K, _% s5 R" B; l. W
newDirection(@);
2 ?+ u' E& m) T. _4 r0 v if @.Destination /= void then
$ v: g9 O0 E; `5 W5 N6 D' ^ @.Destination.NumReservation :=7 H9 L8 O, Y8 N1 P8 V
@.Destination.NumReservation + 1;
/ M/ T" z4 v, j end;
8 K2 |; M" `0 B- H( u1 ? @.CurrIcon := "drivingHome";
* Y# H( V9 S1 D4 l# u @.DrivingHome := true;
6 J5 E% r! F$ t8 x" x: r7 v end;
( G( L, I7 I& ?3 ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 R" N; Q; `. l- o
part := @.transpOrder;( @9 f* g1 O0 j/ b: a& K
part.move(@);-- load part
7 f( `! `! W9 ]# P( u% B f @.CurrIcon := "load";' c9 T2 _1 v! q; {
GlobalDistObj := part.globDestination;
4 s) @7 W2 @" f6 L9 D assignLObj := rgmanager.rgAssignL;
8 Q$ T0 e n+ j$ p# Y row := assignLObj.getRowNo(GlobalDistObj);
/ \8 Y* x0 \# H- I if Row = -1 then -- since 70
0 v$ r5 G* {5 s( J, c+ w- O if lan=1 then0 f7 P4 E& B0 F4 A- d; T! N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' u: z8 L$ _" M. Z/ S to_str("in der Andockstation: \"",?.~.name,"\""));
: D& N5 D2 `/ t# T& w else
! S# `$ z" D* z/ S t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), J6 c8 q- N& |0 z) |5 a/ m
to_str("in docking station: \"",?.~.name,"\""));
$ M1 g2 |2 T" ^5 q- N( d end;+ n6 N% Y9 b6 B; h) W
else9 A" {% p* P( r' ?' l( f2 ], }
@.Destination := assignLObj[1,row];
6 r$ q$ ^. n) K. S) Y9 D- H end; . d/ j k) ?: x% |, S0 t% w7 i
newDirection(@); B0 T$ l/ _4 X1 t: `0 V* B
@.HasOrder := true;
$ c9 A. x5 A. g4 t! t2 r end;
% z1 \* i) ~5 J, J/ C end;
, z: u0 o; C" C; h, Q8 ?. g, y1 tend; -- of the method! H: h7 B+ F9 G/ x% p$ c% V* J
|