/* called by: entrance ctrl of the object 'track'
. O7 y' I) y) x6 H; h3 \5 o*/
?$ [8 I7 u. b3 {+ Ois5 y0 M6 @4 _" y2 N m% l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# Z/ g+ H% J5 ]' K6 s) Ydo2 d! Z5 X; Q* e; X l6 L" j4 \: I
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 U5 W2 T) _+ _1 I& y0 ~/ U4 x if current = @.Destination -- else return
`0 i1 j0 x& |& F: F! I then3 ]* _# s% D. B
@.Destination := void;, E$ _8 X8 Y# O* g8 E: }
if @.occupied then
& P* r# x, C" E& }7 w9 b part := @.cont;
9 |, E! ~1 i( {" x! ^2 _ @.transpOrder := void;
( S* I( E: I8 p* @$ f! |( b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 P, k( c, X9 c L8 l. Q
@,root.eventcontroller.simTime);/ b- s( {4 `! C" |
@.HasOrder := false;
4 T8 `# Y! h3 z; O5 X. W @.DrivingHome := true;+ t9 t, _* P, F: D3 g% M
rgManager.tryToStartTransOrder;
& S& r* M2 p# a( e8 t/ Q if @.Destination = void _1 ^1 {$ _, ? T1 R6 t
then -- no transport order for vehicle @: R5 \" r) K7 _- P. b, D6 Q
@.Destination :=4 o. O! ` D: M
rgManager.nearestFreeStation(@,track.~);6 B7 i7 z- d: I, b' o
newDirection(@); $ o# O6 ^' H" ^* X# P
if @.Destination /= void then% v" c- L$ V9 K1 @; W: R2 Y
@.Destination.NumReservation :=4 p4 M+ w- f; N, C9 T! |" Z
@.Destination.NumReservation + 1;
! @6 t1 r+ [1 D! U; ?& L5 b% u end;
( c8 L5 m: X- h( p( p# [0 g @.CurrIcon := "drivingHome"; w3 D9 P, p6 m J. I2 E
@.DrivingHome := true;
0 m0 R1 K/ X3 o$ M& H+ a end;
- K6 r* Q5 w z- E else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ `! p! ]/ h* L0 e# [5 [. T; v; [1 X
part := @.transpOrder;
( `2 Z3 B7 h& S; K5 Y. i part.move(@);-- load part
3 Z$ X4 e S6 v2 y9 R" B% O$ q @.CurrIcon := "load";
4 L% T: |' w; R* ?9 @0 n GlobalDistObj := part.globDestination;
, N7 H, E5 D' R c6 w assignLObj := rgmanager.rgAssignL;9 Q6 Z$ h; R h6 |5 j
row := assignLObj.getRowNo(GlobalDistObj);6 y, T2 s( K- V7 @ f6 ?
if Row = -1 then -- since 70
; X2 K) Y# P( H3 y# R" _! V if lan=1 then
/ j% u, G6 Q9 T; m. h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 J# d5 Y! B) P: F* s, z5 N1 E4 R to_str("in der Andockstation: \"",?.~.name,"\""));
" s) ?% D( Y# o1 n' O/ }* Q9 F else' ]0 E# x" K% [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 ]0 j: i2 k0 |0 \7 _. r) J to_str("in docking station: \"",?.~.name,"\"")); / ~( \% g# t+ O( b% [+ P
end; u" E3 @' B+ S8 q0 @, W) J
else
: n3 X/ |- `* P; G) }- @% f; _ @.Destination := assignLObj[1,row];
( P& ?0 h2 a( ?& y end; & N$ L/ }" h/ T$ K5 a& Q) D) A
newDirection(@);# Y8 X3 }% r* N7 S* c+ d; W$ h
@.HasOrder := true;
1 b& F8 w% Q" W9 A: O: ~5 R+ J end;
% R! F: ^. B8 W+ L- Q3 s end; |) O! d0 C5 y2 j) U% K8 O3 X: Y( @
end; -- of the method
* p& e; d/ Z* J l4 s$ x9 h |