/* called by: entrance ctrl of the object 'track'. s# } ~& n5 n
*/3 g8 w1 R9 M& e! Q7 J) f9 M. f
is% e! }( o( o7 ^4 I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% w9 n) f: i% l: L0 ~, X/ z8 F
do6 ^5 {; d! x( r9 @
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 [' K4 R) S& j4 p3 x/ B% r8 }6 E if current = @.Destination -- else return
7 {( j4 Y$ |3 j# E( [, y& U then. k& y0 I! n1 f; ~6 u8 R
@.Destination := void;
" B/ x6 q6 h: W4 B* i- r. b6 k if @.occupied then
! O* ]6 B Y ] part := @.cont;
3 a: p( G Y7 T+ ~: X: V5 q7 w @.transpOrder := void;
" |+ g, c) B9 G. @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 t; D2 `+ a, j0 s' g% A+ P @,root.eventcontroller.simTime);
, y# q6 Z: \3 _( t2 P @.HasOrder := false;# g& _( ~8 H& i* `' u% U
@.DrivingHome := true;; K0 R$ o3 R, x w& D
rgManager.tryToStartTransOrder;3 n3 b1 X- U+ @6 E0 T
if @.Destination = void" K" P$ F6 t- q4 y
then -- no transport order for vehicle @( p7 ? |: E; j0 w) ~9 q
@.Destination :=- M& ?( S, N) ^
rgManager.nearestFreeStation(@,track.~);
; B$ V R; X* y4 _# r" u$ s newDirection(@); 5 h' A# O( w! ~: c0 f8 v6 {: G
if @.Destination /= void then% |& a* I D5 y' S8 O n
@.Destination.NumReservation :=) j5 z8 B0 V# m0 ?4 G( j2 d
@.Destination.NumReservation + 1;3 ~& f4 o3 `2 I1 Q: R
end;
+ d, c+ I n/ |4 V* }( R9 Z& ] @.CurrIcon := "drivingHome";
7 \; C* Y& s% u @.DrivingHome := true;8 N$ f. c2 h1 G( ^4 i' L& ]
end;
) @1 {! Q4 d) E! m$ F9 ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 Y8 y6 O5 P7 ~$ k7 X8 T
part := @.transpOrder;& a6 j4 A' v8 A- `0 G5 y
part.move(@);-- load part5 c! R, D7 Y( @) L5 \1 D5 Y& b; Z
@.CurrIcon := "load";
0 }6 |% i9 f* `. N% @8 L GlobalDistObj := part.globDestination;* T0 X$ F# Y/ Y
assignLObj := rgmanager.rgAssignL;. U( W: ]9 j/ N1 T5 N0 Y5 W
row := assignLObj.getRowNo(GlobalDistObj);
% u- x( e# K8 p" P2 A. b' C if Row = -1 then -- since 704 u5 a$ h7 G* [5 [
if lan=1 then
: S3 W0 M5 O1 h' G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, d) i4 O% X9 C9 @( ^" k- _6 J to_str("in der Andockstation: \"",?.~.name,"\""));
; h7 r1 D+ H0 ]" o( }6 x9 C else( @ x% F8 Y7 s- S/ y0 }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ t( o' q& V' g8 y$ S5 w
to_str("in docking station: \"",?.~.name,"\""));
. X+ m3 w* J: [* h end;) o: ]. ^3 S- q$ ]& C T g% y2 o
else
$ s9 ~6 r% `) b% c0 r' c% a0 Q, c @.Destination := assignLObj[1,row];1 A6 t+ X/ Q1 [
end;
9 [* U: E b, @* Z newDirection(@);
0 T9 {* c: e- \: p @.HasOrder := true;
8 T; D5 B5 n( o" f end;
+ c: }' ^$ t4 |* W end;" s4 N/ \2 b# ~9 H, _
end; -- of the method
3 b7 ]1 |8 @# h* Y K |