/* called by: entrance ctrl of the object 'track' Z! u/ {: g! G O* h
*/4 T# X" E# A! ~# c+ ?" t
is1 r6 G) R6 Z$ K) m( C* ?2 I5 I1 J, B8 N) r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) o) [4 @" x2 h6 q3 h3 vdo, _8 [3 R; U/ Z+ | x$ J5 k9 ]
Lan := rootfolder.Internal.Tools.AOLlanguage;
* T: G1 h2 C8 ^# ]5 L1 ^2 D if current = @.Destination -- else return3 ]. Y- q% t0 l* u0 E9 U$ q! }
then* e9 [: j" z7 u7 A
@.Destination := void;
4 T* B' S3 D3 X3 p0 `9 J! @: P if @.occupied then
$ p! r; j! `% m part := @.cont;
( b' K! m; M. {+ M4 n* \ @.transpOrder := void;! {" P+ y, d+ B# c# w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' d5 F& M" n6 u2 ]$ ]+ Q. d0 h& k1 u
@,root.eventcontroller.simTime);
! Y8 |; Y9 _9 ^% S ~3 j$ j @.HasOrder := false;) z3 v) Y0 k1 Q/ e! U
@.DrivingHome := true;4 p4 w7 r- X$ a
rgManager.tryToStartTransOrder;$ [% f% w4 [9 B# S; b- d" q4 f& d, G
if @.Destination = void8 j" ]; {) ^( p9 m
then -- no transport order for vehicle @4 G& J+ c7 |3 h x
@.Destination :=- [% w7 Y% a7 W2 E/ ?1 K
rgManager.nearestFreeStation(@,track.~);
. b8 t( Z3 ^: r( Q: a. ?3 E newDirection(@);
" H( n2 }- f1 \/ o if @.Destination /= void then
9 l1 v/ s2 Z3 ~$ e( `" W3 |8 u @.Destination.NumReservation :=, ?* y. z( M6 ~. `" y2 L
@.Destination.NumReservation + 1;6 L, W8 F& A, Y* ]& R( G
end;
# L7 n4 L8 H8 i" ^; v @.CurrIcon := "drivingHome";# }3 {' k: g, O# O2 p6 ~' ^
@.DrivingHome := true;
" u) g/ u* G- ~0 k2 n end;
, r3 z! p: D2 {! I( _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 d: E2 B) G/ I M1 N7 z
part := @.transpOrder;
' {' N" D5 G) x part.move(@);-- load part' }: i" ?3 r+ v5 q2 t
@.CurrIcon := "load";/ t( k8 L" `% p/ g
GlobalDistObj := part.globDestination;. r# v9 V) S* R1 V, U
assignLObj := rgmanager.rgAssignL;
, Q. x1 K/ m6 h9 T1 C9 m row := assignLObj.getRowNo(GlobalDistObj);. m" r' C7 j: E
if Row = -1 then -- since 705 P B! w6 N- e
if lan=1 then
4 b1 _$ ?4 k: B9 e' F4 h ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: D Z% a! Q7 i/ E3 C+ S e5 t7 K; H to_str("in der Andockstation: \"",?.~.name,"\""));
; E( U$ c. p/ C. L3 a2 [6 l, T z else
~0 y! Z! S# h7 `* ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; u& h3 t0 \; q! D4 } to_str("in docking station: \"",?.~.name,"\"")); ; O5 X& D9 o7 \/ V( A
end;. h! ^ t# `+ G, v
else% w# `+ k6 ^ T/ E
@.Destination := assignLObj[1,row];
# ~9 X' j( f& o& D7 O, { end;
. ]9 o0 u5 [1 j* M$ R4 c1 B/ S$ h! B* t newDirection(@);3 y1 u' M% }3 A
@.HasOrder := true;
1 L( H' o7 s, x+ P# ] end;
( Q, u* m: L L0 {# H" u6 F% H$ ~; t end;9 R. [. h: [! P
end; -- of the method
( b3 v; @6 l0 \* f! G |