/* called by: entrance ctrl of the object 'track'0 ?! W1 h3 x$ v, z% ?; d9 o6 B
*/. V5 o, r5 n2 m6 ?
is& L1 D1 P+ X4 J" o2 l8 n5 ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ R* G5 p5 i" S. _' `5 s$ ydo
5 `( V, T+ G x0 c7 c K Lan := rootfolder.Internal.Tools.AOLlanguage;
% ? Q" I8 I- g if current = @.Destination -- else return
& ]9 d8 I3 w8 \3 _0 d! s7 h, ~7 Z then
8 Y- E; s7 o, J, a2 \/ K4 u @.Destination := void;( X. u7 C% ?5 \7 W! ]" N+ M+ S
if @.occupied then- ^% W$ f) J8 l9 d3 z+ ~
part := @.cont;% c% T* I# L" t, b( n& i
@.transpOrder := void;
- D9 ^4 R# k! o# K1 P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 U# ^( p% k, n. L; J
@,root.eventcontroller.simTime);
8 h4 k: c3 \/ h( v& ]% w @.HasOrder := false;1 Q% F: x' ^. W$ P, Z0 E9 g$ `9 L
@.DrivingHome := true;
0 h* Q9 r7 A+ x* O5 E+ [ rgManager.tryToStartTransOrder;
5 Y, h# a0 }( B( W if @.Destination = void: y5 t) b" F) m/ G
then -- no transport order for vehicle @. M" f+ [, U9 M8 ]8 O: _
@.Destination :=
# x' H# n+ M. h7 J: v6 B rgManager.nearestFreeStation(@,track.~);
7 H5 x' H$ a, @5 s# b! [0 u# V newDirection(@); ( Q6 \% ]0 o* U1 H! w
if @.Destination /= void then
7 c: V* f, A( a; g, G. d @.Destination.NumReservation :=
1 `& e( S2 w7 K9 T/ } @.Destination.NumReservation + 1;
6 ]! k$ p" ]8 g1 v# w end;
8 l% G- A" C: `' U# c @.CurrIcon := "drivingHome";
( Y1 [2 N& y* t8 ^) e4 i2 t$ e @.DrivingHome := true;, ^) ^( |4 d7 ~" T2 k3 a
end;: E2 P" V+ T3 I9 v. Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. S1 o$ _4 B' J) P part := @.transpOrder;
7 f: Z: K4 S4 t* w1 R part.move(@);-- load part
" O0 n L5 A( Z! E! a; m! T @.CurrIcon := "load";. p$ `3 t9 T0 `
GlobalDistObj := part.globDestination;+ U3 n& L) b- z* v4 y# ?; H9 e" `$ ]' F
assignLObj := rgmanager.rgAssignL;
- V. i- K2 U0 y$ x row := assignLObj.getRowNo(GlobalDistObj);
1 Z+ @. j0 j! J j; O. j4 e8 i" A if Row = -1 then -- since 70
4 O( M! L7 Y4 n" u* e3 l4 _1 N if lan=1 then
0 n0 ^, p8 U4 [; u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, @- M& B5 M( i8 s2 s+ b
to_str("in der Andockstation: \"",?.~.name,"\""));
- m2 [: y9 Q% u6 t7 |6 Z# w" Y else
' n: l9 D( o% T5 k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 Z; p U+ m$ t3 _( J0 U to_str("in docking station: \"",?.~.name,"\"")); 6 Q8 p( B, \4 d% i1 D
end;3 E# }' J& O8 `, j4 p7 S
else b5 d3 z4 Q* p) d! K
@.Destination := assignLObj[1,row];! p2 y; f! @2 I: \
end;
% n! k! O2 \" \) D u; o7 G) {* o newDirection(@);
8 f6 I1 z' V/ g2 X2 w @.HasOrder := true;
( ^/ y' T Q/ f) D b. E end;1 X4 [. [7 S+ ^* N# e1 p7 I
end;
0 L+ u* l! D' R9 C7 g3 dend; -- of the method/ F, o0 z. m* u* V5 E
|