/* called by: entrance ctrl of the object 'track'* A. o5 `: M6 I2 [
*/
# C8 a8 P, w9 E. @: K9 jis
9 L. T" j) `6 W# @$ u- n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 ?5 E5 H9 J- e0 ]do% ^ \6 Y. l/ D
Lan := rootfolder.Internal.Tools.AOLlanguage;# D) j5 o1 {4 C+ p2 K& h
if current = @.Destination -- else return
/ O2 I# X' o9 G3 o* ~$ [ then
- J" T6 H/ j5 ~5 K4 b @.Destination := void;
; O! P, U: ]4 t' n if @.occupied then
' D4 Z6 G6 f9 u: X6 c5 Y part := @.cont;! x5 B) n4 T5 h2 b, r" \
@.transpOrder := void;/ x- `' F; K6 I6 H n* V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- X, `1 {8 n. J0 \ @,root.eventcontroller.simTime);" ~- F9 T$ [% F( D U
@.HasOrder := false;/ Z* K/ v% @7 ~; f$ V
@.DrivingHome := true;* g. |& r/ _2 w$ r" q. e: ^
rgManager.tryToStartTransOrder;
- T# ~1 h0 ^/ x0 U if @.Destination = void
: L) z0 ~; ?- v9 Q* B9 |2 @* y: R6 g then -- no transport order for vehicle @
% \( n# I. A* y( m: w! | @.Destination :=
5 y: Q. \0 m/ C& i! O rgManager.nearestFreeStation(@,track.~);! y- y7 Q9 w/ D1 y9 [. W
newDirection(@); / _/ I8 I5 r2 c+ b. r2 s
if @.Destination /= void then9 n1 \7 y* S% ?0 |
@.Destination.NumReservation :=5 o( b. ^6 u% q1 K, {/ u8 H9 \
@.Destination.NumReservation + 1;6 a R( s1 \5 c6 q
end;
, s1 c+ a! X& M2 _! n, A0 O( d @.CurrIcon := "drivingHome";
/ a5 t* e8 v7 p3 r @.DrivingHome := true;
- ^$ P6 F7 `5 ]* X7 T$ o5 O end;8 F0 J1 d2 C! n/ b) s9 U' k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! p8 @9 w" c, r8 J part := @.transpOrder;
2 r6 I4 f) ~+ d9 i" ^4 V# ?, B part.move(@);-- load part3 i1 x+ Y8 v+ I' o
@.CurrIcon := "load";7 \2 t b( r' Z
GlobalDistObj := part.globDestination;) s$ A; T& y4 w( @
assignLObj := rgmanager.rgAssignL;
( _5 V" ]3 T' ?9 B& w% A0 O/ u R9 T row := assignLObj.getRowNo(GlobalDistObj);1 I7 J) v; ^) K! m0 P: s9 D
if Row = -1 then -- since 70
) y7 H2 t/ N& d$ h0 b if lan=1 then
; o# P$ Y9 m `+ Y/ D* j1 x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& U! p8 p w" Q2 L; r0 ~6 [: U to_str("in der Andockstation: \"",?.~.name,"\""));4 y e# ?8 O! o! N" F
else" {0 F! h1 E; b/ y# F! \9 K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# ]+ X' j% {8 p; f! Y
to_str("in docking station: \"",?.~.name,"\"")); " ~! K9 R8 P( ?8 j
end;: C$ }5 B$ g3 X& n1 O
else: @4 w& r. {0 ?) A% {* ^7 f* Q
@.Destination := assignLObj[1,row];
; Z0 l! V9 u4 g% v0 Z1 w f end;
6 i: ?8 ]4 k- D; ` newDirection(@);
& q. b. O( ^. f @.HasOrder := true;
7 f6 f. }) Q0 y7 p7 r' p* D: } end;/ W7 u1 s5 s# w) `, O% u# c
end;
# b$ B! [; e0 L# [8 m3 Oend; -- of the method) P" c; O! y: ~
|