/* called by: entrance ctrl of the object 'track'
# C2 L+ _# r' M! i9 r8 P- `* v*/
. O$ G# m: C: q+ E6 w+ k; Tis4 C. z: |9 L3 r5 t m$ n5 ^7 u1 g
part, GlobalDistObj, assignLObj:object;row,Lan:integer; l4 r2 n/ \2 {& q- T
do
; M: G" W5 m$ x; G# J" k Lan := rootfolder.Internal.Tools.AOLlanguage;
/ o- u; E) n& Q* i if current = @.Destination -- else return
3 |0 p3 J( s) I8 }! n then0 X% q) Q: e5 F, b. q" O
@.Destination := void;7 ^$ Q$ S( c4 c" b& z2 Z
if @.occupied then! W/ j$ G+ l b8 Y4 f
part := @.cont;
% T- t/ O. c, n9 i, M @.transpOrder := void;
, D2 a- v. J& V8 Q }$ b6 h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( e n j; K- s! k @,root.eventcontroller.simTime);
! \& g! k: M* `1 L @.HasOrder := false;
. D) {5 p; F* S4 c- E8 Q @.DrivingHome := true;
6 X% u, j3 ]# V) Y, |4 P rgManager.tryToStartTransOrder;9 t' b, \9 F9 Y6 e
if @.Destination = void; V2 q. e; _2 m( s
then -- no transport order for vehicle @
4 l# Q6 g3 @! |5 g( s! P @.Destination :=- Y g! j* B% B0 p2 ]8 ?
rgManager.nearestFreeStation(@,track.~);% |, `; A4 f3 @; a
newDirection(@);
9 i/ M1 _% ]: L" J& V& A5 x. I& R if @.Destination /= void then
& w! `6 y3 s" C# p" u @.Destination.NumReservation :=
* j4 [: h: r! y% d @.Destination.NumReservation + 1;9 X5 P9 E5 ]* Q# ~+ x" b" ^. R
end;
) b! i( M3 f( N* R. e9 g! z% [ @.CurrIcon := "drivingHome";
, ]* X; c/ y! I% Q! H% U2 g @.DrivingHome := true;. A7 J& x1 M* U. a) l# x- h( q& h
end;
! V% a& ^9 K% B) _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ C* [2 Q; o& Z: z: s+ I* m( y
part := @.transpOrder;
* X M1 F0 I7 ?9 V/ f part.move(@);-- load part [0 T' B8 x* |3 b. u- l' j" h
@.CurrIcon := "load"; O9 Z3 o2 ?: I& \- p9 N; }
GlobalDistObj := part.globDestination;
' [; a9 V2 J4 Y5 t0 Q assignLObj := rgmanager.rgAssignL;' y# \& d+ j& \
row := assignLObj.getRowNo(GlobalDistObj);
3 Q U8 x! `; \% {0 M: ~ if Row = -1 then -- since 700 }8 g6 P) P) D
if lan=1 then1 B: v* L+ v7 }( A' p0 O
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 q1 d( T I/ R
to_str("in der Andockstation: \"",?.~.name,"\""));
x9 X% o; j0 O3 R4 y else
) \$ ^* F# n- T& N, B1 c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ s, r7 E: K3 j$ [
to_str("in docking station: \"",?.~.name,"\"")); : @$ e( A( b: q
end;
' W7 Z0 d/ D9 r [% M/ K else9 }- [! P( } K& w
@.Destination := assignLObj[1,row];
5 g# I4 f. a1 @8 |- R end; + p' Q: G; I6 F; R8 f6 f6 b9 ~
newDirection(@);! F. z3 o8 b3 h0 ]- N
@.HasOrder := true;
. w/ V- B6 Y3 I( W& w/ e end;4 U6 I7 m2 u; {; G7 g
end;
2 a3 [$ h0 r k- b0 _end; -- of the method
$ Y/ H3 H6 m* A' `5 w8 L |