/* called by: entrance ctrl of the object 'track'
0 x0 q5 s% b/ S* w; }*/
3 `5 g7 N/ v" u, T2 _is
& b8 `. L; t0 {" m part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ |4 h9 P- V8 N, N; ]2 e9 m3 Cdo
& L- y$ @+ P! @8 h# ~; Q( w Lan := rootfolder.Internal.Tools.AOLlanguage;
+ Y" ]- G: w( k0 ?, n: I- i if current = @.Destination -- else return& i! C# r8 _3 E) q0 x
then! }% V, B1 t/ ? A L; o
@.Destination := void; D3 N) f' \6 |: I" \0 t. K
if @.occupied then, A; c/ E6 H0 O$ e. _
part := @.cont;
$ b- {$ w) D& m @.transpOrder := void;
# O7 Y6 k6 a' y$ }) p1 _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 g" o5 h. t% a: i
@,root.eventcontroller.simTime);! n! h! K' \- t) j+ @2 m6 @' J
@.HasOrder := false;8 y+ {7 Q3 A1 C9 f6 J2 x
@.DrivingHome := true;" N% l2 J4 ^. f( P# p
rgManager.tryToStartTransOrder;
0 j" D' I' u5 F: e' t" B& g' b if @.Destination = void: t" ~2 G3 B m. }- G; \
then -- no transport order for vehicle @
9 W& [/ I, H- T @.Destination :=1 I! H- ?/ W& y. F' W7 l4 _# e
rgManager.nearestFreeStation(@,track.~);" y! N9 |( Y0 l! H9 Z
newDirection(@);
2 ?& i- T$ K$ Z, ~ if @.Destination /= void then
- c; t; i8 P6 H( w# J3 ~! I4 I( R4 f @.Destination.NumReservation :=
0 v" b0 f l( l @.Destination.NumReservation + 1;1 l8 y2 `: i( r
end;9 E' N' ]* }! A
@.CurrIcon := "drivingHome";3 e, u' F. i! s. i* y
@.DrivingHome := true;
+ Y! \5 R# ] @* u/ N; V end;
: O% d: r7 Q" x' ]: Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 m& \$ y |& A% j part := @.transpOrder; k8 h7 T- ^3 ?$ Q
part.move(@);-- load part8 W/ P2 R7 K: R
@.CurrIcon := "load";
0 h' `. f4 I t8 M% m GlobalDistObj := part.globDestination;$ K. l: V: }5 F( ?" \# }
assignLObj := rgmanager.rgAssignL;+ z- U) C& q$ F- U. U3 h
row := assignLObj.getRowNo(GlobalDistObj);" V) k3 L/ _3 n! \- t
if Row = -1 then -- since 70( Y! F* L" h3 U ]7 O" }& }
if lan=1 then
: m" J% S; j: z' Y$ u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* }% v% I7 ^ I& g to_str("in der Andockstation: \"",?.~.name,"\""));* z C$ {# O) l: V* S3 G0 F
else3 g+ N3 w: E* N1 @, q& ]; K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) Q2 |, K: x9 |" w1 h7 d7 b4 S# Y
to_str("in docking station: \"",?.~.name,"\""));
. N" a8 p9 ^6 J( q9 D$ X( H end;
7 b* w+ G6 n3 ^# } else
( \, U* K( g. l* c& s @.Destination := assignLObj[1,row];
# O$ X8 @+ S3 x' S end;
5 |. s- ?* N& ]. E0 x newDirection(@);& s/ [6 M1 V9 M& p
@.HasOrder := true;
3 u; s1 Z% L+ u7 k3 F* l end;. B! B6 I" d# I" u1 Z# `0 U5 _
end;8 M5 q: \8 i+ l$ r% y: H8 m
end; -- of the method3 P; ?1 t" g6 [* C ?. F# D
|