/* called by: entrance ctrl of the object 'track'
; @5 h% t, J4 b' @' u8 e*/
. v0 t, ~0 w- ]is! W1 U" ?" F/ `3 g% [+ R5 r" F8 {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* l+ S# J! ]2 [+ m/ \0 T
do, b7 w" y4 E: L) U$ M# w h
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 b3 C6 U6 g- v3 _. I& A) n7 ~/ i if current = @.Destination -- else return
0 n* l% c+ i' f( \: g then
8 _6 ^5 H, Z9 ?: f% Z @.Destination := void;
) b+ k) x# x/ K if @.occupied then |. o, [6 B/ z$ |# B* `, d
part := @.cont;( H- [ B' r$ x* ^( \: U" Z/ y
@.transpOrder := void;. V+ P* ^6 G: {, y: H( ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) ]$ X8 Y, g# Y8 V; I
@,root.eventcontroller.simTime);
0 Z$ b+ u# F; _- Y% E6 r. ?1 s @.HasOrder := false;
8 L/ [7 O7 @2 _; i @.DrivingHome := true; X+ }# t; g/ p. w
rgManager.tryToStartTransOrder;
2 \) O X1 ]/ N9 V9 \+ Y0 L if @.Destination = void7 k& |% L8 }6 S6 ^' n1 x. \
then -- no transport order for vehicle @
" S9 Y$ P* l: o( Q5 [4 x. w% R @.Destination :=# z4 Y# J9 [. M1 H
rgManager.nearestFreeStation(@,track.~);
, Y- Z6 g* ]! r( k newDirection(@);
2 m* E/ ~6 Q9 D0 t+ r7 h: D: \- a* H if @.Destination /= void then. \3 S+ @& n" |# J
@.Destination.NumReservation :=
* X% N4 {/ w) _" W$ E, O* s @.Destination.NumReservation + 1;
4 L h3 d" U4 b+ W+ p" Z end;
x4 B0 j! I. {* Y4 V K @.CurrIcon := "drivingHome";
6 @) O8 }8 T# L7 t9 I( i @.DrivingHome := true;
( A8 I0 l/ {9 {, p2 s! V* a! B end;
& a* P/ X0 N- E) d; M! R* o5 o2 \4 M% q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 P3 r2 ^' j" \" l% R2 L! u8 E part := @.transpOrder;/ f6 q t- j) X! p) x" j+ q
part.move(@);-- load part6 S; u! [7 l3 F
@.CurrIcon := "load";, M/ R( j; Q7 b! A3 g% E
GlobalDistObj := part.globDestination;
9 _ E( }8 }' s+ h/ \; h$ F$ ]1 ` assignLObj := rgmanager.rgAssignL;
7 `- v5 m2 H1 ] row := assignLObj.getRowNo(GlobalDistObj);9 t( r& C: c( R0 T9 `
if Row = -1 then -- since 70$ o& N6 x! L3 i- V* Q9 \
if lan=1 then
1 t) u P, j5 x \# X+ X* d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- i4 Z) q: n4 D+ _: p2 p to_str("in der Andockstation: \"",?.~.name,"\""));9 H, _0 z% h4 `
else
- [ f$ w; z; K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 U2 i0 B% o; Q2 f
to_str("in docking station: \"",?.~.name,"\""));
0 ~+ G6 ~( r ~/ n! E7 c" V* g end; S7 s/ z- `5 [9 n# @# }
else
1 e/ U; e2 V4 ]7 o; D8 U @.Destination := assignLObj[1,row];; T+ N# D3 o- @
end;
* \, V5 {+ D+ ^- F' w8 t newDirection(@);
* G, D4 b+ x- f' H @.HasOrder := true;
7 Z( X2 _6 v/ b! ?( G end;/ `! y; G7 V2 s
end;* U# U! d' {+ t
end; -- of the method$ I$ }" H% e9 b! a- v
|