/* called by: entrance ctrl of the object 'track'
: K0 v: O2 J* |' ~: I( |! g*/2 o- ~; s( n' {5 x- L" ~8 H
is
1 ^ z# G, h2 ~% U1 h/ Z1 [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& {8 D: F! @% P. W" `" J" ]' B7 vdo4 F3 `0 C1 N+ Y
Lan := rootfolder.Internal.Tools.AOLlanguage;+ x- Y+ u ]4 N6 K- W
if current = @.Destination -- else return2 g6 w4 p8 B5 _1 r. I/ q
then
* B# ]* \* K% s, {' y% p @.Destination := void;8 [8 O+ G9 H0 t. h
if @.occupied then4 i6 r) b' C- g
part := @.cont;
. g6 y) K$ `, A! {9 v8 k" _: w0 p @.transpOrder := void;) V; U, X: }5 n! H( o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ C6 y! v: J6 h+ D
@,root.eventcontroller.simTime);2 U2 D4 a3 H8 i) I# H
@.HasOrder := false;7 `# e+ B! U, S# T
@.DrivingHome := true;3 Z/ ^5 C% E/ | l% b9 m$ u3 B
rgManager.tryToStartTransOrder;
# Y7 @- e7 I3 @3 P5 W6 d if @.Destination = void
' T! b- R# I" A$ p then -- no transport order for vehicle @4 C- P4 \: ~' [; k T
@.Destination :=9 O! _) ~$ T; c% n1 k6 R
rgManager.nearestFreeStation(@,track.~);: X" P8 ^2 p/ _' m7 N- z/ M0 w; P
newDirection(@); 0 r: w3 u& [7 g% [; y- `, M) e" C
if @.Destination /= void then k/ [7 H5 f, ?5 u5 y* `3 b' V
@.Destination.NumReservation :=4 Y) {" s+ R8 O! Z
@.Destination.NumReservation + 1;' P+ d \' l+ z! |2 o
end;
& S8 s* {/ D: t' \' }0 R) L @.CurrIcon := "drivingHome";1 M a1 x% V# I5 \1 ^
@.DrivingHome := true;( H: t, R6 `. `$ E' k o+ w/ [. v
end;
; r- v, D7 L3 \' |# S else -- the vehicle @ is empty, both vehicle and part are in the same dock station! t+ a% n) |; d( i3 h
part := @.transpOrder;( z* z0 i c1 T" b7 D
part.move(@);-- load part
! f7 ^ C3 l) R0 T- s$ m @.CurrIcon := "load";6 g+ z1 K0 g- | G( ]. }
GlobalDistObj := part.globDestination;& C! A' C2 o& x! m2 u B& q
assignLObj := rgmanager.rgAssignL;
% e% \9 t4 _; p# H" j. b row := assignLObj.getRowNo(GlobalDistObj);
- c5 O' B. X+ V. o0 X if Row = -1 then -- since 70
1 i& @" z( q. h! q if lan=1 then
! Y2 H: R; I$ c$ X: \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. T* R. }& n3 c7 S# H9 E to_str("in der Andockstation: \"",?.~.name,"\""));
/ L$ C% j% u3 b7 e else
6 e- X; Q% I! d& |: V7 R& o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) l' n: W' r- Q) Y+ b- i: ]
to_str("in docking station: \"",?.~.name,"\"")); - e5 t. D* B+ i/ k3 _: ?
end;5 R. W' u, L$ R
else
( s( p1 V$ z/ {0 w$ I' D0 f @.Destination := assignLObj[1,row];
, u9 A0 C! J5 |( B. [# T' {* t2 w end;
1 u) C" ?: v7 B3 Z2 P newDirection(@);) m! V o( n: n5 J8 e( O9 a S
@.HasOrder := true;3 {' ~! K4 V0 j% `% E7 r% ?2 Z4 h
end;( c4 N& Y( U4 d" X/ T7 G# S9 S& u
end; k e0 T) c5 Y. S5 K5 v
end; -- of the method
( ^" `* e! a$ i2 j) [+ x* M, ~ |