/* called by: entrance ctrl of the object 'track'+ s' F) H k, m) J3 \
*/3 o4 Q- p& V4 F0 @$ O* s
is; o; f H# @4 j( B$ V" A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 P% Y: n% `$ N, J% U6 o$ A% e
do# x4 K# l2 _& C
Lan := rootfolder.Internal.Tools.AOLlanguage;/ W" V$ s N9 s5 M9 v$ [' M
if current = @.Destination -- else return
( f5 | t5 Q3 c; E0 M8 F then
' S! W4 ], M, t5 {1 u. F% u1 k3 b @.Destination := void;* T, r9 D3 `3 E# d% W$ W
if @.occupied then
6 i9 j6 ]1 c' X( M$ [ part := @.cont;
3 ^- J i- K9 l7 t. g. I @.transpOrder := void;& u6 h% n$ \& Q0 a4 B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, q" N1 S/ j! F: Z @,root.eventcontroller.simTime);
& e5 _7 p- a& ?# o* S/ D- Z @.HasOrder := false;
6 ~/ d) g& ~$ j# B2 t! L/ C- L @.DrivingHome := true;5 @% [; i; H4 R1 m6 V2 y5 h9 Z
rgManager.tryToStartTransOrder;- d) I8 B c5 g* K6 @
if @.Destination = void
; R8 I- @+ }$ @' p8 d then -- no transport order for vehicle @0 W+ c6 Q7 @& { w( y; ]# D
@.Destination :=5 v+ w1 k+ {7 p
rgManager.nearestFreeStation(@,track.~);
: {" ^* g2 k! {* Z newDirection(@);
- [( M6 n. x0 b% p if @.Destination /= void then
7 d: z3 y1 g7 n- B/ u @.Destination.NumReservation :=; Q# S! Q/ s' i
@.Destination.NumReservation + 1;
- h* c) t- A @, c( C# E( k9 B$ P end;; f' k9 Z/ Q7 z, B
@.CurrIcon := "drivingHome";0 E* a9 }: ]/ }, W
@.DrivingHome := true;
7 C7 a3 y* G" z1 Y! n* _$ s end;
" E- x! s# q+ ^0 Q: f else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: l3 \, n4 g1 E, y7 G9 a part := @.transpOrder;
, r- u( \! p) M! l# t part.move(@);-- load part
. t+ G$ T! G( t& a+ Q @.CurrIcon := "load";, \6 g: y+ U6 p P; N% r4 Z
GlobalDistObj := part.globDestination;
* g6 ^ k3 h+ g7 a/ l' s1 s; t assignLObj := rgmanager.rgAssignL;# f' y! ~# H6 V1 _5 J+ U. b
row := assignLObj.getRowNo(GlobalDistObj);5 l9 J- I3 D% Z! Z# H5 L2 G7 U1 ^) M
if Row = -1 then -- since 70
3 S6 h: C/ Y( F7 b" w" K9 L1 _/ | if lan=1 then
3 }* Z; Y! D1 ~: b8 P o9 P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: t1 N8 H& l: l) L
to_str("in der Andockstation: \"",?.~.name,"\""));
& |# i7 f2 O' i+ I# U" i7 L: O else
1 v& \5 X0 c, O* Y* P6 K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" n0 p* i4 Y/ g0 g8 s to_str("in docking station: \"",?.~.name,"\"")); . t. x- ?9 M# h& c# z+ ?' N
end;
+ c3 _, l# d! j! a4 R: N2 c else
/ a; g: O7 O" j8 { @.Destination := assignLObj[1,row];( I- m" x+ ~! Y% _/ b# V& l
end; ( P/ A1 \, ~: h+ P& u9 M
newDirection(@);
8 r4 `8 s0 T! R9 m) ?+ H: z1 e @.HasOrder := true;
1 [* d* j3 E. x end;
1 y, ?! i! e1 M3 D0 h, i end;
) L; c$ a! C* s+ F/ d& U" V( Wend; -- of the method$ K ~2 i1 a) r% J
|