/* called by: entrance ctrl of the object 'track'* a' v+ ?' d! v% Z: ]3 }4 q2 m
*/+ H0 W; _4 V- R1 Q
is
' F* u6 M0 Z, B* M. v* \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' R: Z% ]7 h M& S9 sdo
5 a8 R4 C% D( {( z0 X Lan := rootfolder.Internal.Tools.AOLlanguage;
, B' G1 ?5 n% w% I if current = @.Destination -- else return
]& T1 ^/ K7 n2 \( M then
+ _. f& o& |% u% W @.Destination := void;
& t. Z# A6 \& J* R# ]1 U! W if @.occupied then7 {) a% y) M1 |6 I( q$ P/ q, H
part := @.cont;0 }" O% u. Q$ I1 ?9 _' {9 N7 e5 t, g
@.transpOrder := void; L4 h/ n+ ^2 ?/ \$ w# q0 V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' L- `- ^* x# a, I Q0 F; j3 b( P
@,root.eventcontroller.simTime);( o6 l. h5 ~4 @7 C+ a, c
@.HasOrder := false;9 Q9 K% |+ O/ l
@.DrivingHome := true;
2 H9 x5 @2 t# y5 a+ |& V rgManager.tryToStartTransOrder;* R: k3 u y0 ?2 c& m% C
if @.Destination = void2 [. H9 U* p) V; K+ ]* i
then -- no transport order for vehicle @
5 g2 L- o) O ~9 u+ e% u. m @.Destination :=" N" w" G/ e( @& Z, {0 g) d0 X
rgManager.nearestFreeStation(@,track.~);/ [' D ?2 u# H. q' v
newDirection(@);
+ r, q, f- p9 B6 D" E if @.Destination /= void then
5 Z) m. {. k( p& i) ~8 T) P @.Destination.NumReservation :=
7 X! d, _8 k% R$ P; U! _ @.Destination.NumReservation + 1;2 _7 ?$ j4 Q$ K5 s) U! ^0 f
end;0 c! Q$ F" V8 P" b' l4 `: X4 b7 l
@.CurrIcon := "drivingHome";/ @4 n9 v& Z6 T+ m: D' A$ j
@.DrivingHome := true;0 h0 L% n: L# i, j
end;- x8 x2 K v# E2 U/ O3 @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. j: G9 S6 ~6 H' Z+ A9 h
part := @.transpOrder;
5 M/ Q0 S2 v+ x- k( [ part.move(@);-- load part5 T' ]" l$ T/ G( n$ n* u& ~8 F0 R1 R
@.CurrIcon := "load";' t) n: P9 G, U- X: t+ W: x! E2 v
GlobalDistObj := part.globDestination;1 ~, Q$ l7 V2 m* d+ }
assignLObj := rgmanager.rgAssignL;
9 g( m4 S5 d1 C6 {# q% b row := assignLObj.getRowNo(GlobalDistObj);- f; b, |+ k3 ? `) f% B4 I2 B
if Row = -1 then -- since 706 D4 j b2 D. c$ C# d/ \" y
if lan=1 then/ M, ]7 Y! ], j% N3 z' I( M0 _) U. V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! w: |+ j( Y: M7 @3 e9 h! `/ n Q c
to_str("in der Andockstation: \"",?.~.name,"\""));
* |* n$ [. `" X$ m* b else
+ u9 @# B/ J" A3 T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 d$ j1 `' L' A+ `" L to_str("in docking station: \"",?.~.name,"\"")); * @# A9 {& \# U7 l! @! I6 l
end;1 Y! E: W$ R5 u5 ?. D0 N
else
: ?4 j) |; g/ d% x @.Destination := assignLObj[1,row];, @6 i p% x2 _! W* Q$ g
end;
8 Q$ e6 z V1 `+ u newDirection(@);/ k& D- `. Z" C$ W1 n6 F! O o: a
@.HasOrder := true;8 `8 i* Y, S, q7 Q* l% _
end;4 E( r: n1 X. @0 A0 d, h
end;
) U9 U+ c3 m% D9 }- [2 H aend; -- of the method
+ P, a6 {, ^$ f: a |