/* called by: entrance ctrl of the object 'track'
6 y( P* C6 D4 u4 `3 n*/
" U, u4 i, f3 X7 _is
' Y0 k7 E$ v6 l9 [: \9 T& W part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 u8 @8 Q1 a& j2 @8 y: w
do* g, R* z. K. ?0 ^3 G! x# x
Lan := rootfolder.Internal.Tools.AOLlanguage;: q. t6 i# \8 y/ n T, O5 g
if current = @.Destination -- else return
. W9 y5 Y1 A; G1 m K$ P1 k then; ~8 T2 a& l; y4 i% J& t) Q9 h4 _& w
@.Destination := void;
3 G% }8 C# |2 }7 K, l* W- U$ {1 J4 x- q if @.occupied then
8 Q2 ]0 Z; x* U* B part := @.cont;6 {# Q# ^4 s/ R Z8 A3 e& U; a
@.transpOrder := void;' F# n. K6 D* Z# C+ [7 _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. B& A/ v) `$ T) |( A
@,root.eventcontroller.simTime);: W4 l$ v7 O* c; ?, G
@.HasOrder := false;
4 w2 w# Y0 M* @* M* ] @.DrivingHome := true;
/ m9 P' F( r9 M$ Y( e2 W/ { rgManager.tryToStartTransOrder;+ Q0 \4 R+ b G1 D7 C
if @.Destination = void. U( e1 f/ h+ y2 q; o. d1 J
then -- no transport order for vehicle @# R, ~& Z5 \, i( I1 P5 U( _* v( B1 z
@.Destination :=
6 [; Y; w6 z% x rgManager.nearestFreeStation(@,track.~);
5 _( E9 _; S' m( e$ f newDirection(@); ) d" w/ Y. K* M7 ]: F
if @.Destination /= void then
6 s- y: W- P' [3 B) L) q n7 D7 _' G @.Destination.NumReservation :=
, d8 u4 R. b; T4 L+ S9 F. X$ R @.Destination.NumReservation + 1;; j/ _( e d- B2 _8 K
end;
) x' ~2 {$ X, q8 m8 p! A# ]5 D @.CurrIcon := "drivingHome";. g' E' m s: D
@.DrivingHome := true;
9 V: o0 X0 ~& O6 C$ K+ l5 r end;
& A. `# {; i3 h5 {3 G' I6 y else -- the vehicle @ is empty, both vehicle and part are in the same dock station. w. X. z/ ?% e+ l; k3 k
part := @.transpOrder;
6 m3 [* }! X: A4 P+ Y part.move(@);-- load part8 y* B: ?6 Q* \7 h8 t: X2 K, Q
@.CurrIcon := "load";7 G; [* n6 d# s6 S6 w
GlobalDistObj := part.globDestination;
; H6 A( A" ?* ^% S$ [* q$ _9 p assignLObj := rgmanager.rgAssignL;
3 @- }& y$ l6 q7 U row := assignLObj.getRowNo(GlobalDistObj);; L* f/ v. P, n& u ?6 s; X
if Row = -1 then -- since 70
8 M1 n5 O& P$ H7 D# g( j+ ~ if lan=1 then6 c" t" D" q$ K5 I9 {7 |, L
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
X3 t9 j( l) h) A! ]" V to_str("in der Andockstation: \"",?.~.name,"\""));, d! O, n7 } ?; {$ W% [
else
! f4 v4 i2 H6 X1 H! S' k, V8 J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 ?, m1 S, I! A) S' c8 J* @' I" F' A to_str("in docking station: \"",?.~.name,"\""));
. `* P7 d- f7 X$ F, ~5 Z9 G end;' q+ a+ D+ k: l+ o
else* x/ K. Z6 Z$ V; q9 v" K
@.Destination := assignLObj[1,row];
+ k y7 y# u0 d* l# D, A end;
( d: m9 D# }8 i, Q: Y" c$ q newDirection(@);
9 o1 y5 L" B1 r0 y( t4 a" t @.HasOrder := true;
9 o& u3 g7 G9 m1 {5 s end;
& C/ H O" U* c6 L# m7 l- z end;
1 {* z; z q; \; A! [/ jend; -- of the method! K7 p/ v7 e: e+ N
|