/* called by: entrance ctrl of the object 'track'9 p. N% Z8 v) n" ~9 Q4 G- z7 _* `- f' A
*/+ [0 r) V5 M0 {4 [
is+ Z1 ^, H `! P3 I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) I% N @( z8 M. c4 ido
) f9 ^% Z+ ~) @: s2 k Lan := rootfolder.Internal.Tools.AOLlanguage;1 d* F5 J$ j2 M; T4 O
if current = @.Destination -- else return5 r# j/ |) j. i8 {
then
( a3 ^5 s( Q q$ p @.Destination := void;9 x# j- u% w h
if @.occupied then9 f9 [: ~+ a( z" S$ T
part := @.cont;3 k1 X, o* L8 w: M0 o
@.transpOrder := void;2 o1 W0 u2 U4 T( j4 @. f% Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& J) L1 C! j) `0 W! x
@,root.eventcontroller.simTime);
0 ~' k( V- A D6 c Y8 D" F/ u3 d @.HasOrder := false;
3 o4 w9 _+ m8 \$ L @.DrivingHome := true;
# z: D- r- Z2 t+ Z rgManager.tryToStartTransOrder; u- }+ q) H5 w/ K
if @.Destination = void8 W& B' M8 W# q4 b' z5 }/ J* C
then -- no transport order for vehicle @; A8 ?: k9 ^8 i- e& P( p" P
@.Destination :=. o4 j+ t/ X% o
rgManager.nearestFreeStation(@,track.~);+ J9 m, b7 X2 N$ c& b6 D3 a2 _
newDirection(@); 6 T. X$ n9 r- C& b3 y, n) V
if @.Destination /= void then
+ Z" R& @) D9 J/ A2 [8 L' Y @.Destination.NumReservation :=
% g( T- I% \" R8 i2 l @.Destination.NumReservation + 1;
) E6 b+ R$ r7 g/ L7 G& k end;$ F6 m( G( R3 O0 {1 g4 C2 k
@.CurrIcon := "drivingHome";2 o6 c4 O5 z$ ~
@.DrivingHome := true; C! J$ V. y* k5 k& s( W: d+ |
end;# }( P( M! K8 M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- k8 o5 s0 G- `: W/ c, X part := @.transpOrder;9 W9 E8 _4 A$ S( M; d% ^; y# ?7 t
part.move(@);-- load part
% g' g& l; f! ^3 P0 J @.CurrIcon := "load";% i4 N8 v( [% g( u( I
GlobalDistObj := part.globDestination;. |. v0 I4 r( y% i. Y* l5 r( A
assignLObj := rgmanager.rgAssignL;* { w9 n1 X& x! N6 `- Y9 h
row := assignLObj.getRowNo(GlobalDistObj);
# v, u- n) E4 q5 l! A if Row = -1 then -- since 70, n' @/ N( F0 |% F5 S* y+ @$ C
if lan=1 then C' |4 C" J% i5 s# D6 `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, t) f( d3 G& c3 x, e
to_str("in der Andockstation: \"",?.~.name,"\""));
/ t& e- s8 w* f' u2 y$ F- c# I' a else
+ q+ N3 [; C! |+ t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. {$ q" [0 I0 q: g! B to_str("in docking station: \"",?.~.name,"\"")); 6 b; K- d" Q6 X7 ?
end;% E8 _; d W, U# F
else5 i! T6 {9 I/ Y' o; D4 g! h# R
@.Destination := assignLObj[1,row];- K+ G7 y2 x( l4 W* i
end;
) x, k4 k/ v( q0 v5 n newDirection(@);
2 B& a1 {. x1 O6 E @.HasOrder := true;
) E- c+ r, g+ M" G5 Y end;
9 B0 v+ h2 }/ R: U5 k end;/ C/ c. S9 e* U m7 V! J2 A
end; -- of the method7 h# _, x+ k, X; \
|