/* called by: entrance ctrl of the object 'track'
" u+ s" T9 D' G& O*/
, P# o, ^1 Z' C2 T4 {is
4 R, o6 q, B% ^ _: F }% a part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% e4 l& w" N6 o _8 g# M, qdo
4 X/ Z- C: h6 ? Lan := rootfolder.Internal.Tools.AOLlanguage;
& r* q5 }( [! a" s2 b if current = @.Destination -- else return
0 ^4 M& K0 V4 s N# c! ~ F then
, w$ f _% B9 w- @4 o" I @.Destination := void;
) Z8 P0 N3 O6 L: b( s& A if @.occupied then$ j5 f; ~& n+ [
part := @.cont;- k. j `! ~7 a6 ^
@.transpOrder := void;1 } a: U; e) c+ ]4 M/ q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) e& G/ w( R& {) W! @, I$ ? @,root.eventcontroller.simTime);* z0 R: w) N Z2 q0 G
@.HasOrder := false;
3 E$ C5 E8 T+ ^ w: `5 i6 u; [ @.DrivingHome := true;- S$ A( B' X0 T3 o$ G6 ?) u* H; n
rgManager.tryToStartTransOrder;9 G) t7 g' y+ q% K: T. K
if @.Destination = void, K. p9 j) d, O' f' R" i6 {" g
then -- no transport order for vehicle @1 L. d* V+ s, n# n( n7 x' h
@.Destination :=
6 Y! @2 @- e8 _, d2 W) o6 ] rgManager.nearestFreeStation(@,track.~);/ t! Z6 o3 n# W% _6 S' c
newDirection(@); : z$ A+ v- m a) n2 @3 Q: @
if @.Destination /= void then" V. C, P" U E7 ^" [8 {
@.Destination.NumReservation :=
* \0 I/ f6 E" m, C# _ M( @% [' D- j @.Destination.NumReservation + 1;5 G- t$ w, [% `9 h+ m
end;
0 h5 J2 y) z( _1 V+ W% m1 Y" k4 [3 n @.CurrIcon := "drivingHome";3 U' l4 d3 t* P; Y. f6 x' U, A1 O
@.DrivingHome := true;
( V5 _% Q& K+ c2 e" c& Q, } A& [ end;! b& a2 k) Y, y. k; y0 _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' p: Q! H) d7 _+ O3 G) r- G* Q
part := @.transpOrder;
+ X7 F* V- {9 ^ part.move(@);-- load part: `" X2 h4 Z: m, b
@.CurrIcon := "load";
' [4 G- h- u) }3 ~0 c; M$ M GlobalDistObj := part.globDestination;
: ?! Z8 H9 i' A assignLObj := rgmanager.rgAssignL;
5 Z( G2 |: H$ s7 H row := assignLObj.getRowNo(GlobalDistObj);6 D0 l# c. q# m+ _
if Row = -1 then -- since 70
- J- d8 {# u( l# T4 T6 j6 \ if lan=1 then0 e$ ~3 m3 Y- R# y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 {8 [8 _% _8 T- B) t
to_str("in der Andockstation: \"",?.~.name,"\""));) D: J# L5 ` ~% K4 k+ w
else; G' e9 p6 K0 J: B' _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( }; c% F/ \% h* u9 Y% D* Z to_str("in docking station: \"",?.~.name,"\""));
+ x, G* Q, p0 Q" w6 ]2 B, R$ m end;
% |0 x3 d9 f3 L+ R. [& |( k, a else
& j: h/ ?3 W4 U) F @.Destination := assignLObj[1,row];
: G8 P+ D; }1 R* J3 v end; 7 A% I+ j" y: O# J! j; W
newDirection(@);
4 }/ @* X: |, K) l6 k- M. a @.HasOrder := true;% a! W1 }% m; x+ i0 A! r* n
end;/ P/ G! K: Q: N+ r8 F
end;
- G+ Y$ J) ]+ v; hend; -- of the method! q' x$ U. K) {- w
|