/* called by: entrance ctrl of the object 'track': \ a1 v& o& }1 y2 ~/ N* o* Y
*/
7 S- m" R( y2 X3 I+ dis( O+ C1 v) Q' v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# U9 i. F' U. G3 F2 V1 U
do% Q! a: w8 V- N9 ?4 I: w2 a0 m
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 z* Z0 W/ ?9 k# A if current = @.Destination -- else return
% U; e K8 }3 w then# z0 ~2 C: q9 K- h
@.Destination := void;: V% m3 H2 ~4 {
if @.occupied then
1 u2 L0 X: h+ I part := @.cont;
$ e( o/ |5 r$ @) C/ Z+ B' O @.transpOrder := void;0 z' c+ D* C: n! d Z* _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; |" n; I2 I6 m d, E h: ?. i7 B0 w @,root.eventcontroller.simTime);
" [% l( e. O. U+ ? @.HasOrder := false;
9 y6 a- `, ]; \ @.DrivingHome := true;' w! b, V6 E+ B7 V _
rgManager.tryToStartTransOrder;' |5 s u" D& C2 |: o6 y3 m# s9 l
if @.Destination = void1 G) V" Y' O1 v! y6 ]
then -- no transport order for vehicle @
- O: ]* D( k5 j) L @.Destination :=( R. l8 q$ |2 n7 D8 d
rgManager.nearestFreeStation(@,track.~);
: ~( q- R; E* f+ ~% n* k4 ?) f newDirection(@);
) [# _! w4 p0 D+ `4 \5 e: h, [ if @.Destination /= void then a! y+ Q0 x1 d
@.Destination.NumReservation :=
- j/ _# C) z9 c2 Y5 \ E2 z @.Destination.NumReservation + 1;
3 ]4 v1 w! A4 ~+ d# Q0 |+ I% q8 ^ end;# a* L" ^/ ^1 d5 w3 }' i
@.CurrIcon := "drivingHome";
8 X2 Y8 T1 \# |$ T! r6 z @.DrivingHome := true;
/ P9 K0 H$ A( {% e* k end;
% s% i% d4 a/ d; z* x% i1 g( b. K% [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 A* G4 F5 f, N" N: c+ W part := @.transpOrder;. y3 q0 i7 _) ?6 z# l! X
part.move(@);-- load part
5 J2 O1 E/ D# }) u @.CurrIcon := "load";
4 ~3 Y$ ]5 i7 a! m. b# \2 Y1 | GlobalDistObj := part.globDestination;- e" ?* W; Z0 b7 X
assignLObj := rgmanager.rgAssignL;
2 D; T) G! u/ z+ h row := assignLObj.getRowNo(GlobalDistObj);
* ?$ E* i$ M* L7 q( d. A# e if Row = -1 then -- since 70
3 s; f9 c$ E) B$ l if lan=1 then
+ \5 N' X3 r0 x1 x3 g8 Q( r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 f5 e3 D5 [/ {% j( {# k2 F
to_str("in der Andockstation: \"",?.~.name,"\""));
2 o I4 p: ~$ H8 k1 u) u: k: g else
# X4 ~# i, u: [. Y# q9 q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( _5 E& v9 W0 L3 J" b+ |+ S Y
to_str("in docking station: \"",?.~.name,"\""));
A- S. B! R0 c4 a/ \; D* W end;9 N' W: b+ K' h9 K/ K9 I6 V
else
* F# i2 N! [1 X0 c% {; ` @.Destination := assignLObj[1,row];
$ E: S6 M. n. Q5 s end; , o [) v, X4 S$ g
newDirection(@);
4 K% h; f: r6 c% F3 U0 W) E7 ` @.HasOrder := true;
; Q) g+ f& [/ n end;8 B- i- U5 p- g% D
end;* ~9 Z# c/ W1 y1 l
end; -- of the method
+ U* |+ x5 `! P$ F7 g |