/* called by: entrance ctrl of the object 'track'2 W5 d5 Q3 p' X) ]
*/' }( i: W* C+ T& Z8 }
is
+ @! i( G" m) r1 l2 { part, GlobalDistObj, assignLObj:object;row,Lan:integer;- [/ Z2 J7 O( c- j& _5 O' S) a0 S
do
S. s, B8 ?/ A O, x: ^ Lan := rootfolder.Internal.Tools.AOLlanguage;
5 F% D0 b) e7 ? U( v if current = @.Destination -- else return
& p+ O: j: l6 ~6 U, V3 c then
5 o3 N* y5 }; m" }, e* P0 b @.Destination := void;% T: B( W1 T& u5 r+ d+ [
if @.occupied then
0 e3 i9 r4 o5 a4 [) H0 Q3 D& Y9 F part := @.cont;
5 P( g$ W: t' U6 a( _8 p' g @.transpOrder := void;
/ f9 D+ y! P6 p- A" M3 q1 |+ Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 @! N6 C% ^* x& t @,root.eventcontroller.simTime);
: f9 s- o2 O) b @.HasOrder := false;
' ~1 w3 U' f7 `- K @.DrivingHome := true;
, N( v+ ?$ I) m9 ]2 ~ rgManager.tryToStartTransOrder;. a7 [* D) d. a y$ m
if @.Destination = void; F( @ a; @4 ]- a- a
then -- no transport order for vehicle @
# W* K( t4 h) I, `7 a+ X3 ~5 G @.Destination :=4 c0 O/ @( z7 ^0 |, N Y3 f4 [
rgManager.nearestFreeStation(@,track.~);& c7 e0 A: ~- ~: ^; [) U1 L( Y- c
newDirection(@); + C& T t1 n/ [+ Y* _& {5 H. ]0 t
if @.Destination /= void then
% m% f& B) j8 h" H( i @.Destination.NumReservation :=# H4 `7 X- @: K( J9 z. `
@.Destination.NumReservation + 1;2 u, e$ z6 n" K; y7 u. v
end;9 a' w% {7 w: a2 K x5 e
@.CurrIcon := "drivingHome";
0 K& w/ A6 S8 x% @ @.DrivingHome := true;8 J; V: Q% |/ j, t: @* T
end;
+ |. n( a! ]2 P" r. R7 I$ ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ t, y1 p2 C4 l part := @.transpOrder;
5 s& U' v! s L Y- u part.move(@);-- load part/ B$ G7 d; }4 }3 ?7 d
@.CurrIcon := "load";1 u2 b+ y! e. V9 Q, D4 w( Y3 r
GlobalDistObj := part.globDestination;5 Q( r0 m5 @* |2 V
assignLObj := rgmanager.rgAssignL;$ p# g; \. B0 x W
row := assignLObj.getRowNo(GlobalDistObj);8 {; P3 B1 q+ ^) U$ i7 I
if Row = -1 then -- since 70
. ~( p! p! r' y' v if lan=1 then
* z8 d# ?5 W1 u: W- I% f# r+ u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," t8 n7 K$ |4 G* H0 I, [$ C
to_str("in der Andockstation: \"",?.~.name,"\""));% I1 U3 ?3 Y: L
else7 L* V) X6 e2 k+ q4 N0 G! a+ Z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: B" p# o! g5 d8 \2 y. @$ w to_str("in docking station: \"",?.~.name,"\""));
$ A7 T0 b4 R3 ~. k7 Y/ z! E end;
% f) O! o& C* G/ L2 r else$ d& G$ @4 V. g* f+ t" L8 C% d
@.Destination := assignLObj[1,row];. G# F+ R! e* b7 x: m( F
end; 0 v+ [1 w6 [; J/ E: Q9 d# Y- K! t
newDirection(@);
9 J, K/ ^) ~4 ^3 _4 K( a- Z; X( A1 Q @.HasOrder := true;
; {' g2 c4 W6 P2 n end;
* I2 P6 @6 o3 ?; o9 u/ z6 j end;
Z, S0 O, l# L" C! p) r5 r! Jend; -- of the method8 b' U1 _' ~. i0 H2 W. ]
|