/* called by: entrance ctrl of the object 'track'
* s! q$ s: M( H1 w*/
& K; Z" f0 r0 J* Sis
: u7 {8 r$ n4 B/ J& l; _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;" U9 m! W: x1 `
do
( I, x' ] u5 Y( `/ Q$ i- z7 e Lan := rootfolder.Internal.Tools.AOLlanguage;. h* t- I. t) T* x9 l: U
if current = @.Destination -- else return' @' l/ y) C% b3 d0 N
then# w8 o2 i0 p! w
@.Destination := void;, U; q2 G3 I9 J$ j/ n9 v
if @.occupied then
0 K# B/ K' @2 j6 ~2 }1 G e part := @.cont;
# Q( a. J: v/ x6 j @.transpOrder := void;
" A) ? u0 A/ Q5 J1 i4 F$ F3 w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 R! M8 u% ?# u1 w
@,root.eventcontroller.simTime);
~0 K3 S# ?8 T7 J$ F! y @.HasOrder := false;
+ ~5 S! F+ q7 q6 X; E; K) l @.DrivingHome := true;# w S# s! p0 e' \$ B
rgManager.tryToStartTransOrder;: M* |5 q) N, b( d4 Y7 K; b, n
if @.Destination = void
9 V E7 t. A# L0 J8 s7 v then -- no transport order for vehicle @( _1 B4 v+ K& l7 Y! \
@.Destination :=
' q+ S0 R6 b. Y7 H" k rgManager.nearestFreeStation(@,track.~);: `) T" T0 x: M' Q
newDirection(@);
. i# T; k1 b0 E1 x if @.Destination /= void then9 o5 N3 J6 `$ Z: Z/ K0 }# V
@.Destination.NumReservation :=
$ j/ ?$ s& p; t$ F& x @.Destination.NumReservation + 1;
. R$ `, B: }* v7 }7 I; ^ end; U7 k2 g) K4 q- ^1 ^$ }
@.CurrIcon := "drivingHome";* M( p9 E, _# T+ p2 H6 J
@.DrivingHome := true;
5 S4 A6 u' \ O8 ?; j& ] end;% q; _! N. `4 ]3 \" Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, N# b. u- g7 E part := @.transpOrder;' Y" T! C3 S8 g
part.move(@);-- load part
' w4 u- H* }! T5 b9 S `" P1 w @.CurrIcon := "load";
% k" E. a4 r& f GlobalDistObj := part.globDestination;
8 R; [0 R' ~/ h0 f assignLObj := rgmanager.rgAssignL;5 a7 k/ I7 a2 R- [
row := assignLObj.getRowNo(GlobalDistObj);
& R b* X2 e/ N! a4 d/ C% U if Row = -1 then -- since 70' n8 P3 p- R: d, W# ?1 N
if lan=1 then
8 S+ ?- A. h* s0 i: O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% R9 A: n+ P' D2 [" n4 G
to_str("in der Andockstation: \"",?.~.name,"\""));
: q' C: `1 ?' H2 j. W! h else
- G0 A2 C# A1 k Y# M7 N, s4 t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, _2 x9 U6 r1 H, R9 I! [+ b; F v to_str("in docking station: \"",?.~.name,"\""));
8 N0 U% u/ @6 a8 O4 w m; P" Z end;2 U4 f' S7 w2 R) d/ K1 ^
else+ ?5 ]) n, b/ ]" `# Z, Q
@.Destination := assignLObj[1,row];
& U: h3 X0 B4 j# m2 Z4 l end;
% p8 Z5 W8 k& d) ^8 S* O newDirection(@);+ I$ D t: [2 Y! K: |8 O1 ?
@.HasOrder := true;8 B6 e6 l4 }; D' }2 K2 x; e! S
end;
" L' F8 k5 q) \- d- S end;
c# w" _- [; }7 _( W4 b iend; -- of the method, t U( P H. w( |8 I
|