/* called by: entrance ctrl of the object 'track'; z' g% f! N! D$ ?+ P" \- a- M, `! g
*/4 n" n/ e9 _. ]7 V& |
is, M. l. p P5 R" t0 f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% e( x8 L# X& Xdo
6 t# D n0 ^( ?) ~" x* [: v Lan := rootfolder.Internal.Tools.AOLlanguage;' K8 `, _* Z2 H
if current = @.Destination -- else return
) x6 Y# q9 u0 k then9 B2 G* b! E) u0 h6 Y* R
@.Destination := void;$ e0 {) W2 R. j. F9 }- w
if @.occupied then6 n1 S# y$ V5 T1 s
part := @.cont;
4 v2 V8 z2 U% Z @.transpOrder := void;
! w* ?# O! A3 F1 c J* @& P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. o0 L# S' k7 Z- G
@,root.eventcontroller.simTime);9 g/ i& p2 K+ S, z# t$ B' q
@.HasOrder := false;6 V1 ~7 D2 P* [( B% V
@.DrivingHome := true;: J# e# D: N2 Y4 g
rgManager.tryToStartTransOrder;. A. Y9 n: c+ T0 G4 d( e' o
if @.Destination = void
8 L6 `0 F+ W3 i( O# M! h+ i then -- no transport order for vehicle @/ L7 F6 B! \ G& r; u& e, J
@.Destination :=- c" b. z8 l2 J/ s& A
rgManager.nearestFreeStation(@,track.~);9 d6 u x! E0 j# G, u2 R+ V
newDirection(@); ; W& N/ `6 A6 ~
if @.Destination /= void then" r& b4 m) F m# L
@.Destination.NumReservation :=
) }7 S' A. X1 Y' W3 k( w+ v8 J @.Destination.NumReservation + 1;
# T) m5 Z' D; u; ~+ _ end; A$ Y# R( e+ b$ W/ {
@.CurrIcon := "drivingHome";
: V9 v! e9 d2 d+ `8 o! \ @.DrivingHome := true;
% m1 [! Z& w3 d( K* ` end;
. B- O0 e2 p. } else -- the vehicle @ is empty, both vehicle and part are in the same dock station' T" ^- Z8 P/ ^% q# T6 C
part := @.transpOrder;
6 U0 H9 G4 D+ S& L' ^# l) [ f" x/ I part.move(@);-- load part
7 ]/ f, z. Z$ J0 r' I5 w @.CurrIcon := "load";
. G) t$ a' U$ X: G GlobalDistObj := part.globDestination;
! C1 G: L* `8 a& z/ s5 T7 o assignLObj := rgmanager.rgAssignL;) e) x) R) x) F; R, R( {4 \/ g
row := assignLObj.getRowNo(GlobalDistObj);% g8 W! x- s& H$ p
if Row = -1 then -- since 70: _- L8 p# q+ H u" w$ W
if lan=1 then
* l9 b4 H+ K2 W( g3 A9 m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ F7 |! z) H. M3 g to_str("in der Andockstation: \"",?.~.name,"\""));
1 _5 S; V9 x: x2 R2 G, O1 Q% _ else: D# V/ S" l" e7 y9 g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, f1 r! }/ R6 s; q( p1 A to_str("in docking station: \"",?.~.name,"\""));
2 ]) h$ ]1 P6 Q6 j end;- i) x3 g- x8 Y, j% d- w( X
else) Q u1 m9 u* z, h9 J7 F m" M
@.Destination := assignLObj[1,row];
& c/ h" A7 k4 a1 I& O0 I* O% n end;
* {* M9 [2 | n4 f* \. b1 l# y newDirection(@); n& r; H5 p) ?
@.HasOrder := true; C4 W5 m5 P1 K) {$ J2 @
end;( ~/ B: m6 T! w" Y5 g8 m5 C
end;; p6 X2 [1 {- W
end; -- of the method! \0 r0 x" K0 N, |1 {" F) W
|