/* called by: entrance ctrl of the object 'track'
3 H' Q5 @0 T( \, f# o* d; i*/
) C; x+ ^ n9 k0 G5 W F* Tis
( e+ H1 e5 a3 {( y. G1 R! M part, GlobalDistObj, assignLObj:object;row,Lan:integer;( W5 Q* h, M, m
do" L( I3 ~+ P0 V- ^ j( L2 i+ {; S
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 W1 f8 W- a w* Z- v6 Y, _, h; a if current = @.Destination -- else return
( G" L, }7 ?; N' t( a then
$ i2 O. o) {! f( u8 L) A$ U* Y8 S @.Destination := void;6 D# {" K. k5 r, |4 ]7 \
if @.occupied then
9 ^- D0 e% M- }9 a6 U; x) b% k part := @.cont;6 [* q. N: r7 _5 y
@.transpOrder := void;
. l* T% M h( Y9 {+ x3 A- Y" d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% X5 e c- F' W [1 v+ V% Z5 g
@,root.eventcontroller.simTime);
4 f( d6 j+ F) M, _5 R# K @.HasOrder := false;6 G1 K5 N, n6 s' a& U6 P6 `
@.DrivingHome := true;
8 X$ \- N; u' I+ W0 w rgManager.tryToStartTransOrder;
* A+ |! t* K, M s' c+ }* @4 A { if @.Destination = void
# p' n4 M% a* K2 ?9 ?, F0 o2 d then -- no transport order for vehicle @# O% A3 }' G5 m+ L# ~! L& G) a, R0 v
@.Destination := r- T/ M& m0 V5 L# U4 r" T7 s
rgManager.nearestFreeStation(@,track.~);' r& k: R7 _/ k4 G4 ^: o- I
newDirection(@); ! i$ X q2 a" O* \
if @.Destination /= void then' e8 G' ^4 a% h( X1 _
@.Destination.NumReservation :=
, {9 P( J0 ^1 p) Z* ^& A @.Destination.NumReservation + 1;
% `5 \- R ^- q6 x' ~% x- e8 z end;
3 [( `9 r* I5 O" a$ J) i @.CurrIcon := "drivingHome";
( u i( ?+ W, L0 T @.DrivingHome := true;
; g3 R# b- w: s! N& i' v! n, | end;2 f& }/ s& o3 G, \# W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ A$ U( o1 d8 E3 V; O& i, c0 w/ j
part := @.transpOrder;
~; H# c7 f6 ?' c: g7 m. c+ z part.move(@);-- load part% Z9 D. ]. |3 N
@.CurrIcon := "load";1 H7 S. s3 g5 b' Y& B& `
GlobalDistObj := part.globDestination;" k5 V, X+ b, ^
assignLObj := rgmanager.rgAssignL;1 v& k* @/ V( h/ F: `
row := assignLObj.getRowNo(GlobalDistObj);
2 N% ^+ R S) q Z0 W. p if Row = -1 then -- since 70, Q$ U2 f; j4 r. }) ?. `4 R5 a
if lan=1 then
+ m3 W7 {! K. R x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; `2 H7 @0 x9 z4 a# M, R. D to_str("in der Andockstation: \"",?.~.name,"\"")); n" c9 ]/ \& T& ]; m
else
. y4 y9 Z' {4 f' I( t% d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: n. C2 T; T8 z' |: g8 b' i! _
to_str("in docking station: \"",?.~.name,"\""));
K: ?' m# l' N/ L+ j end;/ r. s6 y1 R/ y: L
else* ?; p$ @1 ~7 _7 M8 U
@.Destination := assignLObj[1,row];
+ _ Q$ Q4 S6 u/ c) H, h. e end;
6 k* G. c1 @3 K( a( ?5 j: p. w) V3 W newDirection(@);
$ V! y7 H# V+ {2 B1 r+ R @.HasOrder := true;4 }+ m$ K7 ^) a8 ]) Y4 @0 \
end;
, [' S# ~/ L. l" f1 s end;
0 m7 H( `+ P( w* q }0 a9 R" yend; -- of the method
. V0 i7 v& W6 d6 X @$ {7 _3 ~ |