/* called by: entrance ctrl of the object 'track'6 s: {, M) O7 r4 M
*/6 k/ V2 `4 z! ^! P( \2 J# B! y( ?
is
) L8 H# x* e# ]8 i part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ }/ C& L. A7 Hdo
6 P9 c- g5 G+ ?% W& Z* O# B$ f Lan := rootfolder.Internal.Tools.AOLlanguage;
% m" V7 @, r/ S0 ]8 E% y if current = @.Destination -- else return' E( a' V% f3 V( x4 \2 P
then
8 a9 b5 Z/ B% b5 r @.Destination := void;6 f( q- t; W3 a
if @.occupied then! n# b! S% \5 I
part := @.cont;
: K9 t6 v/ }4 F7 B& v* d @.transpOrder := void;0 o* @) Q# C6 ]$ ~9 `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" r: f% D! I8 u/ q5 q4 u) D2 N, U @,root.eventcontroller.simTime);
9 C( \% O B0 L8 d @.HasOrder := false;2 W3 i' b/ J9 ~: B( \
@.DrivingHome := true;, P+ @& Y4 F: }' k& t. @2 y0 X3 R
rgManager.tryToStartTransOrder;
& a8 P) {+ P" I8 `+ I if @.Destination = void
3 g b9 p: `( k3 F+ x then -- no transport order for vehicle @4 A% b; X* g8 \" q* i1 F4 v% R
@.Destination :=
( b4 {# I! G$ _# [0 H, R. ]' E+ P5 T rgManager.nearestFreeStation(@,track.~);6 E9 z ~6 U9 c
newDirection(@); 8 m/ l, n4 O! Z1 x4 E! `
if @.Destination /= void then+ j! V9 f+ h5 x: N
@.Destination.NumReservation :=
I- q* z6 X, x7 u- Q }' A+ p @.Destination.NumReservation + 1;# ]$ [# A2 y2 p, g* V6 T
end;
$ ~6 _5 M" m6 L @.CurrIcon := "drivingHome";
) H8 e5 F2 d) y7 e @.DrivingHome := true;8 S" M+ g z: L2 R/ f% j
end;
3 Z' {, M2 ]6 r0 W3 m, Z, i+ Q6 s else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 L# n) e8 a/ V( R- r
part := @.transpOrder;, R- Q" n" L6 [0 b5 k; S
part.move(@);-- load part% k% C: V9 K* A! y
@.CurrIcon := "load";
+ e7 e4 `3 T9 [' c# }8 e GlobalDistObj := part.globDestination;
s* l) G& d$ i& a( A* D+ y; T assignLObj := rgmanager.rgAssignL;$ P( s9 G9 H' ]9 x
row := assignLObj.getRowNo(GlobalDistObj);
7 {' h4 O/ c) T/ f; W1 P if Row = -1 then -- since 70# Y9 g7 O5 X9 O* j2 G7 A
if lan=1 then
U+ {6 v% B3 J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( n5 B z' A/ g0 n; ?
to_str("in der Andockstation: \"",?.~.name,"\""));" \/ ]0 ~5 a% S- {
else
0 E- m! F% u0 Y' Q- ]; j! O" z' W9 s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 t3 U! f! ~- @1 {" h, d, G( d! E to_str("in docking station: \"",?.~.name,"\""));
5 {" H, U0 s% s e) W3 V+ [4 C: [ end;
; }5 J8 D W' C6 s8 v else0 Z5 D C Z4 U' Q: j I1 l$ M
@.Destination := assignLObj[1,row];
, |" X1 t6 i: z2 g, k) o4 l5 U end;
- G- H5 h2 U- [+ U6 g$ L" V newDirection(@);
# C3 L8 R8 w0 q O" m7 a @.HasOrder := true;4 m+ k+ S- } _+ h2 Q7 Z
end;7 o, f5 x( ^$ n6 c% J, C/ ]
end;
w! b- i2 S) ]5 a1 aend; -- of the method4 n6 }- Q% i5 h( W3 n
|