/* called by: entrance ctrl of the object 'track': t; V0 z3 m* G( D: k/ `
*/
5 _9 j4 t9 c2 N! q% w; n# gis" x1 \& ?; I; K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 H+ K" ]/ A7 e3 a* H; Z9 R# z
do
1 i* z( ], T8 T/ Z3 Z Lan := rootfolder.Internal.Tools.AOLlanguage;
, J2 w; b' @2 [3 O/ k if current = @.Destination -- else return
" r2 G0 h; [* R# | then( X) B# d6 q5 l l, y0 ]1 @- i6 }! d. X
@.Destination := void;
+ \( _( }. J. }5 V- | if @.occupied then
( ]5 k1 ^$ W1 ?) m) n part := @.cont;# W6 v8 Y; `9 q: i& z) E
@.transpOrder := void;
% Z+ `* [- I& `! c3 c8 J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: V- o; f! t5 a7 t9 Z& Z& {# N @,root.eventcontroller.simTime);/ p3 k. ^) L- @; |* K4 `
@.HasOrder := false;" A1 z2 m: `0 Q* t
@.DrivingHome := true;1 R$ [: z+ T/ t* w
rgManager.tryToStartTransOrder;6 ~5 K$ J/ Z3 f5 B! S$ s u% ?1 ]
if @.Destination = void2 h$ q8 J/ ], r
then -- no transport order for vehicle @# p, ~% w% D0 w0 e7 k4 q5 P8 b! n) [: v
@.Destination :=
, O0 B0 s; ~3 | V$ S rgManager.nearestFreeStation(@,track.~);
' v" g k, E b$ K" g newDirection(@); 6 T$ f' h) r; i& ?3 Q
if @.Destination /= void then
2 z" U. l; g y! D M# D% x @.Destination.NumReservation :=0 F8 @7 `4 A, L9 Q" z% W
@.Destination.NumReservation + 1; ? N- Z' W6 j& W W; o. L
end;
+ B n* F# L# }4 P6 Y. f @.CurrIcon := "drivingHome";
2 w% a1 g& o, N3 \3 j @.DrivingHome := true;
1 w; e2 L7 R# k; R: F& ^ end;8 h: a/ d3 q0 k* U) }' r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 T! Y* o: t9 {6 ] part := @.transpOrder;
+ J. c3 Y' n' D3 a0 ~1 M part.move(@);-- load part
6 d ?/ \7 r0 R, a @.CurrIcon := "load";) ~( f, T8 S7 E8 g0 v2 Z
GlobalDistObj := part.globDestination;- P5 v3 ^1 m0 R& p
assignLObj := rgmanager.rgAssignL;; z% R! [: Y7 G/ U8 A/ H& X( r
row := assignLObj.getRowNo(GlobalDistObj);
) Q* Q y( _" ^* J' [+ z# o+ M if Row = -1 then -- since 708 i! S" K* _; S' ?- {
if lan=1 then
0 J1 |* U k" a4 p3 |4 h3 S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& V$ A4 J) |( p! g8 y to_str("in der Andockstation: \"",?.~.name,"\""));9 }8 x, Y) J. H/ V$ E6 ?: N! V- b
else
5 i- F, P8 |# c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- P- q0 `" l; {. V: [ to_str("in docking station: \"",?.~.name,"\""));
# d6 P. u) E, S& ^; q) t end;8 i, h# M, S% \5 S0 y
else( |. j c$ c# u; K' _
@.Destination := assignLObj[1,row];
, ^. A; C2 k0 x* L. {( v end; 2 o+ Z% b! H1 q9 y9 S( b
newDirection(@);
7 ` F& h+ S" [1 t1 O @.HasOrder := true;
$ a, v7 A# F' c: X end;4 f) x( v& v5 `% B7 b
end;
1 c) z+ D% ~% X7 Kend; -- of the method# s' A3 a a- [$ p4 a
|