/* called by: entrance ctrl of the object 'track'% K# ?8 P9 Y6 U! O Z) k
*/ }1 e1 L; \+ H P& _2 R' T3 R, W
is
! t" `: `5 o& a9 ]7 t# A3 ?; |( d part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 j0 K3 t8 Q& E- r' B0 ^do
) e7 U) R( h% K. P! Q( C! A. n Lan := rootfolder.Internal.Tools.AOLlanguage;. p2 p( B! l! Q$ S9 v4 m4 I
if current = @.Destination -- else return
& j0 c' n* H9 Y: \3 r( |3 ? then' K* b0 e& I! j. T5 R
@.Destination := void;, l3 f: N, R( M! L* {
if @.occupied then
" x: U7 k+ [0 ^: K6 Z5 ]) l5 r part := @.cont;6 V S4 E$ V# s7 b1 B: G
@.transpOrder := void;
) `' Y$ \6 y. [+ Q9 X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 g; R; D" \! a7 z( t$ T
@,root.eventcontroller.simTime);
% a6 P' W5 R' n/ r+ |# V! l# L @.HasOrder := false;$ z4 Q4 n% R( s6 r6 ^% h( c8 k
@.DrivingHome := true;
6 ^6 N! C0 S6 r- j rgManager.tryToStartTransOrder;
# _; R- ]. m/ ]$ X8 Z1 Y3 k- e if @.Destination = void, d, r* V5 G. \9 u6 Z: J
then -- no transport order for vehicle @
& ]5 l9 b: ~8 o- t$ e/ X9 W2 ^ q$ N9 M @.Destination :=
2 L5 E5 v' f: z( r2 J rgManager.nearestFreeStation(@,track.~);
" i) a) l# K" e: n! L2 a4 Z newDirection(@); 6 S& ~/ V$ d& p5 j0 D' |8 T8 V
if @.Destination /= void then S; [* S% C4 c5 q2 B! l
@.Destination.NumReservation :=
+ ^5 B3 S( |4 y# _5 n @.Destination.NumReservation + 1;
2 V/ j4 j1 V: {) Q2 o end;2 \" z5 E4 @1 h" D
@.CurrIcon := "drivingHome";
/ g# p$ F2 p# o! [ h0 V& M @.DrivingHome := true;
7 U+ U( t C6 v: h; |! b# j. f/ g end;7 b8 B3 L3 ?2 M% ] ~; s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ g$ h3 H, n7 v) `: g. E ?% f
part := @.transpOrder;
# j5 H# k3 E4 s6 q* X part.move(@);-- load part0 v3 h1 F0 v* q1 N5 \5 j& V' p, v# u# w
@.CurrIcon := "load";
' N' x( G2 F/ M2 H9 ? GlobalDistObj := part.globDestination;( t U5 K7 s8 R3 q! J* U6 R" d
assignLObj := rgmanager.rgAssignL;7 T, k4 O! X7 c9 \% w+ @
row := assignLObj.getRowNo(GlobalDistObj);8 c* A6 C0 L' E8 L8 X# T$ g
if Row = -1 then -- since 70
- \6 \3 l7 ?# ? r" k if lan=1 then
/ Z. D" Y- X5 C+ `8 d" X1 y1 } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," D7 k2 Q2 m+ A+ w& t
to_str("in der Andockstation: \"",?.~.name,"\""));
' f5 Q# i' |0 X+ w/ x else9 T& C1 Q' Y k' y1 I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 s7 D. |4 N4 S7 A6 B. \
to_str("in docking station: \"",?.~.name,"\""));
$ z+ z* n! ?" R. ^2 p. K end;
/ I% W! `, |) N$ T( T! B2 E else |% p) E: w" X* C
@.Destination := assignLObj[1,row];
7 P! Y9 O0 z3 S8 s1 w+ e( J end; $ C7 e$ _3 T8 E
newDirection(@);. K: a e' N* e8 k- I @
@.HasOrder := true;
: G2 M) B- J7 P& t9 N end;4 P8 w/ V3 {$ {2 T) R
end;
2 l) j& q. E9 L9 Zend; -- of the method7 x: P+ h7 f1 z/ N
|