/* called by: entrance ctrl of the object 'track'
# [, e7 j t) i9 {2 X7 l/ N- l( {8 n*/
1 a0 m8 h: C3 y7 Tis
- P5 a7 c. N2 Q% Z0 i1 R part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. G1 {% J6 S% G+ F$ a; ~do; a# D: W P8 h' l7 i \
Lan := rootfolder.Internal.Tools.AOLlanguage;# f$ ~- j3 v3 G c+ O
if current = @.Destination -- else return
4 E4 Z7 T5 P7 P; X% F: G; @% i4 ` then
8 C0 l* t, V0 n) L* K J: S1 J @.Destination := void;
; w L" m \/ g1 H+ j if @.occupied then/ u [/ v6 d3 _+ {' |5 y
part := @.cont;. g' n W. I8 l$ y9 `2 g7 J
@.transpOrder := void;4 C$ M4 ~( ~, F( b9 Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 b; _" o: @% B- Y- h0 \& i! F) K @,root.eventcontroller.simTime);, B) |5 K0 i' J4 u& X- V
@.HasOrder := false;6 a* }$ r; ?( z5 O
@.DrivingHome := true;
; D: I U* J$ m rgManager.tryToStartTransOrder;
, `# l( U0 e& n if @.Destination = void
# O& `& t. Q- V+ H* [ then -- no transport order for vehicle @ l5 b6 a+ M, X& O3 I; c! M
@.Destination :=
$ }, Y6 V% A) L6 H0 q rgManager.nearestFreeStation(@,track.~);9 V. \6 g7 O- u1 }( H8 _
newDirection(@); + D% v3 t' Y8 p. n/ r6 y+ l
if @.Destination /= void then4 p" F# ]9 x' n% f3 p6 I
@.Destination.NumReservation :=
7 c# N+ s. X! ?9 c9 t8 K }) { @.Destination.NumReservation + 1;
( g4 f# V8 u5 ^ ]3 q% M end;
' {$ {+ ^! f9 g+ t) K @.CurrIcon := "drivingHome";
( L" c* \6 O! W @.DrivingHome := true;- |+ u" H+ X; @8 _% ]; c3 S/ I: B
end;- N% D& s/ f( W8 o! A0 n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 U9 K; y- Q+ P* @5 c h; v part := @.transpOrder;
- a3 e3 d# O: Z- {1 L$ j3 f part.move(@);-- load part
9 h6 m! C/ u3 u. ^! ]: l+ J @.CurrIcon := "load";% ` v4 K# ]+ [* D+ S2 z- f6 S I
GlobalDistObj := part.globDestination;: I0 Z' g. J& G# ^5 g$ q
assignLObj := rgmanager.rgAssignL;7 ]) P6 ]. C k9 z
row := assignLObj.getRowNo(GlobalDistObj);
V/ c5 Q9 p6 z+ e; @" n' k- f* b if Row = -1 then -- since 70$ V' d* h) I, q+ e
if lan=1 then. G+ A# E9 S+ z8 l E1 V2 r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 P' h5 Y \ ~- D g9 W# l4 s to_str("in der Andockstation: \"",?.~.name,"\""));- W" Q& M8 C8 O/ A
else
+ ~0 C9 _! }5 y4 K& U. Y# j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% g* i7 @4 e m% s! K. o& R to_str("in docking station: \"",?.~.name,"\""));
5 q( _$ ?6 u+ h3 ?! P0 Q end;
4 h: f2 k8 N9 _: `: a2 m4 M else
9 v8 x; K( V7 O9 |9 c @.Destination := assignLObj[1,row];
0 Y7 K$ i4 |% D6 u) z2 G: {- P; [ end; ) `; }* i+ \% g; ^4 A( M
newDirection(@);5 V! _" U# x* F; E+ ~
@.HasOrder := true;4 H! j$ z6 ~6 w- j; @' }2 c
end;: ~ ^9 F" H$ U5 h* e
end;
$ G9 j5 F/ [* e; Rend; -- of the method H7 h' o* x5 g5 _6 j) B
|