/* called by: entrance ctrl of the object 'track': H7 i# I- U/ d" j( P
*/: y! C" T6 u; Q
is
/ p& T! J9 E6 f# a8 w part, GlobalDistObj, assignLObj:object;row,Lan:integer;
_( a4 u( J# o# vdo8 B# v% @& _" I9 G
Lan := rootfolder.Internal.Tools.AOLlanguage;( D3 e r3 Z* O; c$ L
if current = @.Destination -- else return/ S. `% M. z8 n, F1 @- b
then
8 F+ i! {) p6 x @.Destination := void;, r2 L* f" r# ^. \9 S
if @.occupied then! A+ d5 F' @$ M! g9 N$ l# Z
part := @.cont;2 @. S5 V4 E0 z6 H, O
@.transpOrder := void;/ k& K( D3 x2 N* t9 H% p: s% T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 C; i& G- a( f" P {6 ~
@,root.eventcontroller.simTime);
4 x) V! a: }3 s0 |7 N @.HasOrder := false;
: P1 G. I: o8 H; r( N7 ~: O p7 D @.DrivingHome := true;
0 D4 t) b" p: a# Q! t rgManager.tryToStartTransOrder;
# y/ @5 k9 L$ |: e3 D8 U' p' m if @.Destination = void* W S4 X7 s+ d+ f( \- k3 Q& A
then -- no transport order for vehicle @$ @* O ^2 x3 H1 Z7 d4 J+ q
@.Destination :=
7 f# F% [0 F# m" X6 B8 u rgManager.nearestFreeStation(@,track.~);, G. t4 D) n# Q/ o
newDirection(@);
; E3 x; D- h3 Y* Z: Q! c$ A if @.Destination /= void then
0 R+ |% L- j" D @.Destination.NumReservation :=, S, K3 {& }* B5 {* Z/ s6 l# x
@.Destination.NumReservation + 1;
6 Z1 i) v, G" H end;
$ K6 X+ U6 t H: M8 o @.CurrIcon := "drivingHome";4 v; W1 F6 p) E& w
@.DrivingHome := true;
6 Y& B9 y5 b% I0 B8 j; k6 } end;
% o' U5 W; d6 l4 c; N else -- the vehicle @ is empty, both vehicle and part are in the same dock station; F9 i2 i3 l1 C) K1 H9 Z
part := @.transpOrder;
% s2 m V; }4 }2 w, I part.move(@);-- load part, Q( d; J, K4 l
@.CurrIcon := "load";
. \& }7 t X0 e h GlobalDistObj := part.globDestination;
4 i, J$ [+ r9 t/ R" ~7 e/ a assignLObj := rgmanager.rgAssignL;
: a) e$ X! {$ T7 J row := assignLObj.getRowNo(GlobalDistObj);8 N$ Q5 D1 c) X Y: p- J4 a+ ]: ~
if Row = -1 then -- since 70- `% e9 ~4 J6 R* r3 S
if lan=1 then( L: A2 N+ u2 j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 d* l. U" W; q C$ X' a, a to_str("in der Andockstation: \"",?.~.name,"\""));! N0 t7 J" M- g" U* U4 X6 D5 y
else
% Z- Q5 V0 I: h0 t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: i9 V' S, E) L" l/ `
to_str("in docking station: \"",?.~.name,"\""));
Z" x' X8 R; W2 @. S, ]6 y3 | end;1 [) e# H E4 d' T# b) H- Q
else
4 o/ a. ?" A! U4 x8 i @.Destination := assignLObj[1,row];
" E" K |0 X+ [9 p, f0 i, t end; 7 u2 o0 i, U% C# j
newDirection(@);: H9 [- Q) N" H& P
@.HasOrder := true;
- a' H5 B* d( p% [* Q, |4 M end;2 z: w9 K3 @' L# s4 P
end;
/ i; w9 ?$ z1 g+ Yend; -- of the method3 U: ?9 g% h8 P! L' @& d
|