/* called by: entrance ctrl of the object 'track', b: F: c5 r: R6 M3 m. h0 j8 W7 g
*/
) e# A% h3 {5 ]7 x6 @is
. z( h5 [* u" u* m( j9 \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% C$ D- Y! `5 E3 Cdo
+ `# o5 O: z$ n" m, g1 s( _$ l' B Lan := rootfolder.Internal.Tools.AOLlanguage;& Q t. U2 o* Z$ |. s" G2 f Y
if current = @.Destination -- else return1 } V2 E( J# C
then5 X& P' B" ?. p: Z( F
@.Destination := void; T: r3 h, K8 K9 H! F$ F
if @.occupied then
" h: {7 @6 n% \1 D9 ?' Q" }! O3 U part := @.cont;
, _9 t2 S3 y/ A# ` @.transpOrder := void;: j8 f4 V% A. ^, E7 C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 E. x9 A2 q* p4 d! o: D @,root.eventcontroller.simTime);
0 U8 H# l5 b, y @.HasOrder := false;' ]. T9 ~( p. N) ?4 M) K2 s& h
@.DrivingHome := true;
7 S" H) _$ S! w rgManager.tryToStartTransOrder;
. A: H1 o" }, P* U7 A* W5 Q if @.Destination = void; R; I2 Q' z }0 ?3 h
then -- no transport order for vehicle @4 E7 X8 R- k2 j G2 ]5 X9 p2 a
@.Destination :=
/ U; y' _9 G8 a rgManager.nearestFreeStation(@,track.~);
& ]5 \# ?+ j. k$ M- O0 } newDirection(@); 8 Z7 h: X) r, C: u' x3 \& x# u
if @.Destination /= void then
; m. q$ U# M/ e0 E4 M! ~ @.Destination.NumReservation :=
4 v) {1 R- E' N4 E/ g6 ~ @.Destination.NumReservation + 1;% D3 e0 Q: i! }9 J
end;
; I5 v" V! R6 O/ V& {( {# T @.CurrIcon := "drivingHome";
. q; u% r3 w2 ?' q! I @.DrivingHome := true;2 G; W* z% {& g9 Q; D
end;$ F, I9 P" k" J+ }- z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 N7 J+ d/ D. i0 A; O; Q8 F8 @ part := @.transpOrder;, {+ a: S0 r+ q
part.move(@);-- load part8 e2 g' c/ l) p. o2 m- n {5 Z
@.CurrIcon := "load";: Q' C ?) O- j9 W" |
GlobalDistObj := part.globDestination;: _6 k: F5 d* W# ?( t" @! M! |
assignLObj := rgmanager.rgAssignL;* A( m( A" e5 o9 ]* a9 |* C1 ~% F" R
row := assignLObj.getRowNo(GlobalDistObj);
- c* L b0 p; p- v if Row = -1 then -- since 70
& E* H+ O! C: I2 T& v1 P' d2 t if lan=1 then
5 i' A% z$ n1 ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# O) |3 _$ c, p0 Q$ Y* l C! c to_str("in der Andockstation: \"",?.~.name,"\""));
" f- W0 R4 w; R) A8 R5 I$ b else0 I; ]$ K8 }6 u7 W( [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 H1 h8 t& o# m6 N to_str("in docking station: \"",?.~.name,"\"")); 0 _; U9 I" K* ]9 V
end;' c3 o c. P7 g4 L. L6 ~! b
else
* W. X* `4 n. s; g( D @.Destination := assignLObj[1,row];1 w" M' L' Z+ P- j5 D \- h8 ~& l
end;
, x; Q1 h( `- |, Q) A newDirection(@);
3 B, d" K$ A- ]( Z$ }0 m! @7 S- x @.HasOrder := true;. m. h3 z6 W- @/ `! |
end;, ^1 l0 ]' q1 ^9 B# {
end;
& ?5 E+ u0 a3 |* ? G. w% P5 w* Gend; -- of the method ?6 l2 O+ e. x9 V7 |2 ~0 z- ?
|