/* called by: entrance ctrl of the object 'track'
8 ?3 k) ?; l' k" H; i0 W. ~/ H# Y*/
$ b \# q2 K& c O; p1 Ois! ^3 ^, h) s) T/ j. h& W8 V$ z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; t, Y8 X Q3 g, z! ~; Mdo
' ~, M; D$ x$ U! D# g8 A# { Lan := rootfolder.Internal.Tools.AOLlanguage;0 s, b1 k a8 S8 q- ^
if current = @.Destination -- else return' Z' [6 i( {, \- Y2 q2 x0 \
then; J4 ?4 f& E) V! I( S1 }0 ]( j) m
@.Destination := void;# _4 t- u- i3 I7 x2 Y
if @.occupied then6 q* }7 r# _; O
part := @.cont;
1 o8 z5 H6 |1 @: H8 M/ x% { @.transpOrder := void;
; ]! { S4 J5 Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' L) Z. U1 P6 a- @/ x* x
@,root.eventcontroller.simTime);5 c5 [5 ]# l8 V6 p3 y& t* L) e; M
@.HasOrder := false;: U) D9 {1 Q# S s% c g- q) D" U
@.DrivingHome := true;
3 d' _% Z5 d% |% w2 j rgManager.tryToStartTransOrder;7 t0 }4 t2 w% q. j
if @.Destination = void
6 |$ r% Z: L+ R |. } then -- no transport order for vehicle @
4 w) N' [- N! j S H% b. z1 T! t @.Destination :=4 D! b8 y' O" y
rgManager.nearestFreeStation(@,track.~);) }3 O! x9 ]4 |" ]: Q
newDirection(@); $ }# F4 n3 p# {4 g
if @.Destination /= void then
4 [* G0 |# E2 l+ ?2 p @.Destination.NumReservation :=
. w. R t* _9 x1 G6 }4 P @.Destination.NumReservation + 1;$ Z8 j V; w, F" a5 o6 A
end;. P& [ i+ N1 m4 C' _
@.CurrIcon := "drivingHome";1 N; b% W# s: e, t r, k, j) n( j
@.DrivingHome := true;2 Q$ H5 _- \4 n& v! A8 E" X
end;/ i9 o" U0 B/ w! L! U; A4 M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. y# w) _* U5 f
part := @.transpOrder;/ E7 U, N# V0 z% b: C
part.move(@);-- load part
5 ^+ b- V' C8 x4 {4 Q @.CurrIcon := "load";
' n. o" v" X* u. l- a# X GlobalDistObj := part.globDestination; c$ E9 Q1 v6 q* g) N+ ]- `
assignLObj := rgmanager.rgAssignL;6 X! c$ k: C) x/ t/ L
row := assignLObj.getRowNo(GlobalDistObj);0 P) R+ @" J1 y( F! d7 l
if Row = -1 then -- since 70
* x/ T, Q% I% b if lan=1 then
2 f7 ?& _5 F ^# c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" x3 f- [+ V. [4 W to_str("in der Andockstation: \"",?.~.name,"\""));
* V6 N. o. W% C: _; S4 K9 } else
8 f# s: h, K. N" e/ D \* Z/ e( ]; q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 V6 m! L R4 |/ j7 L
to_str("in docking station: \"",?.~.name,"\""));
* `; R9 |. y& b: r( O$ o end;) N- ?# @+ f E3 M) r+ c
else
) N; U1 A$ H- A5 f3 _2 q0 r @.Destination := assignLObj[1,row];
, W4 |* l2 \$ r# g4 {3 N end;
1 O2 c/ t6 @: y9 ?" p( c8 ` newDirection(@);
5 M5 V0 t- e9 l5 c! K$ R% A @.HasOrder := true;
- Y2 V6 @7 ~2 H0 I0 x end;
8 a+ U0 n: b- u S/ b# l end;
; o8 T1 @, k* ~7 ]$ t7 Yend; -- of the method
" y8 O, f! z& l# e: A/ W/ ?$ g& ^ |