/* called by: entrance ctrl of the object 'track') G1 X' S: W5 F% Y
*/
6 i& E* }6 U8 l+ V- B) {+ e' M0 N" Tis
) D5 o: }3 e, ?* j; X part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! `+ P! V! m. w0 j) ]+ qdo
) D5 j% ^% t$ o% K8 P! w% n7 q1 _9 } Lan := rootfolder.Internal.Tools.AOLlanguage;
1 d( M7 v6 {6 t0 b" x if current = @.Destination -- else return" R8 X n! b1 @: e
then
% Z% a$ ^9 A( i( D! s/ a. E @.Destination := void;
9 M7 p3 W: C( \" H; A$ `/ i if @.occupied then" ~8 Y6 Z1 g/ {
part := @.cont;
* Z. s, h+ V2 ?4 { @.transpOrder := void;
" E5 J) K, u |- l B3 S+ ~( S, v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 {3 } U4 W/ u- V H; \ @,root.eventcontroller.simTime);2 x8 b, t9 }/ E* J, Y, D
@.HasOrder := false;
l! y5 ^/ Z( F @.DrivingHome := true;
; L. |! F* S( P# }& r rgManager.tryToStartTransOrder;% e) K( v% i7 j% e' D5 h- R# `9 S
if @.Destination = void
Z* c: Q9 B: i9 H( d then -- no transport order for vehicle @
6 q& [" b2 `, U/ j8 t" C @.Destination :=* S3 h1 g( E+ n3 B
rgManager.nearestFreeStation(@,track.~);
) p4 y& `$ A( q) Y2 e* n7 ` newDirection(@); 1 P5 A( U8 o- X% M
if @.Destination /= void then
w8 w0 g9 ?. |( A: u$ @ @.Destination.NumReservation :=
# S. ?1 P% @2 e6 k0 D6 x: }* r @.Destination.NumReservation + 1;
) e& m2 }3 G+ A4 y$ l* C9 |, O end;- ~* S# T: z" X, `3 o+ Q8 z; w
@.CurrIcon := "drivingHome";
}5 c9 ^$ a3 y! p+ n @.DrivingHome := true;8 \5 H9 S+ U; c) W6 y" F
end;
' D3 `, C$ M+ }' J7 S( b! G else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% @6 c8 Q5 X0 U7 ~* c. u part := @.transpOrder; H* j/ [* s @
part.move(@);-- load part
! T5 c; F, E! B) h5 w- u @.CurrIcon := "load";
& K9 B* S! r) I0 \9 ?$ _ GlobalDistObj := part.globDestination;0 p9 e1 C& h9 [' i% D& |. Z
assignLObj := rgmanager.rgAssignL;+ V6 v( B" B3 H& Y
row := assignLObj.getRowNo(GlobalDistObj);
0 ~6 ]$ y2 @$ a( k6 A# b, |0 K' E if Row = -1 then -- since 70; |( A+ E( z9 w5 t% O! H' K( \8 ^
if lan=1 then3 x8 V) h+ d8 b8 N6 O7 \: ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' @1 o# X4 @! M" x* i2 T0 {
to_str("in der Andockstation: \"",?.~.name,"\""));! ~# O. \7 S, a3 \" T: p: \
else
* f; h `7 J0 z6 C& N- `3 ^& C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), `2 k' S' M' C1 E
to_str("in docking station: \"",?.~.name,"\"")); & R$ u( b$ g" h, w) i. n! [: e
end;4 ~) R7 I5 q+ [
else
: |) ^' ? y1 m$ S( E7 G @.Destination := assignLObj[1,row];
% n& B" Z$ ~- j8 g- A end;
% L; P9 Z& H4 [' ? newDirection(@);' W, n4 ^6 p0 B5 h: ~) w; v$ T
@.HasOrder := true;
& _9 z0 C" T" u; K8 q' n/ ] end;" v9 G9 {* s7 I, \' W; N# f0 q* K
end;! O# M. @% }; h8 n' a# J
end; -- of the method' G% J/ D+ \# F; Q
|