/* called by: entrance ctrl of the object 'track'
# Z, h) h0 y7 }! V*/4 C, j# [# Q# S2 K# l) Z* ?
is% k4 X6 ~4 @1 w' a) M. Z1 d1 [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, X0 [$ e0 ^- r& [) e8 N) E
do
1 }3 ]% J1 w, ~5 e- F9 L" f& h Lan := rootfolder.Internal.Tools.AOLlanguage;
8 y+ d* K+ U8 C$ d" y/ ` if current = @.Destination -- else return7 i1 Q+ g: m8 |: ], X
then
- `6 V, Y- m$ [, A4 e @.Destination := void;
. g" ^: L( V- I% h4 u! p if @.occupied then
8 n& |: j$ C; S& } part := @.cont;
8 Y& h" F9 {% @) d/ n% _ @.transpOrder := void;" v& U& G$ O! d8 A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) x) L6 e* p) B; Q) w; x* y @,root.eventcontroller.simTime);
& @( t" B: d- A! ] @.HasOrder := false;
' u% y) C' c2 L @.DrivingHome := true;
) e5 e% m7 D8 x7 j rgManager.tryToStartTransOrder;$ r' W9 P I+ W! n, t0 b$ d
if @.Destination = void
6 {. u6 [1 r/ G0 S4 N, d1 l, ?, h then -- no transport order for vehicle @3 o7 S1 E; u) s7 `
@.Destination :=
- d7 X/ c' F+ y0 {5 v8 F rgManager.nearestFreeStation(@,track.~);5 g3 X3 S1 |4 _# A8 L$ \
newDirection(@); 2 L7 S; N. `7 |+ O% p: H# k$ L
if @.Destination /= void then0 k" \: o1 q) L7 o1 c
@.Destination.NumReservation :=4 D4 h/ s% \+ @2 v7 i( Y
@.Destination.NumReservation + 1;4 z; w% D: t+ y: X1 ?5 R9 a
end;$ k. c& w5 K( z! g
@.CurrIcon := "drivingHome";) h5 N/ k% ~$ C0 s
@.DrivingHome := true;
- j% P X8 y* ?( S" G' Y end;
& _ F4 X, I# U else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 o4 y" l+ J* M7 K) e2 u" s part := @.transpOrder;* w X/ k- C" b1 E2 `$ U' Z
part.move(@);-- load part9 }3 p! g; l! g
@.CurrIcon := "load";% u3 S+ [( U0 k3 c& V
GlobalDistObj := part.globDestination;1 N- ^) U8 x, Z8 d* y7 Q& m" L* Q
assignLObj := rgmanager.rgAssignL;$ w2 R9 D* u' N" q1 o- [" X3 d
row := assignLObj.getRowNo(GlobalDistObj);* J6 C+ d8 o" K( ?! x+ X
if Row = -1 then -- since 70
9 E& N2 `$ E2 R- \: J2 P1 E7 i if lan=1 then6 i8 y5 \" K6 E. r) f/ {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( e# d% Q1 ~$ {! c$ Y; T y
to_str("in der Andockstation: \"",?.~.name,"\""));$ a% _5 @$ ]/ T5 f. E# b
else, y% ~: m D7 K% E. G' M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" H% s4 u! n6 I; i9 j: i to_str("in docking station: \"",?.~.name,"\""));
; v ]+ N* u: H- p end;
# s, H- C v# h$ H else
! M" V5 l4 w, ?7 O @.Destination := assignLObj[1,row];
3 w) x# t. {! E. b+ s8 r$ D8 z end;
+ L8 U* G6 }: G' i/ O newDirection(@);0 D% I& i& v4 d
@.HasOrder := true;
: [7 A. j, I0 U0 Z! R7 C# ` end;
6 T$ i' F* J; B8 k% ]5 M6 A end;3 s% s: d/ F* Z
end; -- of the method
8 x9 [9 G2 z8 S5 J/ V/ R |