/* called by: entrance ctrl of the object 'track'+ B1 ?: G. b1 [ Y1 k* j% K2 f6 \
*/+ y0 ~9 x+ Y7 V
is
% _- b: k0 \% v. g5 K" Z0 }9 ~ t part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" F2 v7 t8 w) x8 a. tdo! c3 ?$ W* e8 H% q
Lan := rootfolder.Internal.Tools.AOLlanguage;$ S) ]. X) v8 G' Q! s! f3 U7 V
if current = @.Destination -- else return
( E( N- x: @# F+ M then5 a* P" S8 H7 @
@.Destination := void;
/ _- C5 I- a; q4 ^3 W* P if @.occupied then7 D- v2 W5 c2 d8 m' l' e
part := @.cont;! o' Z* x+ T7 @- `) B. x
@.transpOrder := void;
" N( w, J9 Y; E3 F2 i: ], Q" g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, w! T h8 p1 B; p4 |3 N
@,root.eventcontroller.simTime);
. l6 G) |4 G- P0 P, U @.HasOrder := false;/ N5 m. W; u* ^4 D: m- s$ @
@.DrivingHome := true;) I) |% m5 B1 P
rgManager.tryToStartTransOrder;4 X; L* y. c1 E4 K2 _
if @.Destination = void9 M$ }7 P# r& G h6 q! N2 e
then -- no transport order for vehicle @3 N& Q! q. ~5 P* {
@.Destination :=6 T8 }& y2 t1 s0 V- v
rgManager.nearestFreeStation(@,track.~);
3 U. z# G" t* W newDirection(@); + F. U+ h7 X9 v
if @.Destination /= void then
K& ` q t7 x @.Destination.NumReservation :=5 [$ W2 G( l( N0 @2 [( k
@.Destination.NumReservation + 1;# ~6 S1 H! ^$ x' u% ]/ B; K
end;4 A1 {$ G. u8 }" E0 o$ E. d6 a
@.CurrIcon := "drivingHome";% T0 Q, p7 T. \- x- ]% b
@.DrivingHome := true;
9 _- y+ V3 E5 x$ V& i end;0 M* ]2 } L# J) p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 [0 K; I2 x0 ~ part := @.transpOrder;& i( q& P* {7 J1 R/ |1 _7 H; ^, h
part.move(@);-- load part$ K9 i% {1 o) d! p2 C8 ~
@.CurrIcon := "load";
, R, U. n, D- z GlobalDistObj := part.globDestination;2 R8 {' o) f. y# h* d/ Y
assignLObj := rgmanager.rgAssignL;( B \# y9 H6 G" }& w/ q- y* o2 T
row := assignLObj.getRowNo(GlobalDistObj);: B% L6 B5 k1 H9 Y7 W
if Row = -1 then -- since 70
: H5 d _& T Z2 M( R' H if lan=1 then
& @5 `0 s8 Y9 p: _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ g+ j4 U* ~: ]( Z0 }" ^/ w to_str("in der Andockstation: \"",?.~.name,"\""));
8 i& k% I' S- g+ d. q4 C else
& V; b f9 b- R( J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 U# Y3 P2 D; P
to_str("in docking station: \"",?.~.name,"\"")); ' h5 b" r8 G; R3 K; X' x9 g
end;. H. H' N0 m0 n, s! g" ]& i
else
9 }# N- ]: \8 R0 w4 V, r" [: d @.Destination := assignLObj[1,row];
% i* n0 G" F0 M3 O B0 d b end; i: A( T( X j) k/ {) U
newDirection(@);
9 c& Z" @0 M0 f0 }( G! H @.HasOrder := true;
/ [+ O! \4 R1 Z( {2 l. f end;
% I% h4 a1 O, \& k$ @ end;
G' F% ?3 o% v0 M7 o- eend; -- of the method% J; R; B' V6 G% \. _. y
|