/* called by: entrance ctrl of the object 'track'
$ T; M) y: P9 [*/
# V @* |* U# mis
' d7 ^4 A# ~7 I: a; ?: n part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 c4 ^, h8 {- B. S3 q' X1 r
do7 F D( i( L* F. _5 C- A0 w% n
Lan := rootfolder.Internal.Tools.AOLlanguage;
U+ c- `1 n; c9 | if current = @.Destination -- else return0 {3 ], h0 B p {( B
then
5 x p. D4 q0 \ @.Destination := void;; ?9 s' c9 ^' J& P! x
if @.occupied then, a4 l/ @* z7 k) P+ D
part := @.cont;# R" m! h% E7 s, d" C
@.transpOrder := void;
# T% L( m; `( i& ]% A) m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 i9 Q% ~* k6 V+ K" y" `
@,root.eventcontroller.simTime);1 o. N3 ~, I3 @+ b3 x5 A) H3 X
@.HasOrder := false; z: H$ D5 t ] i
@.DrivingHome := true;% v9 f i( @( e9 f9 g2 h
rgManager.tryToStartTransOrder;
* w8 `3 N% Z/ ^) q$ ?* j$ S* S" c if @.Destination = void* A3 {8 G4 K. ]1 O' J
then -- no transport order for vehicle @, G' X0 u, T8 A6 M6 ?; a
@.Destination :=4 s( y& M t/ Y( d$ Q
rgManager.nearestFreeStation(@,track.~);4 S, @* z0 Q1 G1 l! f+ _
newDirection(@);
) X L2 z7 e6 N/ E8 s9 f if @.Destination /= void then3 \( z0 W' s3 z5 U Z
@.Destination.NumReservation :=4 |2 R: |6 \7 y& x5 P4 }$ o
@.Destination.NumReservation + 1;
3 `1 r+ W. w0 S7 T. T) A end;/ K3 X+ M+ U& @/ p1 j {& o, R; S
@.CurrIcon := "drivingHome";
! ]9 H5 I& G( X1 f- F% Z4 R1 Q @.DrivingHome := true;) i. ?: ~ y; `! }+ I1 \
end;
: ?" S3 Y$ k8 \6 J3 o7 \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 \# M5 y; F b M9 R4 I; X, F
part := @.transpOrder; S; g" D& B/ z8 \4 j! r6 V
part.move(@);-- load part9 L1 n( Z n; n2 R- h
@.CurrIcon := "load";
' f/ M- a! j7 L; ` GlobalDistObj := part.globDestination;
, D0 r" W. ~8 c* h5 }; x assignLObj := rgmanager.rgAssignL;% b! ^# g3 l$ I" g# Z- A
row := assignLObj.getRowNo(GlobalDistObj);3 ]8 f& v1 m/ c2 X# r* ~! k
if Row = -1 then -- since 706 i9 I# t$ d- w$ r- _; q+ i& g
if lan=1 then) G+ H% I# U% x7 \' z9 I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! K0 ] b- c: {! }; d: g1 `1 r
to_str("in der Andockstation: \"",?.~.name,"\""));
, | e& i% m9 {: l6 | else
2 P9 k, |6 k: k: i* R8 u: v3 V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ _) c4 u' O$ B: N3 {
to_str("in docking station: \"",?.~.name,"\"")); / D/ J# @! p2 Z; Y
end;
3 p( X5 ?+ J$ k else7 S9 }: q% b G7 K4 n' D5 Q$ O/ C
@.Destination := assignLObj[1,row];) L8 t7 s9 F2 K, Y. \
end; * r! B. w* t$ w
newDirection(@);& E* ]' f" \% ^) G$ p1 Z0 ^
@.HasOrder := true;
$ A3 M7 e7 S! f0 A* L9 e/ X# Z; ?9 w end;8 p% ]2 x' O, B
end;0 |5 A% `8 J7 t( I; a( C3 a0 U& i
end; -- of the method
, U* Y1 a) y) x! b, n! [ |