/* called by: entrance ctrl of the object 'track': r- V1 J% [/ q$ b6 N: [1 H0 M/ ?
*/
2 @) k2 Z/ |0 V: }is
+ e4 f- ^3 Y& e$ ~: _( I part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) T1 P: Z$ D2 _; u; U5 ado
. H& d0 k2 i% p# C/ J* Z- T2 } Lan := rootfolder.Internal.Tools.AOLlanguage;
+ Q- o J7 r1 C) Y8 i0 w9 T9 f if current = @.Destination -- else return
& W9 C, j* K# G then
; U; w; _) x. N- e7 p1 o2 A @.Destination := void;. C* h# z1 p* G2 F3 X
if @.occupied then0 Z0 |+ b* }0 F- V* O
part := @.cont;2 u4 Q6 R. h1 x9 h! G3 I
@.transpOrder := void;
/ @5 I B( ^4 | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- l: @& I# A& j6 x3 L$ D, E$ g
@,root.eventcontroller.simTime);/ ]& K4 P: w% k2 K
@.HasOrder := false;
X3 K9 U/ l2 G% o* d @.DrivingHome := true;
8 m0 l2 u4 {5 D2 {6 l0 i rgManager.tryToStartTransOrder;# h. B. ]5 `% A& V: _& X! e3 G" Q
if @.Destination = void2 _! [; L& S% [; q
then -- no transport order for vehicle @( H @5 v2 S! M( A# S5 s; j8 D/ r
@.Destination :=
) V9 g. a, {' i rgManager.nearestFreeStation(@,track.~);4 t# C- R7 t5 R
newDirection(@); # P1 G2 d0 U) f7 {
if @.Destination /= void then
1 p$ h9 b& D7 h( y. M/ o) g @.Destination.NumReservation :=
, D$ M* m: X0 X6 @* s2 W @.Destination.NumReservation + 1;; z6 S" _& \3 f1 H8 k+ A/ z
end;
* i$ \$ \, g: G3 L6 u7 N( U1 h @.CurrIcon := "drivingHome";
# I' j* E- i: i6 `1 i3 o @.DrivingHome := true;
/ q) P7 A [6 X8 l( ^3 T7 v1 j end;
3 a: _9 n( c' c% S! Q4 W) d else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* U& r+ x" b+ `% P) e2 K part := @.transpOrder;9 k/ n$ M/ Y% P) y
part.move(@);-- load part
4 e- u9 [0 _7 N& u# ]# v6 V @.CurrIcon := "load";
) R2 n3 F2 Z. [/ ?( K4 u* { GlobalDistObj := part.globDestination;0 R+ U, a9 r; D0 c; w* e* b
assignLObj := rgmanager.rgAssignL;! d1 y7 h& E' Q |
row := assignLObj.getRowNo(GlobalDistObj);) ^, }9 u2 T: A$ Q6 g4 ?7 E% s
if Row = -1 then -- since 70- G. E. Q5 o+ u* i
if lan=1 then2 X* W- O2 b8 [! V; l/ n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," w, W" B8 l+ p1 e9 ^
to_str("in der Andockstation: \"",?.~.name,"\""));
% w3 P! H1 G' Y+ M else
8 e0 h7 E h9 T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. y: E$ A: ~1 [3 C2 q to_str("in docking station: \"",?.~.name,"\""));
@ F- j( P3 U6 Z6 L. k end;( t: H+ C! F$ `& Z3 d) x
else
' V; U- W m0 `3 A% Q8 J1 L @.Destination := assignLObj[1,row];
# m- f) w- L2 M; | end; 3 l* M0 K! u' h
newDirection(@);5 ?, L) m0 l* F2 d4 W
@.HasOrder := true;& w6 X$ d* b4 N* H' I, _
end;4 ?" o# v1 n% [
end;, i6 F, y6 _0 y z- U
end; -- of the method& D. [% b$ C% a+ h- r2 b1 G
|