/* called by: entrance ctrl of the object 'track'
, Z7 h' i( v0 |" E, v*/
7 Q# K+ m% [6 J8 @is
; K6 U! t$ g. H3 _; k* Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 }+ A: X2 O5 Z9 d. _do8 k- U/ o; P1 P( v- z+ u8 V
Lan := rootfolder.Internal.Tools.AOLlanguage;
( y& C/ M! H9 Y1 z/ K$ p( W if current = @.Destination -- else return
8 a, u' e9 u3 R; O, Y- g6 o6 k then
' F6 n4 v+ E4 r% E! b( M @.Destination := void;4 c$ T" V7 q% _: K6 I+ W" e6 G
if @.occupied then
7 }, F1 N2 [1 J part := @.cont; Z0 P& _& c/ F( j0 n
@.transpOrder := void;
, o2 t3 C5 X+ g( w* |" m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 C0 w2 O+ \3 N& R @,root.eventcontroller.simTime);
2 X4 L( a1 H# T4 C1 {0 o! s @.HasOrder := false;
: S: |3 ~$ t! H) L' y7 q3 _ @.DrivingHome := true;* t+ S5 h8 s' B8 Z7 }0 [
rgManager.tryToStartTransOrder;- [, M& p) Q" T, I2 ]6 |* M2 ~
if @.Destination = void
7 ?9 N, v. u' u8 [% ^* E8 | then -- no transport order for vehicle @6 A! h& a* w' Q6 D
@.Destination :=
* m w9 P/ o! }! |3 q rgManager.nearestFreeStation(@,track.~);
* f5 A" a' y5 Y$ b' w; p$ `' m9 F newDirection(@);
3 W2 k/ x' D" k* b4 R- Q3 a7 n if @.Destination /= void then( {9 I& B7 o* e0 Q3 h! {* q
@.Destination.NumReservation :=4 h. Y) X [9 l( N4 t
@.Destination.NumReservation + 1;+ _ V/ W8 `" [2 u- E4 p! ^) m- ]
end;/ F ]" L" k4 s4 a: P
@.CurrIcon := "drivingHome";5 V( Z6 `6 \: X& {
@.DrivingHome := true;* j7 _0 G% |/ J8 K2 C/ G0 z$ S
end;
5 N# w* W3 b" x; @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station N6 i8 E$ H/ R' B& }2 V- ~- a
part := @.transpOrder;5 R$ _ o, o( j4 m8 M
part.move(@);-- load part' b! G6 @+ w7 c0 U( I" d6 ~ ^
@.CurrIcon := "load";5 S: I% Q# r" {( O B! S
GlobalDistObj := part.globDestination;# ]6 V: k: h" C4 \: }" a
assignLObj := rgmanager.rgAssignL;
0 g2 ^6 ^) j# B7 n+ ]% e) \ row := assignLObj.getRowNo(GlobalDistObj);
, `: P( t" A6 H2 f$ i if Row = -1 then -- since 70
) p9 [% x7 X" [9 h if lan=1 then! m4 N3 l3 u5 i( ^$ _8 T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ ?* ]- R7 U8 |; w to_str("in der Andockstation: \"",?.~.name,"\""));
/ ]" G: A. x, `0 O( D else. j# t( `8 u* [/ J3 w% W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; F/ ?2 r& K' J9 {5 U2 T
to_str("in docking station: \"",?.~.name,"\"")); 0 h) e; I! u* m0 T3 J; d& N# s
end;
$ f0 ^* m8 m3 j else
% ?9 f) ?* J |$ { @.Destination := assignLObj[1,row];
' R( ?6 n3 E$ U" ?. M# @ ] end; - c) ^3 Q' M0 P# X9 S T
newDirection(@);2 h# d& J8 j% o0 {8 }) U, ~, ]
@.HasOrder := true;
n8 `% A8 c7 y9 M end;
) L, c n! _) X7 `) e end;
/ k0 S: C1 N8 Y* s8 ]end; -- of the method+ r* t3 `% z1 u1 B! b4 t
|