/* called by: entrance ctrl of the object 'track'- O' A" m) X+ g
*/
3 r! l/ j% Z3 |3 x- Gis* ~: I; e: c( Z1 i$ s+ ~' x1 B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ i1 ^# j. T3 I5 D( V' Sdo& b/ o3 r. H& M) b/ r
Lan := rootfolder.Internal.Tools.AOLlanguage;
- \7 H7 R* F4 W4 v0 p+ ^' r if current = @.Destination -- else return4 L! V; E6 x- ^3 F7 m: }! S r7 T
then+ m: O% R4 Q4 ^" H/ ]! A* M
@.Destination := void;0 _' \) ~( E; G4 w, q# F
if @.occupied then9 B& T% ?% A6 Y6 }* Z% i# k
part := @.cont;: C$ {4 ^# P; p% |
@.transpOrder := void;
0 f: W# s* ?* e; F) m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' q# o- [$ |6 @# s1 _/ L; g* F
@,root.eventcontroller.simTime);6 ^! Y; E- C! _7 q
@.HasOrder := false;
1 B2 u4 Y7 Z6 x* K @.DrivingHome := true;$ B9 C; x0 V& i7 z% i
rgManager.tryToStartTransOrder;
' V8 r/ _5 _, F7 g# \8 ?" M2 j if @.Destination = void
/ t0 V7 ^3 V8 k; {9 @ then -- no transport order for vehicle @
3 T8 R$ \" t4 I, Q @.Destination :=& V4 r( M$ I/ C9 l/ \+ x' k
rgManager.nearestFreeStation(@,track.~);& S" ]! Q6 B- P
newDirection(@);
# ~! z% c% ]/ s/ P6 [7 x' x if @.Destination /= void then
$ J1 @: T' \4 M/ Q5 o @.Destination.NumReservation :=# z' q& S7 D, {( ~/ H6 n0 s" }+ W, `
@.Destination.NumReservation + 1;% Y* R" D+ L r' Q) `
end;
, S% z- {9 Z+ q% t" W @.CurrIcon := "drivingHome";, u' R5 L5 T, y! ^
@.DrivingHome := true;/ m7 Y! [1 C7 o: d( C+ k4 `
end;
7 b8 @+ h/ L! C5 w- _- E# V+ ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- ?% }' p# a% O1 n. z part := @.transpOrder;
) q- }$ S, t1 l! L4 w6 M1 S2 Z I part.move(@);-- load part
0 C$ g) n1 d$ {2 v( { @.CurrIcon := "load";
1 b3 _1 \3 o5 g, ^. W GlobalDistObj := part.globDestination;6 t( L$ @0 }2 V2 }; b" z/ E' e) ]: E
assignLObj := rgmanager.rgAssignL;) c/ P; ^, `! ~
row := assignLObj.getRowNo(GlobalDistObj);2 X3 r' A4 B0 P* D \/ Z
if Row = -1 then -- since 70
. m; u1 R$ }: M- H; L6 _ if lan=1 then) t) Y' p+ a* n, A1 s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) g$ T7 P) {1 S' \; V8 q
to_str("in der Andockstation: \"",?.~.name,"\""));
`8 |7 _+ n( O, C" D3 x else
3 A$ z: f/ g2 V3 G a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ v/ {9 d3 D0 o$ l: B. Z7 V to_str("in docking station: \"",?.~.name,"\"")); 8 Q, r/ o* o2 s, R2 v. A/ L
end;
L! {; y8 W. @7 t else4 ~/ C, K$ [/ N/ Y B6 A/ D
@.Destination := assignLObj[1,row];' d5 J3 Y# ~! |4 s# t6 S" \
end;
; v6 c8 h! X' b. S newDirection(@);
0 P; i4 K8 J7 l2 B' W: `- ~1 p5 u @.HasOrder := true;
$ A) c5 v o; ^9 s) U end;
" A. A6 J5 d8 v% p: j% D; T8 ~ end;% C* |( u5 b( i/ `
end; -- of the method
; y- k" V% ]1 [- u* W; k& T |