/* called by: entrance ctrl of the object 'track'6 W% {6 e, s0 x
*/
7 E5 ~- a( t" _* X- w( tis
2 T3 B$ C3 N& w* Y0 x part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 D z0 v4 z0 _2 o; N0 j' }, q* f1 \do6 n0 t# ~$ e2 h# F- n
Lan := rootfolder.Internal.Tools.AOLlanguage;; }% Z4 U+ @# y6 C b' x
if current = @.Destination -- else return
" O% C7 q0 @& i( G- {# A# ? then
z1 W+ r1 `# J @.Destination := void;6 P* o& c* g6 ?& f' v9 u
if @.occupied then8 @$ ~# E! }* c" r: F. n! _
part := @.cont;
, f' N6 j( Z* X7 @( Y @.transpOrder := void;
% A' T% Q0 w5 q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
Q! P& ~, H( o: \; Q @,root.eventcontroller.simTime);& k9 J+ x7 P/ Q
@.HasOrder := false;
# b2 |5 N0 M' O/ c% V+ |3 [# { @.DrivingHome := true;
9 d) [* h1 m! C% [$ F4 k rgManager.tryToStartTransOrder;
+ ?% m& p- Y/ s4 Z$ \1 O if @.Destination = void+ |! h. x n" R- z w$ h
then -- no transport order for vehicle @! N6 Y$ C1 D8 F0 K% E& ?" T0 E
@.Destination :=; P; K* K* `9 X6 G0 O/ z5 p9 v
rgManager.nearestFreeStation(@,track.~);2 I1 L$ \. @$ s) |$ R
newDirection(@); * Q4 f4 y1 R4 L, i
if @.Destination /= void then
* R% r! ^( ?9 K( U* T @.Destination.NumReservation :=) x [, o2 f4 E: k8 A
@.Destination.NumReservation + 1;3 G6 S; X6 k1 ^! x1 O
end;
; J H* C5 S2 l' L& o/ C @.CurrIcon := "drivingHome";
9 `$ X P, e9 c4 H3 A: t$ B @.DrivingHome := true;
" m/ S% H' `: k- Y# Y' q' o end;
' V! e9 `* m9 `( J8 H else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; K2 b! D$ t' A. P: U- O part := @.transpOrder; i+ v0 D$ _% ]: `( x2 R
part.move(@);-- load part
" b) _# w0 Q' z! J9 i2 d | @.CurrIcon := "load";) u1 u+ K6 @* R \: b8 u9 C
GlobalDistObj := part.globDestination;+ `3 G$ F0 Y0 H) v0 T
assignLObj := rgmanager.rgAssignL;; g$ ?# L2 E/ H( H2 j" L
row := assignLObj.getRowNo(GlobalDistObj);
( J3 @9 T7 v0 U if Row = -1 then -- since 70, ~2 c8 o( D0 N" B# P r
if lan=1 then1 x% F& _4 S4 z' `7 z2 k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 e) t6 w% ?6 h E+ t+ E0 O4 e
to_str("in der Andockstation: \"",?.~.name,"\""));: |* ~. H4 u; A( G
else7 I* U2 ^6 }% z) c% k/ F% k, `! l$ ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 {5 i4 ?) O9 i
to_str("in docking station: \"",?.~.name,"\""));
8 ?( ?" y: v! _3 J: m) K) A end;
, c* _ G+ _. J8 T+ g; } else7 {) L# P! Q9 Q; |
@.Destination := assignLObj[1,row];. t& ^2 \& C7 D/ k/ g( A- b! B K
end;
* o& g. k ^$ M3 X% c1 | newDirection(@);5 {2 H5 x3 ?! _) l* B. A
@.HasOrder := true;; I) L5 w$ X& y3 X
end;
' q1 S S! X; E2 P6 x( U/ D' r end;- f( F; {. R+ N/ g, d4 A6 x
end; -- of the method
7 E4 J# ]( C7 i) {- ~0 L$ H |