/* called by: entrance ctrl of the object 'track'3 W6 v9 l( `% b' Y E
*/
7 D% _5 V& H0 q; n. pis( x) J0 s; }( H* k! V8 M8 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 O% `$ V8 l/ B4 @do
/ f! q0 g1 z7 [ Lan := rootfolder.Internal.Tools.AOLlanguage;
8 w3 b) {+ L. s5 W& B if current = @.Destination -- else return: Q; ~" {, }' Q- |5 u9 ]8 u
then6 u$ u" e8 M [% x) R5 D
@.Destination := void;
' }1 o7 W5 f0 q) n if @.occupied then
5 Q, a9 ~' p. S. t% U part := @.cont;+ W7 \, |; E+ y. f
@.transpOrder := void;( z j- H" h' c$ h' [( W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* f4 x' O2 J5 F& v+ y) }7 E2 S. \4 g# b7 ~
@,root.eventcontroller.simTime);
: z$ w4 L2 E; h' D9 h3 Z @.HasOrder := false;
4 i o( d8 I, ? M/ ` @.DrivingHome := true;& q) j$ |3 R: n* c0 ^( m+ l, l
rgManager.tryToStartTransOrder;
8 e0 x9 ~. n4 {% n if @.Destination = void1 g" `9 J! F" T ? [! I
then -- no transport order for vehicle @
' ]& B3 R) s. q+ ~" H. m6 u9 |+ t @.Destination :=8 M3 a. A5 Y9 s9 K9 ~, r
rgManager.nearestFreeStation(@,track.~);
- w0 ]; p3 j0 X" { newDirection(@);
4 [: H" [: G. I! |/ h; `: T if @.Destination /= void then' w4 }' c4 N; q' h& x1 ], U
@.Destination.NumReservation :=
) A+ ]2 _! @* X9 l @.Destination.NumReservation + 1;% n& g( X) i0 U: o! ?. K
end;
+ g( f: e$ a2 ]& e: K ]" L. M) S @.CurrIcon := "drivingHome";
; m$ S" L+ P+ J @.DrivingHome := true;5 N, A- E( m6 c( t
end;& h: ?5 y% Y5 c: R6 ]. Y0 h: R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, R% G. c2 i! T# L, ?/ d4 c
part := @.transpOrder;; U5 b8 m* p& Q
part.move(@);-- load part2 o# D5 h( U9 }! [/ Z, E
@.CurrIcon := "load";
/ V) w0 e/ y' b( O0 o! z GlobalDistObj := part.globDestination;& T0 z, Z& ]0 d2 ?: s& x- ]
assignLObj := rgmanager.rgAssignL;# B/ `4 d" S0 [4 [) x; J
row := assignLObj.getRowNo(GlobalDistObj);
5 B' X/ ?5 H3 v$ u/ W if Row = -1 then -- since 70
0 R8 \/ ?5 w/ a. c if lan=1 then
0 J5 T- q+ f0 d w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 E3 H; y6 C$ m to_str("in der Andockstation: \"",?.~.name,"\""));
: [5 i0 F' [: `9 _/ ^* X( m else: }1 Y; X( ~8 W: i- n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' B4 v, t! z7 R0 B to_str("in docking station: \"",?.~.name,"\"")); ( ]* z* D3 @+ d0 Z
end; A* Q. C0 S u3 e, W1 L: z6 t
else* i/ w1 F1 c- {7 x
@.Destination := assignLObj[1,row];' L% q. V, T- s0 n. u; R
end;
& N4 t5 ]' ?+ r" d9 U newDirection(@);
% s* P ]3 H8 B2 |; X @.HasOrder := true;
2 m* D: b6 k/ G end;# c; k0 Z& }4 R
end;) K6 W: u8 \6 P+ q
end; -- of the method0 t6 P. H" O1 f9 Q/ w% c6 L
|