/* called by: entrance ctrl of the object 'track'
7 r, ?" J1 g* s*/
" j. ]; | M1 i' q& x; {is# z8 C: v) U' B* ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, K4 k( m' \0 Z' ^3 m% `( i$ H
do, ]' r# h `5 b; V/ T
Lan := rootfolder.Internal.Tools.AOLlanguage;
( O/ J1 {( x5 j: n; | if current = @.Destination -- else return* Z3 W; @8 P' \9 X0 n Z3 j R
then
, p9 M9 i5 { I) q @' v @.Destination := void;6 {' l/ b% w1 @0 L6 ^: m9 S
if @.occupied then
% c0 D, d0 k3 t4 M% e/ E part := @.cont;
, f* }) S$ T. E9 L @.transpOrder := void;/ s& V) R( K7 G! y& j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, Y" H; x$ V5 G" d9 T @,root.eventcontroller.simTime);. i) |3 i! b9 y9 B: t2 E. D5 F( c
@.HasOrder := false;+ X, U7 M. f! X( E3 d# E
@.DrivingHome := true;
% W; k0 B7 r: Z& j! f7 U% p! l6 k; o rgManager.tryToStartTransOrder;
8 p4 y7 P. o- w, e+ [, ` if @.Destination = void& [9 f( A) r2 A0 `# N9 V
then -- no transport order for vehicle @, b5 S4 c" Y. P1 n
@.Destination :=
4 t4 c5 |( P' S( u& a rgManager.nearestFreeStation(@,track.~); i# o8 j* `. a! m
newDirection(@); 3 J! d. b: T$ M
if @.Destination /= void then% G% i! g4 Q3 d3 r# W9 I
@.Destination.NumReservation :=& }9 [7 m# `4 H8 ^& Y1 `. q
@.Destination.NumReservation + 1;/ J( @- K6 R0 b" U6 J$ [7 D
end;. J9 q5 m7 G: [6 t+ M, D
@.CurrIcon := "drivingHome";
# h. N- s( i8 I, e% r, X @.DrivingHome := true;
( y1 @5 ^, i, n end;
$ E3 R7 L/ Y- h: O3 x( o z9 U else -- the vehicle @ is empty, both vehicle and part are in the same dock station& ]4 `0 K6 }, [- x1 X
part := @.transpOrder;
# J9 S/ \$ k" B# w part.move(@);-- load part
_! M6 ^7 F+ a! y- e L @.CurrIcon := "load";
6 W1 B$ J" B9 w1 e4 F. s GlobalDistObj := part.globDestination;
" T+ l/ w. q, |* [7 v5 d assignLObj := rgmanager.rgAssignL;
4 U1 z. O; V' w6 a; U row := assignLObj.getRowNo(GlobalDistObj);, r: y; E' ]5 f n: d1 t
if Row = -1 then -- since 70; D- ^: P/ o7 }+ I; A! f. n$ e( \1 {
if lan=1 then
8 u0 }5 M8 C( a5 C- a; q1 b. G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" e- a0 I; a% O$ h4 b to_str("in der Andockstation: \"",?.~.name,"\""));
$ ]5 b+ {% J) u7 A5 L! a1 ~ else
$ H: ]' M; W9 i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 F2 \6 d' Z6 M, u# B
to_str("in docking station: \"",?.~.name,"\""));
0 W& D* Y* X& \/ H8 p end;2 q% n6 }. ?/ e/ g7 \
else
" u2 w X# ^6 C- L! u @.Destination := assignLObj[1,row];. F+ v2 k7 g3 f9 C
end; 9 F, o3 O: n8 X" ^; u# [5 V* H
newDirection(@);
: b) _- @& L! F9 S( r p2 ?: y @.HasOrder := true;
: u" Z3 E' Z/ M end;
- t% W+ G- P5 v end;! A; {4 L o8 t% t
end; -- of the method
8 \4 p2 W3 \$ a# Z% a! T, h) q |