/* called by: entrance ctrl of the object 'track', y; U# n* N: R& W+ U5 Q: B/ r
*/
( |) F9 y( R/ a6 sis
; F6 ^; F7 D5 {+ X1 t- S7 M6 e part, GlobalDistObj, assignLObj:object;row,Lan:integer;
I6 \0 m$ c0 V/ @( ?0 wdo3 M6 K7 p! m, V3 G3 n
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 \/ Q# f$ N7 x+ d4 i4 O9 b if current = @.Destination -- else return
1 D+ D' j9 B6 l) _. K3 @& n then
) `6 Z/ C, q7 E H' d& ^2 J. B @.Destination := void;$ i5 E" v# h. e
if @.occupied then4 B6 S: K: H8 Q5 b6 S
part := @.cont;6 j3 \+ B2 ]! g7 w/ f a
@.transpOrder := void;$ a; q3 Y$ C( `: a5 U; K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& q, L) X. N8 b5 ^8 C2 t( F$ S9 e @,root.eventcontroller.simTime); b8 p+ k' }- v9 C% s: I
@.HasOrder := false;0 w, u5 v6 m% F: c$ q( I
@.DrivingHome := true;" K" [, E% a2 `3 ]& H1 b: E! e. z
rgManager.tryToStartTransOrder;
4 N+ m% k* ?7 `4 ~# a( ]: n& X/ ? if @.Destination = void
; I' F( _4 F8 w; U# Y. W& ` then -- no transport order for vehicle @! b* X5 R8 a! U* q
@.Destination :=
1 L& E) i, u: ~# w: m- Y rgManager.nearestFreeStation(@,track.~);
, J! J( t2 \! P1 C6 C/ j6 }' p newDirection(@);
; ?3 b( Z! Y6 a% D' y$ t if @.Destination /= void then
2 ?. k9 L6 V4 m" S+ i1 t" p8 ?) i! w @.Destination.NumReservation :=7 f0 }* v7 g) O6 S! Z
@.Destination.NumReservation + 1;6 G1 Z5 O9 h4 t$ `
end;
% F+ [3 `( s' P5 W @.CurrIcon := "drivingHome";; t, L: D& s1 p/ ?# Y# w
@.DrivingHome := true;3 K6 Y) z) B1 m) E
end;
3 v0 l5 b0 {( R5 { else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 F- T! D. ?. I |* C
part := @.transpOrder;
1 B; t: k9 [. A, H$ T part.move(@);-- load part
+ L1 a2 @1 U. r9 X% F+ l @.CurrIcon := "load";
# E' L3 ]' a- P' i. k- T GlobalDistObj := part.globDestination;
1 p- H/ a( t# ]9 D! s0 s assignLObj := rgmanager.rgAssignL;
2 h2 `5 f& R% V0 r, k( F+ @) | row := assignLObj.getRowNo(GlobalDistObj);& F+ c, K J; w# Y0 }1 \2 j: b
if Row = -1 then -- since 70
# Z: B0 |5 @& v( G! | if lan=1 then8 {2 Z6 ]0 ]. B* J- v' ? I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 T4 O2 Q. {7 t0 M to_str("in der Andockstation: \"",?.~.name,"\""));
, Z# K3 [ e+ v9 x: w else Y& U2 K8 I( V% C& _; c; W* \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& e( R& v' u9 M+ p5 {# w
to_str("in docking station: \"",?.~.name,"\"")); , y$ q* v! |2 J- K
end;
" x' O" a+ ]. a else
5 p" X4 U3 ^+ _ I. V1 w, H$ x @.Destination := assignLObj[1,row];6 h+ F9 a M. E" {* Z
end;
2 J; A. J3 H( u% c newDirection(@);1 l) }$ N8 y8 z& J/ a( ~% r
@.HasOrder := true;
3 O( A- p5 f; R6 |# g7 Q0 ? end;
7 N$ d+ _) \- u" @ q, f/ N end;
. u/ o) X4 `# ]end; -- of the method9 }' c! N* J. g2 Z0 ~4 q/ x" j- k
|