/* called by: entrance ctrl of the object 'track'
% C2 s$ D1 v2 o5 O! }0 v*/( T# r, h* O% t( q* [, S
is. G) z, O1 s: t* S; `' l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 x& B$ q2 i, D8 F2 u( ^& q: I
do- s1 N4 p4 L5 Y
Lan := rootfolder.Internal.Tools.AOLlanguage;
, m' O) l- R! @$ c, k if current = @.Destination -- else return6 g& N* x% f, B6 J) q
then
8 J ^1 a! ]$ v9 y# H R @.Destination := void;
' {8 p9 \5 o; M9 t if @.occupied then' Q" g: g0 y) `: Z: M
part := @.cont;
- C7 s5 k: c& D4 r: P$ N# ~ @.transpOrder := void;
& u: j# c+ P7 O+ Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! a0 U& I9 D8 G
@,root.eventcontroller.simTime);& ^- m, l; B1 @0 }; o
@.HasOrder := false;# ?5 E7 W0 n7 p9 W2 v. V0 x
@.DrivingHome := true;! J0 Y' a- C" S9 }; j6 p" L: W
rgManager.tryToStartTransOrder;% y, k/ _; K# ]! [
if @.Destination = void
6 d- x: Y0 d6 T$ V5 R8 }" ^ then -- no transport order for vehicle @
+ `: S; }! k# _6 a @.Destination :=
7 E, I" V n d8 G- ]% Y0 r rgManager.nearestFreeStation(@,track.~);: b$ e! I |5 j0 D3 o3 \" \5 Q
newDirection(@); & w7 p" a. K6 N8 o! ^, i* S, q
if @.Destination /= void then4 o( e) S3 Z) d* N5 e8 Y, b
@.Destination.NumReservation :=) H) V/ a# N2 }7 d/ A$ z
@.Destination.NumReservation + 1;
7 n8 }6 D8 P5 H3 ~ end;
, t4 W- p/ s+ n2 j @.CurrIcon := "drivingHome";6 ^2 \4 B& }, u1 Q2 F& i Y3 s
@.DrivingHome := true;1 N7 c, w% f+ z* _! }) ~' }4 U
end;
1 e9 D: C! [( n5 B! m2 Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 p0 k% K: `/ D2 c; k% g' O
part := @.transpOrder;, w8 k9 @8 \0 D7 e" O4 O
part.move(@);-- load part
( E4 }7 ^1 t3 G/ ` @.CurrIcon := "load";
1 D2 ~# h2 U) W7 @/ S9 B3 M GlobalDistObj := part.globDestination;
, o3 [+ Z$ I6 w+ @8 V assignLObj := rgmanager.rgAssignL;. u9 Y" `- K6 T! _
row := assignLObj.getRowNo(GlobalDistObj);
5 B! u) {- v" I# `, w7 | if Row = -1 then -- since 70
+ m/ e9 r3 Q+ x' O! ^ if lan=1 then, {7 b- m$ a) l6 I* m" _2 t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 \1 a+ R! C6 Z1 y to_str("in der Andockstation: \"",?.~.name,"\""));) |5 o8 O# `3 ?
else- k% ^( e1 P" ^9 A7 f+ `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; ]9 u$ Y9 n) ?+ A
to_str("in docking station: \"",?.~.name,"\"")); % ~" T# p0 y0 ^7 \4 w1 l
end;1 P9 ` z# s$ [$ G i; _ ` u9 W
else _. d. w" u! l5 i: U7 O& X
@.Destination := assignLObj[1,row];
: } O) L. j. x/ H: T! T end;
. X9 u" I* C, J: H( {( L0 o3 _* F/ D newDirection(@);
3 H0 A% O, u) e/ a @.HasOrder := true;
- w8 Z' W# h4 a. B* Y end;
1 Q0 v! s* H/ T4 z9 } end;, X) \! ^$ ~# i
end; -- of the method
& y2 {' X5 G4 h |