/* called by: entrance ctrl of the object 'track'6 C3 s- {* F* c; f- n+ O
*/
" [+ f& F8 k) P2 G' }7 K: eis: I) H: t( P' f) ~; t D
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
C( T, U% L9 mdo4 ?1 J: _1 H* t
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 [/ m# L/ A' i! ^) K! c6 M if current = @.Destination -- else return& U) M! g1 U/ p% H1 ]0 ~: F: H
then
7 g! Y1 B# Q) J2 ]* b+ { @.Destination := void;( n, c. A! {. \" w. T" Y
if @.occupied then
# J$ T: W# L! r% [9 m9 K part := @.cont;
) P- W( C$ j- F; i! \; C9 q6 H @.transpOrder := void;
# o) F% @5 o. ~, Z! T2 E; u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ r- ^. R, a6 |$ v$ \2 Y- x @,root.eventcontroller.simTime);
& }2 x7 w+ S1 O6 M @.HasOrder := false;
6 n" E( r, i& w4 D8 w( H& v. w7 a. G @.DrivingHome := true;. b. W9 U2 l. F' B7 S
rgManager.tryToStartTransOrder;* f) p/ Q5 r1 S. `
if @.Destination = void
* u5 \1 T2 K( b, w v" }" O then -- no transport order for vehicle @1 F8 F7 g! P* B: q P5 B
@.Destination :=
2 G4 C% O7 ]6 ], c" T rgManager.nearestFreeStation(@,track.~);
3 m" J1 V) @ b7 n$ t: j+ q newDirection(@);
. r" L. T3 p7 ^+ | if @.Destination /= void then. n6 z {! N( H: { e5 ?
@.Destination.NumReservation :=
* K8 m3 x. M; p0 J+ w+ h @.Destination.NumReservation + 1;
4 }! j, _: P0 k' D% u$ l end;
8 `+ g ]; v1 J% X @.CurrIcon := "drivingHome";
0 _. P T4 P6 a4 L$ I# D: N @.DrivingHome := true;
+ w( F2 C/ n8 q end;
1 o0 _- Y' z7 V: v else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( N- a2 @9 W( A9 d: s E part := @.transpOrder;: Q+ V4 z1 g2 n, S7 V) V) |. y6 @8 N
part.move(@);-- load part- J2 e9 X7 J( R2 c% ^8 i: a! B7 C" u
@.CurrIcon := "load";, |0 Z4 N5 _, J2 \. y7 j% P
GlobalDistObj := part.globDestination;! L$ N4 f7 j% \( W
assignLObj := rgmanager.rgAssignL;
4 Q! l1 P. _; i" a row := assignLObj.getRowNo(GlobalDistObj);# [& A; p5 i$ D$ @
if Row = -1 then -- since 70# P% o: R6 ^ I1 w9 V
if lan=1 then
' L5 [: A" c# U9 u4 y- p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& ]+ e! Q1 S: k/ M5 I8 m$ Y( D to_str("in der Andockstation: \"",?.~.name,"\""));
/ k8 W. Z- E/ ? s else% g! R6 I# C/ c2 M$ Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 |& e/ R+ f/ M2 j to_str("in docking station: \"",?.~.name,"\""));
) ]1 y" H+ h2 a; p$ @" ^ end;) J' o0 a& e5 `. [
else9 u) O. k4 E) f6 _
@.Destination := assignLObj[1,row];8 l4 a# M) h* C% E5 D
end;
6 y5 H0 [ i/ c+ L7 ?6 b7 i newDirection(@);
9 e% f( ?; `4 f5 J: w @.HasOrder := true;, g4 ^' T/ m3 \4 _+ y$ F g
end;
: ?. g+ r0 `/ t8 n- Z6 C end;) P, G2 |+ b* @6 Q/ O/ q; W
end; -- of the method
( R3 d4 K' l; ^) C |