/* called by: entrance ctrl of the object 'track'9 Q+ i' U$ F* v
*/
$ Y) N5 O% I' s$ @9 p6 ~* Vis; Y5 t+ d* n% `" p$ a* F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ h- e! \6 Q( d# C3 x: g% Pdo2 ^1 |2 P' H$ G4 y0 k9 z" S& u$ k
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ X( G* V" `. E, Z; J J' z: S if current = @.Destination -- else return k: U/ _6 M- W7 x: R9 [/ x/ j: L3 M
then( a, m& c4 N* I
@.Destination := void;
' B( P& U9 m+ b, s$ i if @.occupied then4 q3 x2 @6 U2 c4 M. b
part := @.cont;
3 Q( |" n% U. V$ V! x0 p @.transpOrder := void;
: l) {4 H( K. Q$ T3 q: W9 x+ l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! y5 H5 {, ]% _& N4 \
@,root.eventcontroller.simTime);* Z" O' j; R3 b6 f, v4 R
@.HasOrder := false;
; }- e! E3 Y( Y! m1 O( b' o @.DrivingHome := true;% r, I% s& m" Q" \7 H
rgManager.tryToStartTransOrder;# ?% n! z5 G7 Z/ I
if @.Destination = void" f) m" X; J3 X" n5 Q5 `7 r+ F z
then -- no transport order for vehicle @1 ]5 C- o3 d9 l
@.Destination :=
3 z4 a2 r& n: b5 H rgManager.nearestFreeStation(@,track.~);" F5 r @ l; X& K* Y
newDirection(@); * W- E3 U; z! A( m! ^
if @.Destination /= void then6 b* j! g/ K: j7 t3 h0 y$ d
@.Destination.NumReservation :=. {4 i; N0 I. k g! U2 Y$ e6 O
@.Destination.NumReservation + 1;
7 ?( c" F7 L$ O/ c, \ B# Q" c end;
+ _* M% ^3 G+ y) a. { @.CurrIcon := "drivingHome";
" F" A+ J# T* _$ {* u @.DrivingHome := true;
* C* w4 F" a# s* E end;( m9 ]0 o, R7 N+ I& q3 g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! Y$ F. ^& p: M: h- X P
part := @.transpOrder;
1 W* K; E* ^2 @; l* T part.move(@);-- load part
/ d9 c/ J- n; r* R% q% r7 J( ] @.CurrIcon := "load";6 k9 C$ A" L; \8 _) w
GlobalDistObj := part.globDestination;1 G, W$ `9 V8 |/ H: S; t# {5 W( G
assignLObj := rgmanager.rgAssignL;3 V) w9 \: s3 F5 M6 N3 b
row := assignLObj.getRowNo(GlobalDistObj);
( h- _7 ]! m8 d3 l$ R' E, B s/ |) h if Row = -1 then -- since 70
0 r8 Y0 J U% ]0 c if lan=1 then& i' h; E+ K. X. S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* A1 m( u1 ?" O
to_str("in der Andockstation: \"",?.~.name,"\""));
5 }5 _6 E( B: l else
- Y9 i2 K+ _7 L. B+ G) Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 H; O) H: p/ y8 r$ t to_str("in docking station: \"",?.~.name,"\""));
+ X: K4 X8 _0 t, u; k. z end;* R& f% @+ I8 X2 A
else4 [, i7 m2 p1 P/ G
@.Destination := assignLObj[1,row];/ w. X7 t: y2 X5 K1 E
end; : h. l' ?: i- E
newDirection(@);
# T K+ q6 V8 y% B( o) G% O$ y3 K6 Z9 C @.HasOrder := true;
[7 g/ |, y' w8 U+ _( Y+ ^ end;, a# s# L( I8 w0 [6 ]* X9 j
end;
4 W# A1 q5 Z4 e5 T6 Jend; -- of the method
1 X( r" B3 Y, \" r& B3 x |