/* called by: entrance ctrl of the object 'track'
' k' O. l% a0 F% Q: b4 @*/
# S) g+ U- i8 S0 e1 l; I3 M! pis
# N5 P0 E! x! n8 G2 G part, GlobalDistObj, assignLObj:object;row,Lan:integer;* M* w! f% D. K
do
! ]' }, |! k% m9 O4 p [% c Lan := rootfolder.Internal.Tools.AOLlanguage;
8 k$ q% G9 v; L' y( d( H if current = @.Destination -- else return
+ y# G) D6 h2 _& |# w; N then
" P9 P' {1 u' l! b& V$ ~, a @.Destination := void;
5 x6 j# P* S/ R$ ] if @.occupied then1 p8 x8 j; x$ m0 K/ `; \0 x8 D+ u
part := @.cont;5 I2 e; H( r+ [5 n) ~. s: B& R% P
@.transpOrder := void;
N I( ]. ?0 m9 L, e0 J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: q5 x; j6 g, i6 g @,root.eventcontroller.simTime);' a) @! X- j/ L6 L3 ^2 x
@.HasOrder := false;
h- ? F: p3 I5 `0 O0 \) t @.DrivingHome := true;4 E7 Y: B, q! R5 k* u/ K/ w
rgManager.tryToStartTransOrder;- b2 E, y0 \( O$ o9 X
if @.Destination = void d( F5 @: K& d
then -- no transport order for vehicle @
* |8 ]! R% p* ]% ]( e @.Destination :=# w/ b0 ~* V7 a6 A# Q! s0 l: x& P
rgManager.nearestFreeStation(@,track.~);0 D! u/ p' D3 i) b
newDirection(@); 4 a( K, S1 t) O; v7 h8 P( B
if @.Destination /= void then7 e) ?! C' [ Q! ^1 B
@.Destination.NumReservation :=- A" X+ e$ q! @: I$ @
@.Destination.NumReservation + 1;
0 ?" A, B0 f: O' o end;4 b$ E. k- S. D: f6 h
@.CurrIcon := "drivingHome";3 K- {. c- b" A' S5 S; c) A
@.DrivingHome := true;" o0 O* E3 o. Y, T0 e. h& E
end;8 ]+ O+ G+ V/ H& u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% L3 T5 b& ~; a* L9 M part := @.transpOrder;
+ g( }2 Y) [" y% a part.move(@);-- load part) Q" g9 M6 V; w6 r) E
@.CurrIcon := "load";/ Y v4 f; S1 ?; B
GlobalDistObj := part.globDestination;# h# e D5 I. z* B3 ^( {
assignLObj := rgmanager.rgAssignL;& a7 t H$ w9 N
row := assignLObj.getRowNo(GlobalDistObj);
1 E* ?+ Z1 p+ W# r& L1 o p if Row = -1 then -- since 705 Q4 A+ _4 o6 ]) S9 }6 C
if lan=1 then
& m6 L0 u; h1 |0 Q! ?6 j+ R: `5 g% X! n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: O0 Z+ z: [0 b1 h, r- W2 w( v to_str("in der Andockstation: \"",?.~.name,"\""));
/ i' I# R4 U2 w! ?0 b& B0 I else
: r: u+ a5 _6 H# Q. B3 C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ I8 X8 C) i5 R# a! `0 i5 I0 f to_str("in docking station: \"",?.~.name,"\"")); ' ?, M) X' {$ ]9 I) ]) y
end;& Z/ d& |# S9 D0 M9 ~5 U2 }
else
7 O. j/ T M: p, M2 U9 x& P @.Destination := assignLObj[1,row];9 v0 U/ ]. h1 o) j! {3 n: |: f! [
end; / U- R6 n V- Y" p4 {$ {
newDirection(@);
& D' z6 r$ t+ Z: Y3 Z' p: v& c @.HasOrder := true;
) u4 S1 K* y% [& n" p end;$ \6 I6 r* L3 w; D& L4 ~" ^
end;
+ U/ z6 w* @+ c1 x) I4 Oend; -- of the method
; ?5 G1 p4 B8 N8 y2 Z |