/* called by: entrance ctrl of the object 'track'* C% f+ f# S; f1 V$ ]
*/
) \8 v5 V% n$ ^; o" a9 R* n4 O# his
/ V7 I: Z1 X9 M part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ ~) A6 j7 K7 d3 l) [do
# o. v; }7 I8 P; r# {1 v. T Lan := rootfolder.Internal.Tools.AOLlanguage;
2 G/ e s3 L# p9 F( c if current = @.Destination -- else return8 a% u2 D e3 D* q% u0 t: ?. X
then
+ G! D3 G( `) |. A @.Destination := void;: b' z) x+ R- X5 }
if @.occupied then6 M- e* \% l# W/ E6 j
part := @.cont;
5 w+ n* t% ^$ @ @.transpOrder := void;
8 E! B" Y, R9 X1 g2 ^: Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! a& D% F8 w7 r @,root.eventcontroller.simTime);
" c! P p9 w6 j1 A# q @.HasOrder := false;
# l4 a, ~) z2 S2 _, [! I @.DrivingHome := true;% H2 m% s$ }5 \+ g8 h2 k
rgManager.tryToStartTransOrder;, n% a1 l1 D( s4 A
if @.Destination = void
, c( O/ w, I" L' d2 O" L/ a0 i then -- no transport order for vehicle @
/ [. e5 k. [7 T' f: x, F @.Destination :=
+ C# V; L. |) ^) e% a$ S rgManager.nearestFreeStation(@,track.~);
6 s S2 [( m, I& i4 q newDirection(@); + S8 n7 X' V4 k4 p5 \( I0 O
if @.Destination /= void then' ~- w/ ^+ {6 O9 z5 e9 O* d; S
@.Destination.NumReservation :=2 s; {' Q6 \0 v+ d( Y4 a1 N! O
@.Destination.NumReservation + 1;* M) ?' u; d2 z) s
end;
0 r8 K9 S/ ]: O7 F @.CurrIcon := "drivingHome";
* Z% y& C/ d- w0 w' | @.DrivingHome := true;
3 T0 Y) H+ h/ c6 D! Q/ y end;" c4 Y [# t( |, N, M/ h% C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 a" \* J) M$ \0 k' C8 N
part := @.transpOrder;
; j$ v5 C8 E0 w5 A8 q8 Y- t: r part.move(@);-- load part" S1 L7 g" X, S* q$ ~) q
@.CurrIcon := "load";7 k# k1 l2 O7 N! i. |
GlobalDistObj := part.globDestination;
) J" S3 t7 n9 S: R; Q) b: I assignLObj := rgmanager.rgAssignL;
|2 O8 e! U! x) x! T- h row := assignLObj.getRowNo(GlobalDistObj);
, Q. ~. Q+ ?* a; B4 R# z& j if Row = -1 then -- since 707 ]8 \) L* L8 M* Q& d
if lan=1 then5 O; Q( ^: C, R8 u `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! z" C$ M& q+ ] to_str("in der Andockstation: \"",?.~.name,"\""));- n. p$ \3 f4 v
else( X& Y q5 k! a) ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 j" N5 f1 H! r3 I5 Q! k8 n4 U to_str("in docking station: \"",?.~.name,"\"")); ! u, f8 y4 |( o) e
end;
y+ y3 [ f" }" `5 [' F* O else2 m6 W7 o9 {6 `7 U2 ?& i- a
@.Destination := assignLObj[1,row];
; f& p! \6 k2 E& ~* s end;
- |1 M. w4 Q! Z9 ^% C1 d newDirection(@);8 E0 [! ?! z2 m {8 E' t" Z
@.HasOrder := true;
9 \4 Y0 x, c/ [. [- ^& Z: J( @ end;
; @% N# a: p% g& [; |6 \ end;
; S$ w$ ] C1 Rend; -- of the method
' s* @5 N) r* q |