/* called by: entrance ctrl of the object 'track'% q" F$ H& i) t, i5 A0 o
*/
/ R$ O `5 K9 w1 i# u& S0 V; yis
7 ~! G! _ Z0 C7 }. C9 l% Z7 b part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ X0 i5 b/ N* t0 p" odo
; |9 m. K8 i* l' X/ T( I Lan := rootfolder.Internal.Tools.AOLlanguage;6 B2 X# f2 l9 D0 R0 C5 F H3 P& b
if current = @.Destination -- else return" K( W ]6 w0 @ D2 E1 V2 p
then4 h: I# e" X, R. g3 L. J1 R* ~1 Q
@.Destination := void;0 ~: c. a. o" J2 n3 X* t2 n
if @.occupied then
/ B/ E; ^, l! B$ `% I2 B2 s5 T2 m& H part := @.cont;
0 Q) Q" K" k4 x% P0 j1 a# n) R( Y& c @.transpOrder := void;0 R7 @2 `/ c: H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 t* |4 }% \! b2 c1 o7 h+ E* H% W @,root.eventcontroller.simTime);
! r8 V& G4 @( b) m @.HasOrder := false;/ E7 f5 s4 v" w. D; `* A: S1 ?5 T
@.DrivingHome := true;
+ e( Y5 |' Q; E& j8 n: C( i" @ rgManager.tryToStartTransOrder;5 r, _" q# Q) i: |2 S' E# i. E
if @.Destination = void! p; Y' g, ^1 ?' L4 f; a, U8 t
then -- no transport order for vehicle @4 m4 W3 l3 y3 b7 p1 S: ^
@.Destination := }+ K' p; p7 H8 F( V
rgManager.nearestFreeStation(@,track.~);& D" w, D( s; L
newDirection(@); 5 K7 a4 E2 \( S! d( I% w8 K& s
if @.Destination /= void then( i, C% k& r% M: Q4 P$ z5 e
@.Destination.NumReservation :=" o0 J4 T( T+ Q, E# }
@.Destination.NumReservation + 1;
% g5 G& V w* P end;2 {/ Z8 T; u ^
@.CurrIcon := "drivingHome";
7 z9 n' |3 v: T, S" c @.DrivingHome := true;
0 N' N8 a4 n: U: Z& @ end;
9 V- H! m( I. q6 z& ~" U D else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 U3 c; g* A S( |4 I! y% F" ~
part := @.transpOrder;% L* I. c3 c6 W5 e
part.move(@);-- load part1 t& A" K" ]0 i, P& f
@.CurrIcon := "load";
3 k: l3 t7 V' ?9 d GlobalDistObj := part.globDestination;
: Y& t' z; H3 K9 g# f {* D4 S, M assignLObj := rgmanager.rgAssignL;
* i1 Y8 Y# u$ k$ g6 Y* {) h row := assignLObj.getRowNo(GlobalDistObj);
8 d* K" d1 x$ e8 Q# z if Row = -1 then -- since 70) P3 E% {6 Q6 }5 u; A! X9 Q
if lan=1 then
& E& k7 `: h2 k. V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 z0 H# H F- N/ H7 Q
to_str("in der Andockstation: \"",?.~.name,"\""));0 C% I2 i& y9 j6 B( Y3 ~2 N* K2 M
else
e1 q* H" m1 H; n: K4 } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! Q: E$ H$ j1 I1 D% w* x
to_str("in docking station: \"",?.~.name,"\""));
; U& b* D* {# ?& D t, l0 t end;) n, m: c& y. L( B
else, i5 R1 a- f0 n1 [4 N; P
@.Destination := assignLObj[1,row];; A: O+ y8 t# f8 L9 ?! j
end;
# M' u' o6 D# k+ I# j' F newDirection(@);$ R+ h5 J( \# r% }! c
@.HasOrder := true;
% e9 q2 @% U, W5 j9 N1 o7 h end;7 k" [( y* I! \/ [/ r8 o' T, {8 Q" ?7 T
end;8 Z# B1 O, s6 a4 L7 G7 W6 D+ m2 ?
end; -- of the method' g4 d6 ~. K+ n( _% {
|