/* called by: entrance ctrl of the object 'track'9 |. v3 I$ f8 V8 T7 O, m7 T
*/6 E) A2 y6 Q. n
is3 ?- \$ h8 o" Y1 @* P& F7 p$ S1 v4 g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 M6 J0 k( e# L: F6 F. Xdo1 X! V4 e8 T8 o- J# X8 q6 o
Lan := rootfolder.Internal.Tools.AOLlanguage;2 X2 D9 H3 h8 w! q, z) ^1 A
if current = @.Destination -- else return
) k+ g% h9 w' _& G Z then
$ m4 q" l" \+ e% W; x @.Destination := void;& W7 G# M2 \9 y8 v
if @.occupied then
, j8 D$ K3 Y* ^4 ~8 t6 s/ S }. q part := @.cont;
( X9 q) }+ i6 u! z% c$ V- P$ ~6 h @.transpOrder := void;
G: J( }9 i. I* n D- N* Y! w! D; B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 q: Y0 G3 p% N! l! W3 @ @,root.eventcontroller.simTime);
! u0 d6 h0 l" U4 K# V4 o @.HasOrder := false;, Z. T6 Y) J3 O
@.DrivingHome := true;% b# C0 ~+ C! [+ x8 X
rgManager.tryToStartTransOrder;
2 d8 i: Q# g7 n& O2 }. A% d% ^ if @.Destination = void3 T# [ Y0 I: y; Y8 G7 a0 J5 _
then -- no transport order for vehicle @% h( n5 K" l. V1 B6 x9 x: Z0 J, Y
@.Destination :=
2 Q5 r' H% d! k& f0 o$ l+ F. ^0 s rgManager.nearestFreeStation(@,track.~);
8 E" B! z0 v1 b! p1 I newDirection(@); $ Z* l) F# |% \5 I* x0 p
if @.Destination /= void then
% e+ X& O9 h/ S3 b: p @.Destination.NumReservation :=
|% j' ^ C: m$ Q" T @.Destination.NumReservation + 1;7 j7 F: k7 B2 I. Z
end;
8 e5 }3 [6 h2 _0 v6 C @.CurrIcon := "drivingHome";
5 i) o7 J" ^' W {# ?' O8 Q, t @.DrivingHome := true;
7 u' H( A1 h* x* N: H end;
4 y* a# }" T$ b- ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ S8 j' C' L1 ~
part := @.transpOrder;
% d9 n3 r5 R" l. H part.move(@);-- load part
8 x) U0 M% c5 u @.CurrIcon := "load";
+ a/ ^8 j9 t0 D: p6 H/ a GlobalDistObj := part.globDestination;
, f- q2 J' J8 ^8 J assignLObj := rgmanager.rgAssignL;0 w1 Y5 H* J0 `4 q, |7 L, ^ v
row := assignLObj.getRowNo(GlobalDistObj);
2 E, v7 h$ w5 Z( W: R# T1 l- Q if Row = -1 then -- since 70
$ Q' e" Y6 [+ j. T& p5 \2 F if lan=1 then
! p3 s% w! q! |4 c+ S8 z2 D6 i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( Z, a; J+ k& s+ s5 o
to_str("in der Andockstation: \"",?.~.name,"\""));; @; Z! s% F& t, N+ X
else2 y: e8 [+ O* X" h9 t0 o* B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ n' b& }& `6 {' A to_str("in docking station: \"",?.~.name,"\"")); 0 }3 a- X: P+ r( L. r% i4 P: C
end;* c+ m$ G( V; g6 I: n
else a: v1 R, D9 ^. {. n
@.Destination := assignLObj[1,row];
0 P$ g3 }& W, d8 A end;
) o' j( `- n T# A4 r, {# C newDirection(@);1 Z. m3 F0 }6 D0 l2 A0 r2 `
@.HasOrder := true;
4 ?3 m/ k! Z- e, R; I4 e- r/ R0 ^/ s# G end;
+ s4 ]* ?6 D. t% A1 u) |2 x2 `! V7 |+ f end;
- Q: [/ v8 q+ pend; -- of the method
: }" D S. }2 |! ?9 u |