/* called by: entrance ctrl of the object 'track'
: R% S. A5 i; d5 _7 u*/
6 a' A' y) w# R" c" Y2 @is4 c. q, v& Y& M- c, D
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! }& Z" ~" b1 r5 |) ^+ }do) u, p; C2 v1 n
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ G& ^5 l' o- o" w3 a if current = @.Destination -- else return" F! k$ ^9 Y+ Y( D! C. @, P
then
% T! g' H% N% t H8 J9 R @.Destination := void;
4 z; \( w/ g6 W! y% [( f% I if @.occupied then
& n, ?1 ^5 p6 i, X( b' ?- e9 {% r part := @.cont;
5 E$ H$ W! c5 i4 W; \: L/ H @.transpOrder := void;8 o& l# N. W D: z0 g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* e+ A# j$ j8 u+ V4 E# z1 l @,root.eventcontroller.simTime);
[/ |- |; n7 o( M% d* }$ f. P: } @.HasOrder := false;' R- M" @! B# k w2 v/ u$ R
@.DrivingHome := true;( F) a4 M6 }; h" V1 g8 g8 [
rgManager.tryToStartTransOrder;& s) s2 [& O% B0 i. Q! Q
if @.Destination = void4 n) p6 S. z# o( v/ c8 K6 u( c, d
then -- no transport order for vehicle @
6 m' M$ F( z' Y8 g @.Destination :=, H8 F1 R" Y" {" y, p! I+ n$ I
rgManager.nearestFreeStation(@,track.~);& g H- C/ [9 c5 b
newDirection(@); 3 }) I" @0 Z8 t
if @.Destination /= void then& ^, l& F! q) Q( ], n
@.Destination.NumReservation := h( k% M+ T' F( M! Y7 ]% e
@.Destination.NumReservation + 1;
5 [6 i) `. ~3 `1 {8 } end;
0 u4 Y3 p$ s2 a( q0 C: S @.CurrIcon := "drivingHome";
" A! R" y/ M6 a; o7 z) [ F @.DrivingHome := true;& R$ Y% v, Z) e; p! f# n
end;
- Q% e" I. T; q G else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 g2 K+ W0 C e0 O+ w; n/ K: q
part := @.transpOrder;0 }) \ R7 h6 z+ ~) p
part.move(@);-- load part" X# d: n2 M: T# H8 ?0 v% E1 e
@.CurrIcon := "load";
3 R2 w9 Q7 G& C" R GlobalDistObj := part.globDestination;
* i: e5 X0 j9 N6 O: _ assignLObj := rgmanager.rgAssignL;& Y9 i( s2 r' a1 R& O! h- D
row := assignLObj.getRowNo(GlobalDistObj);
Z) }, \5 K$ B- V9 y0 M% ` if Row = -1 then -- since 705 Y5 }1 ?1 d" {: T- K
if lan=1 then
1 P8 S# D' U: h. N0 g. t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) n, w v' W* @+ Y
to_str("in der Andockstation: \"",?.~.name,"\""));
# V' |8 ^! |; }" m9 {1 n& t else
( [& u4 z& e# W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! t+ b) [ ^0 I9 A0 j2 A ]
to_str("in docking station: \"",?.~.name,"\"")); 5 h2 T6 z4 O2 k3 k0 d
end;) N" ?3 P# N8 N- y5 T; Y& O L
else
- H, ?8 {4 W E; U$ j! W3 X2 L @.Destination := assignLObj[1,row];
1 D- J. L! U5 G! w# s end;
. I ]% ?; R2 H' i* M+ G newDirection(@);
" f. F: h! }$ Z {4 g1 m- G @.HasOrder := true;
! D& Z! t( w$ {& U# w) ]* ? end;* ~1 }" r! \8 ~( M* n; ?
end;5 I: I L/ }5 ~$ [/ {1 b, S
end; -- of the method; x/ G3 M8 Y0 |' c/ J* n/ Z, w$ b
|