/* called by: entrance ctrl of the object 'track'
+ G: A" w% w* E*/
2 E# F) T1 @( N5 Sis6 O( U' ?4 `: }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' g7 g7 w0 r. q+ Hdo& X' n7 y$ T8 [' N2 @
Lan := rootfolder.Internal.Tools.AOLlanguage;" |! R& ~3 [& B
if current = @.Destination -- else return
$ k7 Y: s, o# V2 Z W* y3 q then
. K) x1 R# ~& i @.Destination := void;
6 ?5 H$ l8 L9 B, l+ F- r4 J if @.occupied then
8 {# W( L" t! c2 S part := @.cont;
) K& i/ g' q* e. w. N @.transpOrder := void;
0 l$ v0 f3 P% s: ^ t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 x5 ~5 [1 s, i" x+ I; K& b
@,root.eventcontroller.simTime);
0 _: t3 p* X' `* U. N( n @.HasOrder := false;5 S( X' B& B4 }. W# S' x
@.DrivingHome := true;( j5 |2 M3 @7 l
rgManager.tryToStartTransOrder;9 ]" s8 w' S& O' o3 ?
if @.Destination = void8 g0 k' ^, p$ |$ \
then -- no transport order for vehicle @
5 E. V7 d9 J9 a9 p$ | @.Destination :=1 j- y# i/ m2 |+ {& }6 B
rgManager.nearestFreeStation(@,track.~);5 ^ u R; H- g9 W
newDirection(@);
) _: i0 B7 B" ~6 m5 K if @.Destination /= void then; N' a+ |* f$ q- v) z/ B
@.Destination.NumReservation :=
, h, m ?9 W4 l7 I0 X0 M9 T; Q @.Destination.NumReservation + 1;
( J5 d; w5 d. S end;
/ ?# |: W! _9 ~5 Q3 I: @8 Q/ T- V @.CurrIcon := "drivingHome";
: u, k5 a) u( N/ M+ h0 i @.DrivingHome := true;' L7 [0 e+ O6 s$ I& T
end;
" H$ Z& A+ H H0 a6 Q) U else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, l+ s. M( P. b7 c" W; V. @ part := @.transpOrder;
7 O p4 ?/ r* a: m( E part.move(@);-- load part
& B* p! d$ r, a7 V2 f @.CurrIcon := "load";
& p" u0 {( h6 W+ S GlobalDistObj := part.globDestination; |! A# b4 E3 L& y2 s
assignLObj := rgmanager.rgAssignL;
$ ~. ]. z$ I) O% L. u row := assignLObj.getRowNo(GlobalDistObj);- h; u0 b0 `$ F
if Row = -1 then -- since 708 b+ @) @" H) x& N' G/ ~" |" U
if lan=1 then
) z: R' k, i* x8 S$ [5 S8 h6 g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 f' o2 n/ p9 `" p0 ^+ M. m# ^ to_str("in der Andockstation: \"",?.~.name,"\""));: l2 ~ B" i: d4 A: t$ _* ^* R
else
; j& a! o; J; ]9 h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ m. B# ]& t- `: e' A to_str("in docking station: \"",?.~.name,"\""));
" t. _/ z, |9 f end;
k8 b, G0 H# E$ _ else! v( p, z0 J+ x7 n* T
@.Destination := assignLObj[1,row];
z( v& r7 G9 r end; ( K0 }7 H# q# @) C2 z1 [& D* T
newDirection(@);
' M% @7 W" P# z+ u, `) h @.HasOrder := true;
3 T2 U3 x/ p& M7 [ end;
) P- Y# v( |: d' [ end;+ b- P }9 h/ }% w6 P
end; -- of the method
. ]& G# V$ S v; [7 O! b2 C |