/* called by: entrance ctrl of the object 'track'
[/ J5 Y" c4 K' @1 R*/" t9 ~* E$ {4 {% s3 t
is! O, h. J" ^" r% w" E# @0 j# W
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- e/ u/ y: r9 I2 ^! a$ l5 u
do, o2 q# u0 g: w! w3 R& w
Lan := rootfolder.Internal.Tools.AOLlanguage;* c& S, [" W {- q. H
if current = @.Destination -- else return
4 r& Q8 F& Z6 Q: u then. }5 N0 W8 g8 q' [( A8 f, c/ g5 n
@.Destination := void;9 ^4 F2 F; h6 l4 j F; U! f
if @.occupied then
) S; e0 ^/ g0 {% G+ ] part := @.cont;) D" ]. D9 G" o* k9 k! O* S% a
@.transpOrder := void;
, z B7 Y; ?+ s" }2 r+ Q4 O' w+ R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 P: i8 d! C, S @,root.eventcontroller.simTime);
" u7 P/ ]$ o" e/ P* Q8 _* ^ @.HasOrder := false;) B9 |6 Q. v& Q7 o6 h$ K4 f
@.DrivingHome := true;" B$ G) Z1 A" ?
rgManager.tryToStartTransOrder;, Q+ K2 l( X. u% u0 H9 ~
if @.Destination = void% D( v! g) Y% R5 m+ [* d
then -- no transport order for vehicle @
0 e _/ F7 C& y @.Destination :=2 z, m7 f1 l* _
rgManager.nearestFreeStation(@,track.~);
! s1 O5 G& D% i newDirection(@); $ A8 z; ^* v/ ^9 c7 K9 n. G& L- {3 ?
if @.Destination /= void then! B; B1 q4 J- T: K
@.Destination.NumReservation :=* W: z: P9 R( i: J% m: o _6 ]' O
@.Destination.NumReservation + 1;
9 C' c0 x+ s- I/ F end;
7 |/ p0 e |, a9 d' N3 ^# I @.CurrIcon := "drivingHome";
' m# R: o/ s9 g- ~: D7 ?7 ^ @.DrivingHome := true;
/ }# {; I1 `( T2 }5 g' e% T: p end;$ q' g% N3 m1 Q/ { O% {
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ y) Q" e2 X4 D% n part := @.transpOrder;
0 q& \: K. {% s% { part.move(@);-- load part
9 E- ]. e* b8 P8 }2 o- f @.CurrIcon := "load";
* v5 `' G; `' p8 f8 F1 F GlobalDistObj := part.globDestination;
( k% ~0 j8 z9 y! |! e5 ?+ j assignLObj := rgmanager.rgAssignL;
, S( v+ u, M2 J. }6 f! k6 D row := assignLObj.getRowNo(GlobalDistObj);
6 Q7 e( N/ S/ G6 G1 _' z if Row = -1 then -- since 708 H/ J) e) ]# W' ]! {7 ~4 w2 U7 g
if lan=1 then1 p4 T$ U$ F6 ?) }- x$ J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) X" ~+ _. l; \% J0 i' v to_str("in der Andockstation: \"",?.~.name,"\""));, q2 t& B! i5 a' T7 ?
else& C- s& T5 O# M/ B1 Y3 p: U$ [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 l: v" g) B6 |+ O2 ~! X to_str("in docking station: \"",?.~.name,"\""));
0 |& S4 y; o4 I$ N) | end;
. m- L! }/ K ?# { else
# h2 ]$ }) W: N: v4 L& M: _ @.Destination := assignLObj[1,row];( E2 C0 [2 {9 D6 A
end;
/ t6 @) g6 o5 W" d7 t newDirection(@);
3 m; B! t* ?2 n( p @.HasOrder := true;5 A6 w( A( A' T% G8 k' O
end;
7 x1 Q+ r; \& l# `6 i end;0 j6 R$ ?! v0 O
end; -- of the method5 e* ]4 {. N5 q ?; D# s
|