/* called by: entrance ctrl of the object 'track'
& v; `* k) {4 I6 \- m1 M; ^& ?*/
- z! e8 t$ G# r O" T8 \- Fis% A( G% F) z* ^* ~! T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 u9 F" f9 s9 n$ ^) qdo
9 ~/ c/ l& G2 \/ T- A+ H6 f Lan := rootfolder.Internal.Tools.AOLlanguage;& r& o- A( a7 T: ?% ]1 W
if current = @.Destination -- else return( K1 E( ]( D% S1 A* o
then5 M f$ g# h: J% b6 S K
@.Destination := void;. a* M$ J) \) v- F2 R0 P8 K/ x' o
if @.occupied then
% Q8 x7 C+ t- Y' k8 m' \! b4 c part := @.cont;
! ^4 M" [- u/ Z; ]$ y8 B; F5 Y @.transpOrder := void; j; N* K' e5 @& G" }+ P w9 G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: l9 j; ~- g! u) y9 h, p* z @,root.eventcontroller.simTime);! b& u( _, g$ C+ T/ ~5 t* m$ t
@.HasOrder := false;
1 w4 @; }9 n1 Y# S @.DrivingHome := true;
( Q; Y( P4 t* i6 \& P8 u$ j rgManager.tryToStartTransOrder;' T1 r+ \: `5 K' s# i
if @.Destination = void9 l1 u* R5 p% c8 m7 j
then -- no transport order for vehicle @8 C. \4 ]9 U& C
@.Destination :=. V7 {6 F' t5 Y' k x4 h ~+ r. f& j% S
rgManager.nearestFreeStation(@,track.~);
1 C% ~/ y5 i1 @4 K0 {3 \ newDirection(@); 4 b0 L- v T% D) U) l
if @.Destination /= void then+ }: X/ o) ~! U0 `& ~ g6 P
@.Destination.NumReservation :=' H9 r( b' G. [ a" u
@.Destination.NumReservation + 1;" G+ B9 ~! \% G9 M6 ^! A
end;
) `+ @/ A. s1 n, E9 T8 l+ R( X6 N+ v @.CurrIcon := "drivingHome";
) a# D* E3 K% F# p @.DrivingHome := true;
/ S# ^/ I3 _0 U+ |% n7 ] end;# b' z+ w9 v) V& R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* j$ v+ ^, s; K6 f6 U9 l part := @.transpOrder;
. [& U& U0 ~" H% l, n+ [) s part.move(@);-- load part' ~0 n: m- I' ^8 Z0 h1 U
@.CurrIcon := "load";
* q+ }) p# v. h% g( f1 a GlobalDistObj := part.globDestination;
- F, W3 a% P/ S4 {' B, H assignLObj := rgmanager.rgAssignL;( @) k S2 X/ J' z9 t
row := assignLObj.getRowNo(GlobalDistObj);1 L# v- T) K7 E: n! D% p
if Row = -1 then -- since 70
+ y( H% N8 Y' `7 n. _6 I if lan=1 then
* q1 \% L( d% Q% S( H$ p, Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# K; Q, {5 T( ]& x5 u* V0 P to_str("in der Andockstation: \"",?.~.name,"\""));
* N2 _0 k9 g% l$ ^6 u9 Y else( x2 S% p1 w) j9 z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( ]- X* E1 Z- w to_str("in docking station: \"",?.~.name,"\"")); : v( |; x# [. V: w% m* @
end;
8 i5 w- U U5 X0 L: e. q else
: S8 _) z) X$ D7 W) Y3 `5 }$ L @.Destination := assignLObj[1,row];" C) W7 [/ ^' W
end;
! c+ m1 u1 X0 g; [6 Y4 a newDirection(@);6 d9 N5 x Y3 _: T' k
@.HasOrder := true;
+ S1 G/ T6 j8 }2 S: Z2 [ end;- [- w+ P/ n2 f) x, @
end;
$ U: G7 O/ t, pend; -- of the method. n0 v: s" [4 f: c1 u, ~3 U
|