/* called by: entrance ctrl of the object 'track'9 B# g0 R4 m8 w3 A; h9 I
*/- A, b5 A4 q! p" `2 D/ |& l
is
1 z; n( k0 G0 \* J2 \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;& t- Z& h+ d4 O9 n# Z/ h) z
do
) b0 H/ _" }; U3 n; {- o& e Lan := rootfolder.Internal.Tools.AOLlanguage;* H5 w+ J( A8 H8 t7 @+ z
if current = @.Destination -- else return# [8 U( U' q9 i2 \6 ^
then' d9 X6 L }, l
@.Destination := void;: k! {( X/ N4 w
if @.occupied then
% j9 ^- X- g( V0 N: V w7 e$ `1 g part := @.cont;
( q/ s; O A* @5 F5 ?; E8 y @.transpOrder := void;, x S0 q( d4 c: P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 m; o, {; O0 q4 H v
@,root.eventcontroller.simTime);5 S' x& l5 f& q3 a2 O
@.HasOrder := false;! |' ?& e9 L7 X6 g
@.DrivingHome := true;3 p+ y- I# W) W1 R q* \! }
rgManager.tryToStartTransOrder;
! Z1 ~4 g# Y: e& Y! N2 B. O9 \ if @.Destination = void
5 l6 v0 N5 P6 Q/ D5 u; I4 ` then -- no transport order for vehicle @
$ l% \& y) _+ H- f1 i @.Destination :=: H9 C ^% v+ _! H1 C
rgManager.nearestFreeStation(@,track.~);( i% Y/ p& V/ {- g% s
newDirection(@); . N4 _; b4 h- Y& \# S
if @.Destination /= void then i1 E Y, _/ m4 I- h
@.Destination.NumReservation :=" A% q# y, p* ^8 `" \
@.Destination.NumReservation + 1; Q- \% ^% Y* Y2 d
end;
0 h" O% m2 y2 ^. B, y @.CurrIcon := "drivingHome";: S" [2 u3 s: f
@.DrivingHome := true;
7 Z' ]9 V) r, n6 } end;8 G9 v- _# A& _: {- C2 w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 |2 b% g! k7 t& z# w part := @.transpOrder;5 H) C6 G6 E1 n0 k
part.move(@);-- load part; A' I% a8 r! c, D& u
@.CurrIcon := "load";
5 \" ?2 F2 M( N$ N: P2 ] GlobalDistObj := part.globDestination;7 l; q* g/ O# T+ ~( ?/ X
assignLObj := rgmanager.rgAssignL;- U) ?. ?0 U8 u4 r2 Y6 b* U
row := assignLObj.getRowNo(GlobalDistObj);
: Z, x8 Y+ M" j' q; J if Row = -1 then -- since 70
: Z( l) Y5 S. n4 g if lan=1 then6 y8 V* `/ b3 q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 k" J% h5 |4 n" M) W to_str("in der Andockstation: \"",?.~.name,"\""));
+ y H& Z6 a! H& F* X else" L- L5 G7 s% [. _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ R/ ~, T- C; {& E1 E+ w
to_str("in docking station: \"",?.~.name,"\"")); ( T* }9 x* \5 E
end;
6 O: ?% b3 n8 v0 ^4 [0 m- s& B else# q( {$ G1 J( ]0 {) L" P' V3 \+ G
@.Destination := assignLObj[1,row];
) D5 L3 X* O+ J- i end;
/ a- O9 Y) N% x/ B. v8 B newDirection(@);
& {: S( }. [7 B1 _, {. Y i( r @.HasOrder := true;( W# f; y) m! x, s1 Z
end;
0 V# q' B+ C1 }3 \1 F8 B p4 q) {! Y end;: u7 h5 E0 I4 u9 M$ |- y9 G
end; -- of the method! U2 Q8 U: s1 a' q
|