/* called by: entrance ctrl of the object 'track') Y9 b; K, ^: _/ C9 u/ V
*/
$ g/ M/ i2 Z* O3 c% |, y6 Jis7 M! y! n5 a8 @3 Y. [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, t. p% K* v& z& cdo
9 g7 i. Z! E3 N6 I# w9 ]8 Z Lan := rootfolder.Internal.Tools.AOLlanguage;
7 e# u7 i( m* i9 j9 J4 a5 { if current = @.Destination -- else return
: Y8 s, d5 H! `: @: h8 C then% ~+ @* e, m o+ J1 @' e5 h% O
@.Destination := void;
+ j w8 E+ E0 g! v& f* R if @.occupied then
+ d A9 m/ z& G) } part := @.cont;) z+ p8 o4 c+ t8 K! {: b1 g0 d
@.transpOrder := void;3 w( K" ?: F" i% W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) W+ n% r! O: K- k/ D5 g
@,root.eventcontroller.simTime);
) |0 { j/ W8 u& n2 w% @; z' ? @.HasOrder := false;: v. p. O' D: K y1 E4 C
@.DrivingHome := true;- }. d4 o/ q: a. e
rgManager.tryToStartTransOrder;
7 j2 k; {1 m6 F4 M if @.Destination = void
a8 h4 q* T+ Y% C then -- no transport order for vehicle @4 x3 N& q+ y. m1 m" w% T
@.Destination :=
' p! p7 J# f/ T0 @% c' G: I2 Z rgManager.nearestFreeStation(@,track.~);: P! h" y6 {" a. y5 P( c! _
newDirection(@);
3 Q* l: Z9 m( I# X P if @.Destination /= void then
: s: H6 t$ t1 ` @.Destination.NumReservation :=
, p3 j2 o, }9 n% h @.Destination.NumReservation + 1;! J; p! @ F0 o9 g# {1 M
end;
& v$ l3 `$ B& V+ |& e( v! i0 ~ @.CurrIcon := "drivingHome";- S* T2 L$ a6 S, | g% K1 ]
@.DrivingHome := true;$ {2 ]5 x' w' h7 \# a
end;" o+ H8 e0 `( l# x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: Z5 ^; K# P, ]/ x6 N9 Y; d part := @.transpOrder;
( o) R2 g# T/ s1 j part.move(@);-- load part
7 }0 r$ z% {/ y( D$ L: \; { @.CurrIcon := "load";
3 F) L. d W9 a GlobalDistObj := part.globDestination;' Z- y3 k- Z7 B; c, X8 k# {
assignLObj := rgmanager.rgAssignL;- E0 _0 F' h( R( s& E. ~3 o
row := assignLObj.getRowNo(GlobalDistObj);
2 G6 s1 n7 j, h" x2 e. I, Z6 Z if Row = -1 then -- since 70# x) y H- H" M! v6 r, E2 P
if lan=1 then+ a) O& F. [9 N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* o0 c! g; V4 W1 e/ P to_str("in der Andockstation: \"",?.~.name,"\""));5 E2 K$ ?' o% a4 S4 {3 P
else
" d% l2 K% J K& U4 a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ Q8 R3 ~; a r3 s7 S5 C
to_str("in docking station: \"",?.~.name,"\"")); 5 h w" z1 y. C/ P5 n3 Z' l
end;
. _+ l' E- r' [0 w% C' O else
% k: w7 W. A3 E( ]4 Y6 D) M @.Destination := assignLObj[1,row];
2 Q* P6 u, J% {+ E end; 7 `+ e& o$ i; ?: q2 [" U
newDirection(@);
, w, o2 G1 \) P- p @.HasOrder := true;
8 q5 @2 R3 u2 c. f) e end;
& S4 d$ I6 }/ ^ end;
! I" ^0 p5 g+ a) {! qend; -- of the method
5 \$ j: m' n+ A3 A G |