/* called by: entrance ctrl of the object 'track'
% I: A' ~1 g9 G*/
2 X7 t) j" ?) v& u. H5 @9 Y; o4 zis ?* g& H+ R7 h; n( R U' ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 |; ], A8 a4 F9 A/ e' p' n5 l* jdo( R: g- q. d& o* K5 e
Lan := rootfolder.Internal.Tools.AOLlanguage;
' s2 c6 |, Y6 `; h. G% M; H if current = @.Destination -- else return' i/ N1 z( }5 U
then4 _2 P, }6 h6 k2 H) G
@.Destination := void;1 |4 b6 ~: }' v, v U
if @.occupied then
s* Y8 a4 }* @$ p3 Q; x part := @.cont;3 o4 I" d$ b0 n# i
@.transpOrder := void; ^; X. P* V& Y3 V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% _+ f! d+ Y9 a) `1 N3 ]4 C3 d/ g
@,root.eventcontroller.simTime);
9 B5 a+ E6 H; `, ~9 T; R7 {3 v @.HasOrder := false;, Z' m' X4 ?3 R/ M1 Y6 ?. m- c
@.DrivingHome := true;5 v3 K6 l4 _& I" g' u8 T: I
rgManager.tryToStartTransOrder;
& a1 o. C- n* `2 L0 e0 v if @.Destination = void1 x* U: o) A) H- m, j {( c# _( H7 i
then -- no transport order for vehicle @
7 u V; }/ u, x M2 ^$ P" m0 L @.Destination :=8 s6 Z) ~ b- C e, ^( P7 w
rgManager.nearestFreeStation(@,track.~);
, }( {: W% ~6 k5 F' X \1 } newDirection(@); % A) E* G! Y* r8 P- a; h! w* R2 E9 b
if @.Destination /= void then( L5 a v8 J' z6 O! j
@.Destination.NumReservation :=
8 ^( N$ Y2 y8 J' a( Y5 {! D- u @.Destination.NumReservation + 1;
2 w3 w1 {+ ]. j6 L% _ end;6 L, N- F. n2 ^1 w
@.CurrIcon := "drivingHome";
7 m1 k4 _$ _" i* S5 o u J8 o @.DrivingHome := true;
% N( c3 k4 u. t- |+ g2 j7 {3 ` end;
0 h; K3 t; n }- Q, @6 h" v0 `5 I% K4 X else -- the vehicle @ is empty, both vehicle and part are in the same dock station
}* f. P$ f3 _9 T part := @.transpOrder;
+ K- b2 y5 ^7 r. B part.move(@);-- load part
! P% n) n. p: l# t; Q; v% m @.CurrIcon := "load";
+ ?6 ?. h* m% g- o GlobalDistObj := part.globDestination;" H$ X/ U, t2 b- |/ a+ t- K0 D
assignLObj := rgmanager.rgAssignL;' z2 d2 f' o3 c; ?3 ^- T& J4 a3 O9 |
row := assignLObj.getRowNo(GlobalDistObj);
3 E" Y" J. u) c9 }& Q& c if Row = -1 then -- since 70
: h% {9 H3 {( y( W( m if lan=1 then
9 P7 s1 I' }% c9 g9 [0 f1 ?; ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ z) P. f+ h( P5 w to_str("in der Andockstation: \"",?.~.name,"\""));8 S' g- e4 ~% v3 A- a* `3 u
else
5 N: P. n% o4 L) m7 p4 Y0 Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 R% `% D6 p a/ _( S# k+ V4 d to_str("in docking station: \"",?.~.name,"\"")); 7 p- Q1 T s W
end;% `' n( m; q3 M6 r6 K6 S6 T A
else
9 l, j# }$ x: H9 n, o @.Destination := assignLObj[1,row];! }6 e g, H, j$ p) L, D/ N' p
end;
9 t2 }! C z4 R- R* L( h" W newDirection(@);. u0 s8 M5 b5 q" V6 t
@.HasOrder := true;
$ U8 t+ B# m& X; _4 E5 | end;
, g+ w! O/ C) ^ end;
, y0 t G: o7 Zend; -- of the method: e" `9 t$ \" B6 ^! G
|