/* called by: entrance ctrl of the object 'track'
! O4 ?% }& G$ b* `$ U. }*/2 ?! y8 }( n( Z0 Z8 k; k" K0 _
is+ Q. x/ e% b) J" B' ?8 b3 ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& o j% Y1 c8 Z7 U ^" o* ]. w2 Wdo
# ^6 B# ~0 Q& b- P+ S5 L9 z$ X Lan := rootfolder.Internal.Tools.AOLlanguage;# V) E* ^& r, `# X! X x- o
if current = @.Destination -- else return W. G6 O% i7 W E" z
then
- d2 t& g) ?( n B: |" N( C e @.Destination := void;
8 F) u: p. n$ q9 R+ V! L3 b. d if @.occupied then
1 q+ G `5 ~' R! ^# j' q8 ^ part := @.cont;
- B. L: R# F3 P- \- k( }1 D9 V @.transpOrder := void;
5 R+ H" b) B0 g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 D% D4 v' o3 v$ P7 E+ w" m. p @,root.eventcontroller.simTime);
3 Z# X( b" j5 y, U) i- n0 H @.HasOrder := false;
8 ?+ M. w" g$ ~( X$ W& X& Z @.DrivingHome := true;
5 K9 {2 l: G8 h+ P2 G5 d) m$ x+ A rgManager.tryToStartTransOrder;4 x% v% G! f9 I3 S# [; q# w* q) o6 O
if @.Destination = void2 u- A2 @2 F* o) W# P! E; x! j
then -- no transport order for vehicle @) x9 [" Z' P# a) l" j! e( c3 k
@.Destination :=
- d9 h1 {' M+ g& j1 L) u rgManager.nearestFreeStation(@,track.~);$ M5 w' S0 |! `1 ]: ^& `, ^7 u
newDirection(@); 8 O$ A4 \/ t: k
if @.Destination /= void then
0 ] s7 ^; _2 k( n* |7 k8 E @.Destination.NumReservation :=
" }! l X+ z% J M; y: @ @.Destination.NumReservation + 1;
* F8 @( q* [4 E! ]4 O1 D) t end;! s4 T3 W+ j/ x
@.CurrIcon := "drivingHome";9 @5 q, I; K" D$ G4 i2 m% B
@.DrivingHome := true;
0 [. x1 ]: Y" Y$ e% H end;5 e0 r5 ^3 i' \9 n1 x1 m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& T* S# P: w. B4 [0 W
part := @.transpOrder;
5 d: \+ Q& a9 R( M. } part.move(@);-- load part7 s- D2 ?7 l. N; F4 x. [
@.CurrIcon := "load";: W! B2 a; w" V7 z7 m2 A
GlobalDistObj := part.globDestination;0 a9 X7 ^- W6 X2 t1 m! w( U
assignLObj := rgmanager.rgAssignL;
( R: L9 Y5 ]1 g row := assignLObj.getRowNo(GlobalDistObj);7 F! Y0 l4 z% Q
if Row = -1 then -- since 70* c* G9 U1 w5 _" j( O$ z+ Z
if lan=1 then B1 }; {: P$ N" `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! v2 z x% G( S# d# d- L
to_str("in der Andockstation: \"",?.~.name,"\""));" q$ c' a3 S4 t
else
+ G2 z8 z4 u! x5 \# i2 Z4 k" z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
O; \* Q0 ?! {) i2 v+ O( ^ \9 r to_str("in docking station: \"",?.~.name,"\"")); 4 D4 H0 v0 w8 l. d0 Q
end;
" x8 U; O" L, ?/ D else! G, d" f% N9 A3 b, a5 M5 T$ a, E
@.Destination := assignLObj[1,row];
0 X2 P+ s0 }" P) L* j end; ; I' v& S' M5 E3 V0 _
newDirection(@);
) e+ M4 _* ]* f, P; f: i1 Z/ o @.HasOrder := true;; G% r* Q) p3 P3 @ Y5 v0 {- k
end;( Z/ v; \: e. T% I/ v) C9 L7 K
end;
) K; {) v5 z: ?5 Q nend; -- of the method7 h5 J( y2 Q! @# ~) \9 [( I9 d, t Q
|