/* called by: entrance ctrl of the object 'track'! p6 S( a. _" D" @# R+ \
*/
/ K) m* u5 c2 ois5 s! b' S, u% }0 S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( v5 Z% b1 g2 N) L- @9 H* Y4 j, H
do
6 D1 Q$ ]7 J5 `2 ^ Lan := rootfolder.Internal.Tools.AOLlanguage; T7 B9 ]$ h6 q& r
if current = @.Destination -- else return
7 E8 s; L4 _' g! m( U' `) ? then: L6 l3 t' o. V
@.Destination := void;
8 q% J# H, j- c2 @" Y9 F! p if @.occupied then/ E( E q' c% p& o" s
part := @.cont;
7 u8 O& ] _2 `4 m3 p) I @.transpOrder := void;
: ~2 |/ B) \ p/ T( f# ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" Q7 J% _. g5 ~ @,root.eventcontroller.simTime);! w3 e C% K5 H7 S8 u% {
@.HasOrder := false;% p/ R8 C+ m* j9 F9 N w% V
@.DrivingHome := true;
z$ ^; m8 Q( k( W: f& l* j rgManager.tryToStartTransOrder;' z- f$ z" ]5 m8 ~( H" G: Q9 r
if @.Destination = void
8 N. l; q6 D$ d! {' D then -- no transport order for vehicle @! _$ X5 F6 i8 o4 f. m' G
@.Destination :=
: j$ e9 O, N6 a; b8 ? rgManager.nearestFreeStation(@,track.~);
2 h: x% t* E/ _1 T, j( ? newDirection(@);
/ }6 _, r+ y( ^* P' j if @.Destination /= void then
9 ?; c$ V+ Y3 H @.Destination.NumReservation :=
7 r o# g" h7 v' m5 b( L @.Destination.NumReservation + 1;
( Z2 A9 e& f" P! ` b4 B0 Z* T end;
4 T; A/ }1 p! ]8 `# u+ F2 M @.CurrIcon := "drivingHome";0 X' i. \/ [ n' O
@.DrivingHome := true;0 H6 @# S1 y _% h; B+ F2 D
end;
- j! ]3 y u: }; `- u8 o" w- { else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 K) W4 s( D+ @5 g; j
part := @.transpOrder;
, J3 ~, i Y% Q$ S. l) j part.move(@);-- load part3 @" V4 a2 A; s/ ~( f* \9 i, J% n
@.CurrIcon := "load";
- y" c0 E. A B' y( y1 V! v GlobalDistObj := part.globDestination;
6 p' i$ ^( ?+ q8 h/ l assignLObj := rgmanager.rgAssignL;5 X" V% j2 b* [3 [$ M- ]% C
row := assignLObj.getRowNo(GlobalDistObj);; A" c& C Y9 ^; m7 }' R% d0 G) x* M
if Row = -1 then -- since 703 @: s" x+ l1 n7 n% c. Y+ T
if lan=1 then$ Z/ D& f) d& b% O+ @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 C" M; y! k, ]( ]& z; E6 @ to_str("in der Andockstation: \"",?.~.name,"\""));
: H8 ?' t$ o6 B6 e else# a* Q/ v! y! f* U0 c7 B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 |8 O# j* z+ Y! Z$ I, t1 _
to_str("in docking station: \"",?.~.name,"\""));
* ?, k4 s$ T$ s; t9 l% l9 I0 [ end;
& Z$ ?; n) H8 s" R9 f: s: P else$ B. Q* ^8 \3 H
@.Destination := assignLObj[1,row];' A, {" _& d/ ?* v' p
end; 8 N6 [ B5 \: [1 R1 ~5 \
newDirection(@);3 k7 y* Y1 V/ d8 M
@.HasOrder := true;
4 L- N. V X- W/ \/ ~ x9 n* M6 I end;2 U, H9 b) q0 n0 u
end;, }* d, U/ b o! b; q
end; -- of the method6 I& x/ k$ e* C9 R& d5 C
|