/* called by: entrance ctrl of the object 'track'
, y. b: X6 N2 {' `' X: B" S; K*/* e/ s3 `8 m8 @
is2 V4 U- n# M8 U3 z; Z7 h' O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
L" m; X3 O" m4 x: Ldo/ o, O, C9 @) t3 P1 m! S
Lan := rootfolder.Internal.Tools.AOLlanguage;! G2 A P9 _& t; s' J7 k
if current = @.Destination -- else return
$ M( y2 ~' U0 A9 D9 ?7 m then6 e: m) [9 b, l% c
@.Destination := void;
( z' `- {' h, y if @.occupied then
5 k X8 c* W' D5 D4 p7 _ part := @.cont;
; q! B4 E. e( b& a y @.transpOrder := void;
: X5 O* x Z! S, ?. C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& T9 c+ ]! u4 n% _1 T( X @,root.eventcontroller.simTime); F+ t! I( f9 P6 b- f$ K
@.HasOrder := false;$ q. M }2 J/ F! L# Y# q
@.DrivingHome := true;
5 b# I5 S A! K" M; U, e4 g* O rgManager.tryToStartTransOrder;! C1 J! I" y; |2 p) x6 F
if @.Destination = void
' W. R# ^: T/ V+ i$ @- b then -- no transport order for vehicle @( g; [% r) A; r2 D
@.Destination :=
0 q. X7 V$ a9 j) O% F rgManager.nearestFreeStation(@,track.~);: x1 G9 P6 |; V
newDirection(@);
6 F- v3 Y0 `2 o2 J8 j5 T3 T( k, N if @.Destination /= void then
9 [0 X M& Y$ x P; e6 Q( A @.Destination.NumReservation :=
5 t; \& c4 W( i5 @+ R& e# T0 z @.Destination.NumReservation + 1;
& Y) y& e- q3 u4 M$ M5 o0 \ end;' g0 u/ P4 z+ F C. ?: b
@.CurrIcon := "drivingHome";
, m4 F/ w+ R8 F7 ]7 u+ N @.DrivingHome := true;
K' _1 g/ U; H; C K* K0 [- n end;
! A6 I2 E" e' ^, c0 @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 ?) i/ j W7 Y1 a part := @.transpOrder;' C0 b. \$ Y. G' Q* r2 S% g/ D& g
part.move(@);-- load part
4 N2 W, J w' @4 L( f$ f @.CurrIcon := "load";
2 |& f$ G8 ]! n! d- z6 D2 j GlobalDistObj := part.globDestination;9 z% ? {+ s9 G
assignLObj := rgmanager.rgAssignL;
8 y% q: w/ D; h/ e; ?+ o+ ?7 e row := assignLObj.getRowNo(GlobalDistObj);4 h& R5 Q( ~' ]7 `7 [. P7 _
if Row = -1 then -- since 701 k' }& Y; q& b2 P' g6 [9 B
if lan=1 then
, _8 m. j& T; n; [$ Q) R0 e$ x0 f1 c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 T7 F' ]# B0 I7 ~1 L
to_str("in der Andockstation: \"",?.~.name,"\""));
6 _# V9 V* s* ?+ b else
& Y c0 E' @. R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 b' U7 e: i% w" G- ` to_str("in docking station: \"",?.~.name,"\"")); ! e- l+ {( I+ C
end;7 q+ o- h; ]3 J l/ ?. f+ s( k
else1 W0 J! g) F+ B! L: p; K
@.Destination := assignLObj[1,row];
7 ]3 j' {9 v' |" F end;
8 n3 @9 K" {/ `+ g4 k5 W newDirection(@);
. E: b" H" S- F- k7 W @.HasOrder := true;
) N- B1 P0 d* ]9 ` end;
z0 k2 L9 Q* _* A end;5 c; C) b, Q7 R
end; -- of the method
9 g, ^8 _8 ~- w |