/* called by: entrance ctrl of the object 'track'0 J1 b6 q8 n8 n
*/
* @4 V2 G ]) n* u2 H9 ]6 [is1 R1 J9 b# u, a! O% D$ v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* m# L. D: K5 N o& |0 `5 q+ X' v
do- }/ @/ }7 z- I/ p0 F0 P
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 e# l% l' ], z/ v if current = @.Destination -- else return
' J$ }' [! D- x; z+ V5 T7 R then
- \: h% p- Q2 ^9 E @.Destination := void;
- G! t( e8 U! @" | if @.occupied then% E0 o7 L) z; J( o: X: v6 n
part := @.cont;
2 m( v- O9 ?$ ` @.transpOrder := void;
0 _. }/ W3 q/ b, S0 X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ i4 ]) D8 o g
@,root.eventcontroller.simTime);
E O* [/ Q5 o" P; S+ S, | @.HasOrder := false;
* I9 r0 [5 E+ `, d0 A @.DrivingHome := true;. u" J' ?2 a4 J' v g
rgManager.tryToStartTransOrder;
8 U6 T* K1 ~9 U( s( @2 M if @.Destination = void
% ^9 j2 P, D3 |4 e7 l" \0 `. l then -- no transport order for vehicle @
3 U- ]* e; p+ d) j0 g9 Y ?4 M" X& z @.Destination :=" R( {3 L3 }- x( O. r7 ?0 }
rgManager.nearestFreeStation(@,track.~);
& n& c. _7 p0 u/ e5 J newDirection(@); & W) h! K! C! C6 a9 K3 u9 X
if @.Destination /= void then4 ^. w5 ~1 @/ E
@.Destination.NumReservation :=) [8 @/ V2 S0 e! d+ K# h
@.Destination.NumReservation + 1;: Z- W* v8 I9 [, `
end;6 k5 A1 y% p8 K( u
@.CurrIcon := "drivingHome";
6 N! z/ [& ~+ ?$ ?3 g- _ @.DrivingHome := true;9 ?* A' l: N& g) p' F; W
end;
5 c1 _( n b( l else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; n3 N- L4 J: n K6 |% U: x part := @.transpOrder;, o# G: e4 T! Y6 c$ |, H
part.move(@);-- load part5 p# B, ?3 s$ Z& ?9 e' s& n
@.CurrIcon := "load";
# F% \9 M& _% b5 C" u GlobalDistObj := part.globDestination;2 U6 ^& c9 w. o1 w3 ~- V) ]- l6 d$ w
assignLObj := rgmanager.rgAssignL;
1 E/ q7 k; o+ y. T! S row := assignLObj.getRowNo(GlobalDistObj);
9 F# W- ?7 e( d9 [& J& `( W if Row = -1 then -- since 70+ |$ o! |8 a4 j
if lan=1 then
+ G$ q+ a. M& F( v: C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
x) a. T' K) k0 }: n to_str("in der Andockstation: \"",?.~.name,"\""));% P- M& D W2 n# W/ `( T1 k
else
1 g& m- _+ }* ^% T9 l8 A6 E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 P- u; c1 v! V. f( E( k to_str("in docking station: \"",?.~.name,"\"")); , U1 U; o( Y2 K; H# o* T+ x
end;$ d/ Z3 K) v9 a, [
else
/ H- ]' D% @. q# [1 R! ]4 l! W @.Destination := assignLObj[1,row];
4 z6 D; Z3 Z0 l9 T2 R end; $ T, l5 L: `1 d. B6 S
newDirection(@);
7 X K) Q7 f3 e: E3 ]- {( h8 [ @.HasOrder := true;: h( R( C# Q% O2 M" b& l3 f
end;0 G& l+ I4 \, v/ D) D: u8 [
end;; H% w/ D# r. A
end; -- of the method
/ E% \+ y7 t5 q* d, N |