/* called by: entrance ctrl of the object 'track'
" O& ?; w M' n/ @; [" J* o+ X*/8 g/ W. t) C6 H* k4 h
is& C f% T! w$ Y4 d; z# N% ~4 h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 d# l G. p, u1 z6 g1 Pdo. k. ^9 k+ J- X) \# e* U
Lan := rootfolder.Internal.Tools.AOLlanguage;
" O, ^9 M3 j3 W4 X5 Q3 t if current = @.Destination -- else return
! p% i% g0 ], Z4 d; @: v, W then
- H& R- f6 H. P& m" G% A @.Destination := void;
" j8 x+ ?2 D( @* v+ L if @.occupied then
. j% ?' o5 Y4 V, l$ i5 } part := @.cont;. u% w- [% w% w# M1 X% t. e
@.transpOrder := void;
' G8 _2 _( ^& t V' o: M" s7 S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& @& o Q# O5 W/ S A @,root.eventcontroller.simTime);
- M$ P% }5 J% w$ p! X6 _ @.HasOrder := false;
) ^- G1 Y8 o+ ^5 c; S" C6 y @.DrivingHome := true;, ?" d# i- n; Q$ d8 \( |! v- K
rgManager.tryToStartTransOrder;
8 E/ C3 H }+ Y, D7 f if @.Destination = void9 v& W# u& K( k" [( v; l
then -- no transport order for vehicle @) }5 o0 l, m H2 K1 d
@.Destination :=
9 b I% x. u+ a9 a6 \$ l rgManager.nearestFreeStation(@,track.~);, b2 w# @( y/ F' y- H, f. a$ Y
newDirection(@); - f( e( }1 R; k7 {* E, F
if @.Destination /= void then
3 Q4 g1 d/ l1 v) |; X. w& {8 k @.Destination.NumReservation :=: v7 @1 d. I& @5 F0 i! H
@.Destination.NumReservation + 1;: f5 T8 d, `# ]9 Y1 S' @$ \2 B, V- {. |
end;
( u4 g& j# }7 ]' i9 ^ @.CurrIcon := "drivingHome";
( a4 I/ y& m0 b! X @.DrivingHome := true;5 T4 ~3 V4 c$ X7 ^2 ~7 D7 P; O8 h: M
end;
7 I: Z5 E) |1 f else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 S: ?& H) K8 m4 b part := @.transpOrder;1 y. Y1 Q# e V0 K; J
part.move(@);-- load part+ x `/ x% [. g% _
@.CurrIcon := "load";
& ?4 O+ X2 k9 Z% d% e% d GlobalDistObj := part.globDestination;
( \' q) F* N0 _4 }, d4 Z3 s assignLObj := rgmanager.rgAssignL;
, T: ]+ ]' S6 n row := assignLObj.getRowNo(GlobalDistObj);1 B8 w7 K% B. n2 ^
if Row = -1 then -- since 70
3 Z3 c6 h6 l# ~. l if lan=1 then: m. ^4 G/ [6 \* y# h8 _( l3 T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ h6 V: \2 Y! H. t
to_str("in der Andockstation: \"",?.~.name,"\""));
: B" v8 ~8 o9 i5 z d6 z: v1 g else
1 P4 ]( ~" M5 r; V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& z5 O9 V8 ?& D
to_str("in docking station: \"",?.~.name,"\""));
. R" i+ g, W- g- @1 `' x0 s end;
& x, O6 P W8 T. K else3 I* \% s( F5 Y
@.Destination := assignLObj[1,row];
! A7 Q9 T2 M0 |& y; Q+ y end;
, x* r- Q! p/ t0 y0 i2 D( b newDirection(@);
3 P/ e" ^: _9 B8 \6 |+ F5 J1 I @.HasOrder := true;5 I) Q" ^, j* U, I4 K1 ~6 `, ]
end;; g9 Y6 V. x: p* W( \- j; [- H: t
end;! m) d7 g) T! b8 ^, r% d$ j
end; -- of the method
7 w& ?4 _( r. I' p- B+ ] y [ |