/* called by: entrance ctrl of the object 'track'. {3 e. q7 ]( f
*/- x2 p3 r3 L7 `/ ?& i
is, z- g: v, G/ u8 ~- \& r! Q# Z+ R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 M: I2 G3 l9 H4 z
do
- p( w; }" D. M3 z$ q- u Lan := rootfolder.Internal.Tools.AOLlanguage;5 Q1 |6 U4 f7 e: {+ F6 D
if current = @.Destination -- else return
, Y! ^9 ~" W# A, o/ ~ r1 `( K then
8 G: ~: j& U; W. G2 N% W( ^ @.Destination := void;9 @/ i! H3 V/ F% l
if @.occupied then) N/ X) I: a W+ P* |. C
part := @.cont;
/ v0 c p/ \; w1 t8 U. G @.transpOrder := void;
0 B% @' q* `5 }: i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 E9 v1 }7 S! o! o
@,root.eventcontroller.simTime);; @4 V: g- P$ A
@.HasOrder := false;1 {5 K) ~' K7 k! p" X4 v$ V6 I
@.DrivingHome := true;9 v) f/ Y) X' S I2 q
rgManager.tryToStartTransOrder;
% O$ I3 j6 Z- ~2 K5 M if @.Destination = void0 g E8 g* F( [
then -- no transport order for vehicle @2 R' F8 d- R8 G5 }8 I* O
@.Destination :=
0 K; @3 q, y* j rgManager.nearestFreeStation(@,track.~);) j* j. m2 n! f6 [: Z, r- {7 m
newDirection(@);
+ M+ z9 e% i% i if @.Destination /= void then% g9 f4 U" G5 O. R( C, A
@.Destination.NumReservation :=
6 A7 u' {9 O- f @.Destination.NumReservation + 1;
/ j9 n& ^6 M+ t7 r8 S* N% U; x end;1 X# c! Y3 Y4 I+ R3 ?- G$ `4 V
@.CurrIcon := "drivingHome";
( P+ i8 Z/ w. y2 ]& o @.DrivingHome := true;
2 R, Q2 r# }# j$ a( q& y) W end;+ j3 \& U& A0 `: ]1 _+ H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! s% V% ~4 C, k4 W% _1 l part := @.transpOrder;3 j! |5 u3 w% k/ q
part.move(@);-- load part, [* {' y3 x' i+ `
@.CurrIcon := "load";
$ ]# k0 u; P4 S GlobalDistObj := part.globDestination;+ F% S$ p/ l- q! E. t- H( T! \, Z
assignLObj := rgmanager.rgAssignL;
" `' B! |8 u- a0 L& S row := assignLObj.getRowNo(GlobalDistObj); \) `* Z3 z Y# ]1 v8 g9 E. K) Y
if Row = -1 then -- since 70
' Z7 N: }& a o8 J* ?8 Y3 Q if lan=1 then
5 y0 K; i: K) M5 P+ V) E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' x' j6 x Q0 a* ~" Y' s. x
to_str("in der Andockstation: \"",?.~.name,"\""));3 I" l1 ]) I9 ^ B, Z. z3 D0 P
else* P0 s5 ]3 T U9 P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) M. U7 x. v0 I" o1 N' O' T; ? to_str("in docking station: \"",?.~.name,"\"")); / k3 j6 @) ^5 }9 G! I' ~6 N
end;5 S8 A( ]: l# \3 P/ l
else
( D4 }8 Z( ?0 `4 d+ E @.Destination := assignLObj[1,row];1 T, b( o. y7 l
end;
8 k( ~9 h* }8 R f; |& w2 X% D+ ] newDirection(@);
' j8 ]+ }( [2 t, T" e/ q @.HasOrder := true;
u4 h5 G9 Z( y1 e! O end;
/ f, d0 T! W5 ]2 i a. e% { end;* j7 ^, o: l9 p0 Y7 B2 ]
end; -- of the method$ ?9 a- a1 M4 Y2 j3 o8 Z4 M
|