/* called by: entrance ctrl of the object 'track'
# p9 L# q: n7 @9 q: v- s*/+ t6 v3 p& }$ G2 j& ^4 a6 g1 W; I( [
is
) Z- I$ g: W4 L( k part, GlobalDistObj, assignLObj:object;row,Lan:integer;& `( w% B& N# O
do( W% x* h6 D8 A1 E
Lan := rootfolder.Internal.Tools.AOLlanguage;. n( i) o0 e: j0 T# C
if current = @.Destination -- else return! `) f* ~ s2 [4 a! @, C# X/ K4 q
then% ?2 n$ y7 g3 W$ }8 _4 v- Q/ i. Z
@.Destination := void;2 W f! D% ]8 l- F+ j
if @.occupied then l9 ?9 I# ~/ P3 D6 F* J* o
part := @.cont;
, l; e; g* Q; P$ ?( t @.transpOrder := void;) L9 t! v4 t. K% F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 z z! Y" F- v# I0 k @,root.eventcontroller.simTime);
* X" a& p7 o9 j5 \ x; w. V( I+ }+ | @.HasOrder := false;
% W7 o% f' k+ H0 M) S+ T @.DrivingHome := true;6 ]7 I7 p/ r9 P, {3 G) ?
rgManager.tryToStartTransOrder;- n* u( L0 Q) G* i+ X. x
if @.Destination = void% B, R7 f" k+ ?7 k
then -- no transport order for vehicle @5 ]0 G* e8 E- ]% f7 U- z" F
@.Destination :=7 ` Z$ m, M; j* r
rgManager.nearestFreeStation(@,track.~);
& r9 N% ], P5 x8 X4 d4 ? newDirection(@);
, U# v! |2 z7 q7 k- A if @.Destination /= void then3 m2 W( w) l% v3 k7 t
@.Destination.NumReservation :=
; e: L- ]$ V& m) b) J% r% x @.Destination.NumReservation + 1;8 q$ h! L; w8 _5 p$ x2 r5 O1 }0 w* i6 [! ]
end;$ U( e: d3 Y/ E2 G$ C" C
@.CurrIcon := "drivingHome";8 F8 D- z1 s+ ]% x
@.DrivingHome := true;8 v7 p. k, Q' O
end;
" k! h4 T2 k: q) K, W else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 G" i5 [3 F# v3 ?% } part := @.transpOrder;
( J# s: v9 o% U0 I+ |: c- n) W part.move(@);-- load part
: r% ^$ ]1 P5 {/ w5 T& e/ N @.CurrIcon := "load";
- h1 ~: T% y& j4 _0 F( _, | GlobalDistObj := part.globDestination;- F& T W" k- ?" z7 I1 y
assignLObj := rgmanager.rgAssignL;$ V& c' D, D% l
row := assignLObj.getRowNo(GlobalDistObj);* N! R2 I7 E* l* V
if Row = -1 then -- since 700 I- Y7 |) e- `$ Q1 [6 ^- q
if lan=1 then
' y! p9 J7 E0 f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! S8 y$ M1 O$ R6 }. E to_str("in der Andockstation: \"",?.~.name,"\""));
8 R( P" Z) V; M! s7 R else, z1 ^5 T! Y* h% K% J0 ~' d, l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ d4 |$ s+ B- L# H1 R3 N; T6 y+ B to_str("in docking station: \"",?.~.name,"\"")); 5 o- x$ h* F* a3 B% d# X& x+ M
end;
5 q4 R- u |3 l q0 k else
; O6 }' e/ k, \5 B; l$ I' H, { @.Destination := assignLObj[1,row];+ x1 t8 E2 S+ O1 [& S( P2 x( A
end; 8 s: c/ H8 H* i, c. K" F; x0 O+ O
newDirection(@);
# y- g6 t$ z0 F# a8 C2 ^4 v4 P @.HasOrder := true;
: A2 G5 B/ M% @; a: j. W/ O end;" S; R; T% K7 t$ o0 W
end;& l+ W. a7 v! s/ W7 l
end; -- of the method
- @( i/ L6 U3 K. m3 u% t9 f |