/* called by: entrance ctrl of the object 'track'! M6 z; \# K- i# b
*/# u `5 w5 a% J2 Z$ D: e1 L
is9 o' A" m) A7 A4 }4 R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: m) |# `7 u& F- Z/ F# G) ^
do1 R: H W; E" i, C% O+ n
Lan := rootfolder.Internal.Tools.AOLlanguage;
- Q9 m% ]# e: ?/ H8 s if current = @.Destination -- else return$ E' g$ y+ p2 N. }& z$ D( _. f" k6 a
then, p! @4 U5 n5 }" S& x1 \
@.Destination := void;$ o* ^! O' e4 X' v
if @.occupied then
* K* s# m1 }5 E part := @.cont;
) p3 v, v/ {6 o$ z. s @.transpOrder := void;
: }; C- o6 {9 D( k& q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# e9 Q* a; V' `, f/ P( \* {9 j& {
@,root.eventcontroller.simTime);4 D# b. D/ }( b. K% C
@.HasOrder := false;% s( B' K1 c* i
@.DrivingHome := true; S2 |! k* {7 s7 i
rgManager.tryToStartTransOrder;
$ w& X& |( U+ p- A if @.Destination = void6 s( V, ]/ |; ?
then -- no transport order for vehicle @% J& S9 M9 H; c; z# {* K# X. U
@.Destination :=& R6 ^' s' S7 Y4 c9 j$ P
rgManager.nearestFreeStation(@,track.~);
3 U _2 z z) {4 u9 E' b: H9 I newDirection(@); , ]3 u! x0 _2 Z3 }; z
if @.Destination /= void then" P+ M! _9 o0 b5 `9 E% c1 p6 s/ ~
@.Destination.NumReservation :=
# }3 p4 H9 [& _ @.Destination.NumReservation + 1;% e+ e% ?) l% ?7 l
end;
- h+ f! j* e5 r/ `) l, c @.CurrIcon := "drivingHome";. h# |8 d) C G/ f" L& `# a0 L6 `
@.DrivingHome := true;
, F# Y8 ~+ @9 q% i. {6 f end;0 n( Y; ?* \# ^) G( t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 j! x# h/ O [; {, q
part := @.transpOrder;. V L3 n' ?' c, w" b; @& `
part.move(@);-- load part
( A% b" |# ?. \2 W/ P9 ` @.CurrIcon := "load";
: Y9 [5 E" \, m$ Q* ^' Q4 G5 S GlobalDistObj := part.globDestination;
6 o7 e" [. C, Y- F assignLObj := rgmanager.rgAssignL;
" T% n0 M0 i! x! \1 w: E row := assignLObj.getRowNo(GlobalDistObj);: [& L1 I, S0 d; g6 U7 E
if Row = -1 then -- since 70, k; g6 ]+ U/ w% M4 M% v6 n! j d' ^
if lan=1 then
8 v# N0 R0 X" w j+ y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& l7 M" U5 m1 Q, y to_str("in der Andockstation: \"",?.~.name,"\""));
( L0 u# X) S6 e: a8 d. W7 | else0 ^4 x8 m) _! ?2 c3 o( _# W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 k3 @, T- t# |7 Z; P5 R to_str("in docking station: \"",?.~.name,"\"")); 1 x: Z( n! P- ` w
end;. q! x( z; z) Y9 R
else4 w' i& |/ q5 S7 ^" W! G
@.Destination := assignLObj[1,row];
. ?& C G9 G2 f6 Z7 N end;
+ z% f+ a6 t% } newDirection(@);" M$ v3 R, q0 e0 b9 D
@.HasOrder := true;
: a# _: O, }( Z7 x3 s end;4 ^- O/ S( i J0 E, Z( D
end;
6 M1 g4 y) p; i3 u+ fend; -- of the method
6 [, @1 U: @3 n0 {! N |