/* called by: entrance ctrl of the object 'track'6 w% M9 p2 Q4 r( e, o. U
*/ b7 e3 P, z' @! g% K1 r
is
: r) P p( l* s0 x7 ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# Q' D' m# V+ J: R3 u& Xdo% c- y2 P7 v5 p2 \7 T0 u4 d
Lan := rootfolder.Internal.Tools.AOLlanguage;
\+ J; S L# E2 \" ?4 T& g8 D9 z if current = @.Destination -- else return. F% j3 I3 p/ w& `' k
then2 t% w3 h% [" y1 a+ j' k5 j( X0 }( m
@.Destination := void;8 A. N C$ ?% p1 G
if @.occupied then
. C3 G* m: j, H6 J part := @.cont;
' Y( M+ D: C4 E @.transpOrder := void;
5 q1 \! a3 r" x3 y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- R( N% ~- I2 n) @
@,root.eventcontroller.simTime);
; j; S7 f8 ]! y @.HasOrder := false;
* Q7 G4 \( I9 r- g+ | @.DrivingHome := true;
x& F' h# E3 E7 H rgManager.tryToStartTransOrder;& L0 c; o( u" |) A: U; F
if @.Destination = void, E/ B% j9 G% R
then -- no transport order for vehicle @. ^2 h# Y( C6 ?/ R
@.Destination :=
: K: j% A* h* v' {5 P rgManager.nearestFreeStation(@,track.~);
/ o6 f- {2 i' r6 W newDirection(@); x* i( G7 D" T! U* ~
if @.Destination /= void then F9 y9 W: k* s
@.Destination.NumReservation :=
- v) \, b2 n' n8 ? @.Destination.NumReservation + 1;! P6 J/ y/ m! A0 C# ]' Y" L! h
end;2 E* t1 p. J* B' Q8 i3 o2 A
@.CurrIcon := "drivingHome";6 @4 ]* D, B, R0 i9 i2 v! f4 g
@.DrivingHome := true;
4 I7 j, S! M0 ~( r2 E; w3 J end; R$ [& c" M6 G$ e2 ~4 d, s3 x& ~& b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' u& Z! c+ D* ^6 c$ }2 c
part := @.transpOrder;+ x0 G" d7 l% ?9 g! e5 ~, U6 X
part.move(@);-- load part
* h/ m( |7 x" Q( M @.CurrIcon := "load";
. O: J+ m' E" H GlobalDistObj := part.globDestination;
7 O, C1 W! x7 o' k# p, ^ assignLObj := rgmanager.rgAssignL;
: u0 ^+ Z6 q3 D8 ` row := assignLObj.getRowNo(GlobalDistObj);
2 ?; [+ B6 x y1 Q if Row = -1 then -- since 70" O- w0 e6 @& E+ G7 w
if lan=1 then
0 U7 K% T2 ~) g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# h" C9 F+ k! K' p2 J to_str("in der Andockstation: \"",?.~.name,"\""));
* `. N/ {- Q, c: g else, S" L! }! u6 o( k" R- Q( D& _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 B! o" d' G6 H" M
to_str("in docking station: \"",?.~.name,"\""));
2 b' A' x4 e1 r7 O* E end;' A+ y r$ a; _- U- \; E: b1 M: q
else& p* P3 q& Y7 f8 L7 e
@.Destination := assignLObj[1,row];; D' c) S% A+ q# Q- i
end;
: k. u% Y1 @: X6 L' P# B% ? newDirection(@);) D8 q6 \8 x3 q% e/ @) w! R
@.HasOrder := true;% T- f/ a- h" q5 w& Z* e+ b
end;
7 ~5 j8 O" L7 Z2 N |9 | end;
* z+ ?& i8 C* n+ _0 Nend; -- of the method
" D0 r3 c$ r9 D d8 I9 v; m2 E |