/* called by: entrance ctrl of the object 'track'( g: _8 W6 {, v$ a
*/
0 V" k K# {3 V' r8 c) cis y; E8 H3 [- t2 H3 v' ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- U" c; ~# H/ l! P V3 a' Y# i: {# Y
do) |3 `1 x0 ` q; I
Lan := rootfolder.Internal.Tools.AOLlanguage;; F* P6 O7 Q: g. f1 {% A
if current = @.Destination -- else return
2 J0 D8 o4 u/ T1 Q then N( G0 S# V5 ^3 X6 }2 S/ _4 @6 \
@.Destination := void;; ~, z( R3 k4 B0 ]/ M% ^
if @.occupied then( b- r8 w: @2 D
part := @.cont;
. z* @3 _) m8 o+ x2 e @.transpOrder := void;
+ T$ i/ h7 }) D( ~" u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) U; h) H+ N, ~( m @,root.eventcontroller.simTime);
" D$ i2 C% i! U: l @.HasOrder := false;8 J& J) m7 \9 }+ u
@.DrivingHome := true;
* a, M4 y9 \# T! h. Z- X3 U rgManager.tryToStartTransOrder;& w( w$ g/ q( [+ t& I
if @.Destination = void2 g; @! }' L' W" \/ I) e( ^
then -- no transport order for vehicle @. }5 l, ~% k9 N0 E, `! G
@.Destination :=
& n1 v5 o6 t8 m* u' E( ` rgManager.nearestFreeStation(@,track.~);1 d, B* ]: I' d
newDirection(@); % H) F! e6 |" [& C* w
if @.Destination /= void then$ g1 [, @# }- q4 s
@.Destination.NumReservation :=
: }; A0 ?7 O5 q# W7 l3 z0 E3 T @.Destination.NumReservation + 1;- r1 w, r+ W3 ~3 F6 i
end;
9 q: x, O4 Q, p, B @.CurrIcon := "drivingHome";& ^7 X5 ]3 i' s/ F. L
@.DrivingHome := true;* E$ K9 D/ D' @5 `
end;
2 H- w# M* l; o j5 \* b/ P2 ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 M6 Z1 X; r+ B/ V) \
part := @.transpOrder;: D7 a5 B: v. K+ I! ] n [& p
part.move(@);-- load part W9 X5 [& h% f, q
@.CurrIcon := "load";5 {; Q' `! ?; B" i9 |
GlobalDistObj := part.globDestination;
) j( B5 ?" G3 O- J6 {( T5 ^ assignLObj := rgmanager.rgAssignL;" \, S$ @ b4 K, Z2 H6 e5 r
row := assignLObj.getRowNo(GlobalDistObj);! R$ R: _' i# x/ i
if Row = -1 then -- since 704 K+ u1 l7 t6 m3 h4 a
if lan=1 then
% N$ @( P6 i4 O9 x ]5 R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) }8 I/ u, h, Q' N" T* @ to_str("in der Andockstation: \"",?.~.name,"\""));
) ]6 Z8 P' g4 l" f8 U else: [4 ?( n: d) z6 f/ e- c# d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) H- ]2 n/ o4 m# B to_str("in docking station: \"",?.~.name,"\""));
. ?* S* G: j, i1 J$ W5 \ end;
$ }# l, H$ s/ S else( P) C8 J0 d6 d: s/ S! b" ?8 I
@.Destination := assignLObj[1,row];/ j7 }- j3 Y: _ W5 x
end;
# h! ^9 x: n- w4 b" \ newDirection(@);; h+ t2 \- `% N# ^
@.HasOrder := true;! R; t" n$ @ [. A. E" X, i4 u
end;, s$ T1 T" z, P3 g5 T6 A
end;
- K4 t# D1 \" ]: n1 s" l" Z( H* uend; -- of the method$ n- N, t* _8 }8 k
|