/* called by: entrance ctrl of the object 'track'
, f a& f. v" `$ y: F7 l0 M) l% P*/! ^: m+ Q: `0 w( I" m
is: y, O" `& M) |& p; s/ l. \" G3 r+ K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 T3 X+ b- Q$ U0 j3 ]( Ddo
6 W) a" |. P& N# o, n# c& e Lan := rootfolder.Internal.Tools.AOLlanguage;2 }' V9 ^( E2 R" M+ F) D+ y
if current = @.Destination -- else return0 ]$ @) \/ {; `$ { e) N9 E. I
then* s, }/ G! L# L% [! V
@.Destination := void;
6 F$ a3 ]( K* ] if @.occupied then E, d( E& X+ W+ o8 y/ J0 z* O
part := @.cont;
3 y2 b# V! c, \/ j6 W$ K @.transpOrder := void;% G7 ?9 l% ~9 w: @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* y2 }$ r/ b* r6 s& y& B @,root.eventcontroller.simTime);( `3 |. P4 V2 {4 t
@.HasOrder := false;
2 W, k+ K# p& a1 ~ @.DrivingHome := true;
?' n3 j4 X# K* R0 m: P+ l rgManager.tryToStartTransOrder;
! a. H0 c1 \1 Y7 k! u2 z) s if @.Destination = void
2 [2 n/ n% b% k$ ?) Q i; L then -- no transport order for vehicle @2 S- U7 [. N( c$ I' O
@.Destination :=
2 W3 H1 `, [4 M. Q rgManager.nearestFreeStation(@,track.~);/ A1 n$ E3 P* }$ J+ l0 C
newDirection(@);
2 F) P5 a, G$ s: x if @.Destination /= void then# S/ I# @- m0 H! X& A3 h# z- I
@.Destination.NumReservation :=: O9 n- _* Q4 @3 X, [5 U
@.Destination.NumReservation + 1;
% F, w& {; H8 k) j3 g3 d% {' g& Y end;
( B e8 f/ \3 G @.CurrIcon := "drivingHome";
* A- k# P% H0 D @.DrivingHome := true;3 x8 u! }+ K$ ]0 {/ G2 X7 o( c$ B' M' H$ U
end;3 k/ I2 n& i! H" q( q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 n8 l4 [4 D9 g+ }: A part := @.transpOrder;
9 ~$ p* t+ T9 ^) c part.move(@);-- load part
8 P0 t' Z2 s: u9 p5 {) q/ i: q3 s @.CurrIcon := "load";
: Y2 j" V* Z2 H, L3 h7 O" I. y% S' d GlobalDistObj := part.globDestination;
0 ?/ e4 u4 C' w- ~0 [: P0 w assignLObj := rgmanager.rgAssignL;7 v) B1 x1 k! E1 x# m
row := assignLObj.getRowNo(GlobalDistObj);/ K2 b: a* _) m( t, \1 |' A
if Row = -1 then -- since 70 N4 l/ g* a: J$ v6 }; s
if lan=1 then
# Q7 @. r% A6 e& C1 ?' L n* t) ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' C. v! Q/ {3 _1 Z7 U
to_str("in der Andockstation: \"",?.~.name,"\""));
, A8 s3 ^. ~& s1 {) Q/ e! Z) I7 K else+ T- ?5 Q/ i, c7 d! _* ~! t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( T6 ]0 g2 m$ q/ _0 \' O9 W4 N2 ^
to_str("in docking station: \"",?.~.name,"\"")); . w) u* V. A1 Q7 \
end;
* _/ n3 a0 d" A5 F" Z6 f5 [ else0 T% `8 h% k) k J' w
@.Destination := assignLObj[1,row];9 E1 k* E6 s A3 C4 o. |/ H F
end;
0 c7 k4 b+ i5 S5 |+ g! v- n newDirection(@);' n0 W, J2 v" W) R+ m# k
@.HasOrder := true;
2 Q$ d7 [# T z. g/ N0 | end;
- B9 g% V- |) e( D* |# h end;
" U0 ]7 d1 M1 O# x. send; -- of the method$ J- D) |) [& ~, G
|