/* called by: entrance ctrl of the object 'track'9 h% G7 g& B& W4 V) D
*/2 O0 L, M( ~5 c$ q4 c- q/ f
is
: E- ^) O6 \7 f# O$ _! X0 R' }$ z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- R5 X6 Y! l G. ]2 k3 u" b5 Mdo
- O' ~ ?3 d( t/ C4 U Lan := rootfolder.Internal.Tools.AOLlanguage;
7 W! ^: x! a( z1 l if current = @.Destination -- else return
* }' u- s/ N3 H" q! \4 j) k then2 w5 M" h! I- n2 F- @* B0 o4 m
@.Destination := void;4 i3 \0 `1 H8 j4 }2 ^- R' V
if @.occupied then5 a2 [) N1 c" i0 S- A4 {
part := @.cont;
0 E4 Q# ^% I& W# x2 a7 g A @.transpOrder := void;
0 p. L4 | t6 e7 Y' |0 g9 v( f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," E0 ]' z1 {8 }7 I& R
@,root.eventcontroller.simTime);
- j! h5 x j$ ~4 d2 p; z- T @.HasOrder := false;
. w9 f9 C' Z2 P3 x0 q! n @.DrivingHome := true;
% P$ \6 g: \* g- S rgManager.tryToStartTransOrder;" P( _3 e+ Y$ e$ u9 X; U7 r6 `
if @.Destination = void: D5 g' Z g4 _
then -- no transport order for vehicle @& m/ g* Q8 T8 L: E$ @3 q6 R
@.Destination :=
& n( j7 P3 f' M8 j! V rgManager.nearestFreeStation(@,track.~);( {- L$ ^. o5 G3 n( E
newDirection(@); ( {, u- z; m5 k5 r1 p8 U1 [
if @.Destination /= void then
. O5 H3 }( ]) }+ D7 Q @.Destination.NumReservation :=8 e5 m: {, @1 L) ]1 h6 h
@.Destination.NumReservation + 1;
5 `8 [" S5 a- ]: g end;/ c% M% U) x. Q: X+ u! Q( B0 w
@.CurrIcon := "drivingHome";
$ A+ f3 i! @) [9 i @.DrivingHome := true;
0 q2 W! V7 @) N. M end;6 O2 o( j7 w( }: e8 q6 L8 {
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! U( f* e7 p% w0 s3 g. e* Z part := @.transpOrder;
: m! W" {. R) J! {' z9 c2 q part.move(@);-- load part
% D6 {, F( h$ q5 X% Q* C @.CurrIcon := "load";1 W7 P0 r. b; I. ^: r' Z, G
GlobalDistObj := part.globDestination;7 Q, a) H7 t4 q3 B+ f* a
assignLObj := rgmanager.rgAssignL;
3 w0 e5 w r3 v, o row := assignLObj.getRowNo(GlobalDistObj);
0 u/ h7 w0 l% I- z/ { R if Row = -1 then -- since 704 o5 S8 ]) s& a/ M. q
if lan=1 then
( R' U% i( z" t' T/ D- ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 f3 J9 [% u& i& _! S% x
to_str("in der Andockstation: \"",?.~.name,"\""));
0 f/ x4 J8 N/ ]) ^+ l else
$ v1 h& y- S& u, N* @& | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 g/ \. V, w+ Z# T! D& V- e; j
to_str("in docking station: \"",?.~.name,"\"")); # r1 s% s. m4 I1 a2 W
end;
- k$ B6 G4 h: D6 a. c else
9 A# b1 f9 ]: p: r" p" A @.Destination := assignLObj[1,row];# z7 B4 m$ M* a% c% S
end;
; ~! G' ?; } t$ C) D6 ^ newDirection(@);$ T3 e0 b9 k& T2 M. \9 X1 A
@.HasOrder := true;- x' P* r3 m- W: x1 t2 k. x# \
end;
- V& E# U/ z9 `+ z end;
" ~4 @4 J- ?( N; f4 P; Y) j, iend; -- of the method* ~$ w( i$ X: w
|