/* called by: entrance ctrl of the object 'track'
+ q6 \7 T) d/ {# M- C/ H2 u4 `*/+ O' N" k6 e/ P' |4 h f1 h& r
is
8 \4 l) B* Z/ g6 H. w part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 i: L& ?2 f4 x3 s2 a1 |7 v* o
do* M! H9 L! v' x( k7 O
Lan := rootfolder.Internal.Tools.AOLlanguage;/ n: r I9 W+ j5 ^
if current = @.Destination -- else return1 M! }' a. ~; C1 l9 F' R8 h8 I
then, @+ ~. {( N, l$ Y/ ]6 i& w7 [* b
@.Destination := void;
3 [: f3 |! D/ k, F if @.occupied then
9 [/ L% s! a! p8 T8 l) Q part := @.cont;
5 t( ^' g7 C- r$ B. c @.transpOrder := void;
! g: q# f4 s8 Z2 @% ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ T4 l( u; Y1 f& b; Q. R
@,root.eventcontroller.simTime);
2 Z2 [$ P: K; D0 [ @.HasOrder := false;
1 C, v2 B2 b/ e! R v @.DrivingHome := true;3 K; N* D" l6 T' E
rgManager.tryToStartTransOrder;
7 c" R: S8 i4 L3 a, s* J% w if @.Destination = void4 _! ^* x. i% F3 k
then -- no transport order for vehicle @
4 C& c: X6 Y# G4 Q% s6 Y4 r @.Destination :=8 u+ p# |3 O; \) y" {* M& r. \8 Q
rgManager.nearestFreeStation(@,track.~);
, ~5 \/ [8 T$ v" y: D' ?$ W newDirection(@); # U* @4 A, ?8 O
if @.Destination /= void then9 K; B) o* x! r
@.Destination.NumReservation :=
8 Q/ W. g. R* t T @.Destination.NumReservation + 1;& H4 ]. B: B/ @5 }" N
end;* G8 V+ K: T) g
@.CurrIcon := "drivingHome";; _: q% n% J* ?- p# P, x" M
@.DrivingHome := true;
8 g2 o; e- q2 j* O4 f% o+ g; W0 S# r. Z! r0 s end;; W. t0 E" M3 F' o+ {% t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" O) J! b, \1 A x
part := @.transpOrder;5 Q5 b% ]$ s; C% z! i! O( p
part.move(@);-- load part
5 e& Q2 f1 T/ }* {8 u6 J5 w0 E @.CurrIcon := "load";( m2 C9 p0 U2 a( g7 R- y4 x3 r
GlobalDistObj := part.globDestination;
) \9 Q5 o! d% U( f9 K2 ?! _9 P assignLObj := rgmanager.rgAssignL;2 n* z9 {8 ]/ B8 f0 H" l6 J* x1 g
row := assignLObj.getRowNo(GlobalDistObj);
5 B& F6 ~8 |6 _" \, h if Row = -1 then -- since 704 m5 ?. a0 ]. f9 s1 \6 {; S
if lan=1 then" q/ x+ D# W) U- Q7 r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ y' P+ @; i8 `8 [. w
to_str("in der Andockstation: \"",?.~.name,"\""));, I: U6 ]0 a: F, L: O! A0 L; O( P
else
1 c+ Z6 Z1 D: P- c5 v$ Y2 W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( P$ j6 g% y/ D7 l
to_str("in docking station: \"",?.~.name,"\""));
& S$ v+ v- s6 L end;
4 t9 Q3 s- W; L) t7 y& d else
( F# a( ^ j# S1 h: I @.Destination := assignLObj[1,row];+ P% M$ f8 o$ H) ?1 e* v
end; 9 p1 q: l8 C+ J
newDirection(@); O D5 X3 d- _8 d
@.HasOrder := true;
: n) Z3 T$ a; k ?/ Y. R$ L8 b# `) | end;
. t9 W4 ~# ^; {% f6 q. t1 M' [ end;
0 t1 W6 G/ W+ P* h N! K1 {end; -- of the method
8 |: I* R: W* l |