/* called by: entrance ctrl of the object 'track'
; P5 k& h3 D, E: W6 a*/" j1 @$ G! {$ ^: a9 m4 k( E' [
is- T z+ }% F l% O I6 e& W
part, GlobalDistObj, assignLObj:object;row,Lan:integer; ~/ f/ \7 i4 j9 m9 F
do
# L9 ?( U+ N$ H8 g, Z W Lan := rootfolder.Internal.Tools.AOLlanguage;/ n* x* n0 }( K- D
if current = @.Destination -- else return
' `, B0 Q+ Z& Y6 K# Q% G% A then" G" W$ U/ h- |8 a1 [! U
@.Destination := void;
& h# P5 q1 ? U1 X: g4 s if @.occupied then
& N" h4 m2 O* C# V( ]. e9 [ part := @.cont;
. n/ N' z3 M1 H8 N4 _% e Y! j/ h @.transpOrder := void;
. F1 i: R7 d- e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% _8 a3 `( J0 ]' n3 Z) a @,root.eventcontroller.simTime);
; o- P) d9 I( Q1 R @.HasOrder := false;
; |% Q8 T8 V ?, C" [5 E @.DrivingHome := true;
2 p0 m+ F0 M. U rgManager.tryToStartTransOrder;
5 h8 V) N- }; `9 e" g if @.Destination = void; d% E0 Q) [3 ^6 [1 r9 N
then -- no transport order for vehicle @, [- F/ [3 k n
@.Destination :=7 S2 J) W9 w3 H# d2 w5 X( H6 n% w; E
rgManager.nearestFreeStation(@,track.~);
& _1 k3 C" |' i ], c( R6 p newDirection(@);
/ Q. m; {, `7 `6 J! l7 j6 ]7 q if @.Destination /= void then/ ]5 W+ N# f2 a- ]- R2 J6 L+ R
@.Destination.NumReservation :=
, H+ ^$ W( \: N @.Destination.NumReservation + 1;
% U2 E- L) ~+ _ end;
& a7 ?+ r* }% _. v) \% `9 }8 [3 r @.CurrIcon := "drivingHome"; \+ \7 ~; G0 U( z* e6 n$ k7 P
@.DrivingHome := true;1 q0 `- G! ]; m. d c
end;) o% `& R7 y4 k: j, ^* W; T" w' c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ [2 G3 k; [1 L/ U
part := @.transpOrder;
/ l, g1 z E( c part.move(@);-- load part
2 z ?/ `3 j6 H! W @.CurrIcon := "load";1 Q& G: d) H6 I) H @- \% a
GlobalDistObj := part.globDestination;
9 t! q- A0 D- [! {! O assignLObj := rgmanager.rgAssignL;
0 [0 J! F0 k* v row := assignLObj.getRowNo(GlobalDistObj);
! A, k+ q/ g" r: D3 b# o if Row = -1 then -- since 70
2 r5 K0 b# n' {: Z5 N if lan=1 then
% E( |( i' f$ g" g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 _& E4 |4 f; `& E9 W5 @% _. X
to_str("in der Andockstation: \"",?.~.name,"\""));& |: T/ s, n+ T4 g! i6 ?" C
else
. X9 v0 d$ d" J) q6 N: t& L4 L! v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) S# c: Y# s: ~" J! F I* D to_str("in docking station: \"",?.~.name,"\""));
) }' y$ o; k7 j4 d' C6 M end;4 ]8 c6 s' Y9 |; W# X e2 ~" w9 G: O$ n
else
$ w, C: N; L7 ]6 A) M7 Y @.Destination := assignLObj[1,row];8 r1 X1 ?$ Q0 K2 f; ?7 Q
end; 7 s5 S h8 I4 x
newDirection(@);
6 {) v2 l" J+ f {8 t1 ]9 I6 x1 s @.HasOrder := true;
# ?+ T/ ^( D" D: J. D. }9 v end;) O4 T9 A, u1 W1 U+ V9 q
end;
- }% U- H) u2 nend; -- of the method9 I( q/ M- Z+ o5 k1 T6 `8 ^
|