/* called by: entrance ctrl of the object 'track'! J# _# M3 \; n* B9 Q e
*// b( v$ t: }) Z0 E& P5 }! _
is
4 ^) b% t6 J8 R5 R4 q/ T1 Q& R part, GlobalDistObj, assignLObj:object;row,Lan:integer;% B+ W: Z* `) v4 r' T& P8 k5 F }
do
7 v/ G' ?4 u2 d2 C. n% K& f Lan := rootfolder.Internal.Tools.AOLlanguage;1 h7 U: o- c# e
if current = @.Destination -- else return8 j# r/ M1 m X7 X7 z5 x5 K/ s+ r
then) ~1 A/ z% g1 L) m9 ]" `
@.Destination := void;( M- k+ B& K. y& Z/ P. ~% a5 Z0 T5 O
if @.occupied then
" n; A( C4 a" n$ j1 R part := @.cont;
& H0 X) D3 c# `+ H @.transpOrder := void;
. w/ S7 S* M# k, }1 @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* ^. O* Q$ Q* S! y: c* l @,root.eventcontroller.simTime);
0 A; H5 D2 {" P' I8 p9 U( T @.HasOrder := false;
; I" e D# g# G! v4 P) C @.DrivingHome := true;
) K, W! P" \3 I& @) J4 ^! u' {" r rgManager.tryToStartTransOrder;
7 m; `0 C+ j. h if @.Destination = void
- J: A' C! T, N2 ]+ P8 @ then -- no transport order for vehicle @9 t: X4 f" p2 p# h& j" _. W5 _
@.Destination :=) P/ |! ?2 B" r! l: y
rgManager.nearestFreeStation(@,track.~);, ]" }) {' }7 P9 P5 c
newDirection(@); , h/ F5 ~" B. W3 ?+ k/ P! o
if @.Destination /= void then& ]0 W, F) }6 H6 e. a; M" G# o1 q
@.Destination.NumReservation :=
# {& v. p( i/ b6 D% b! Y0 c @.Destination.NumReservation + 1;
# Y. a3 E% M' S# l. P0 P- N9 a y3 B end;+ B# h% ^, a* F' W. ?. ]
@.CurrIcon := "drivingHome";
( S! g: K. d; i/ [: J @.DrivingHome := true;; \) Z) e: P& v; E) b) N" q
end;
3 }. y9 [8 W& U! G else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! u5 u3 }; Q( I0 G7 v9 y9 m: [& y. w part := @.transpOrder;2 Q0 a& G4 y4 B1 A
part.move(@);-- load part
. G- Y3 i" x& ^; j: j @.CurrIcon := "load";
2 e Q0 k' V- _5 S: X0 v9 h; [7 ~7 g* ^ GlobalDistObj := part.globDestination;4 _- l5 Y/ }- f4 S( V6 O
assignLObj := rgmanager.rgAssignL;
+ `+ e3 U6 M: q" Z! y/ p5 F' t" { row := assignLObj.getRowNo(GlobalDistObj);1 U& o* y! J0 U3 y- b. V2 Q
if Row = -1 then -- since 70
* x. z, B; N' e5 b/ V/ ^2 z if lan=1 then; H% l/ b, Q) o* _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, ~1 F" z, D; n7 ?' h- j$ e to_str("in der Andockstation: \"",?.~.name,"\""));
6 N- ?7 S& t0 K h1 z/ R else- f: i- | t8 e/ ?; z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: P. B2 {/ R, C2 c. W6 y* O3 x
to_str("in docking station: \"",?.~.name,"\""));
3 m5 _2 B$ X" T' i4 O end;3 E$ F/ f% N5 j# `, t: i
else& g9 }$ S4 F) D
@.Destination := assignLObj[1,row];
% w+ G8 q7 C) [. b% _+ y4 _ end;
6 P* h6 G$ \# k) b3 h% q newDirection(@);& J G( e, G6 g1 r) A& p
@.HasOrder := true;& \! \; ?- j& m7 A; E$ r- `& V
end;
: S9 _ |& {" l0 R end;
( s6 ~8 y$ f6 z1 | a6 ^/ o' zend; -- of the method
m F; C5 s$ b# u |