/* called by: entrance ctrl of the object 'track'/ M, m8 `# ~: ]( B% M
*/
: I- s$ T0 B. k7 Dis
$ n" ^: y) C! E, u. G) P- f0 X3 I part, GlobalDistObj, assignLObj:object;row,Lan:integer;# V! w _1 Q' i# W$ N3 Z! U2 }
do# ^3 ^1 `6 I9 {- E- L R% i0 g0 M1 C
Lan := rootfolder.Internal.Tools.AOLlanguage;2 i, }: X. l: |9 [- U
if current = @.Destination -- else return) X" ?* ^$ D7 s7 p% d# H1 }
then$ R, g, n0 [6 l/ N4 Q
@.Destination := void;
3 O" S7 j& s1 B) C if @.occupied then
$ S( t) f2 A) n! u. o part := @.cont;. V+ b. X( n) Z' D) F" n: X7 E" q
@.transpOrder := void;
0 T& I) t8 L6 L+ n! K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 V- O# Y9 h0 h. Z( y @,root.eventcontroller.simTime);
1 x, w7 z( m- r. I. n1 C2 T @.HasOrder := false;
& ~6 T; E4 g7 p" Q0 \; g* T @.DrivingHome := true;
Q( f/ O3 } x0 g: f% {8 ` rgManager.tryToStartTransOrder;
2 `3 A* h, J8 _- H if @.Destination = void: v; R& R5 ^. S) g3 ]; F, V1 p
then -- no transport order for vehicle @5 Z- a8 ?, ~/ m, P' a
@.Destination :=
4 C0 D- q S3 }* l: E J rgManager.nearestFreeStation(@,track.~);7 ?! i! K, h4 ~4 N/ A, P7 X/ F5 O2 z9 L
newDirection(@);
# h- r1 [$ ~' b- y if @.Destination /= void then& t1 ?5 D9 d+ `" O% l$ n/ g4 r
@.Destination.NumReservation :=* e/ O. R" X. h5 ]& J$ V B; \
@.Destination.NumReservation + 1;
6 w& M) s8 o0 o4 v. W end;# \! v/ L7 m/ ]# h
@.CurrIcon := "drivingHome";
+ D% h: S5 C$ D/ E7 e! X @.DrivingHome := true;
4 F) q N# q3 w) H end;
) P* u Q) e, ]; T5 y% G else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! _+ `8 i( z/ i) Y$ x4 I M part := @.transpOrder;1 e" A+ O+ N9 R$ X, [
part.move(@);-- load part
2 W: x4 o0 U! {" M5 f: ]4 V @.CurrIcon := "load";
0 A1 f4 [. w. |6 ]' v GlobalDistObj := part.globDestination;
' D$ k% f; z' |* ^% g' n+ [8 l( l1 _ assignLObj := rgmanager.rgAssignL;
6 z+ \& m8 o& j% J row := assignLObj.getRowNo(GlobalDistObj);6 {) S5 Q# w0 v4 A
if Row = -1 then -- since 70
! w1 d s4 v! y0 v( a( {- a1 h if lan=1 then
9 ?3 J1 l( D0 v: R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; l D4 d7 B5 |- | to_str("in der Andockstation: \"",?.~.name,"\""));9 S2 U: E; g9 g; ^' r; \- o" k# {
else
7 S( T- w3 p4 J d1 ?. Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 ^2 l1 D3 I7 V to_str("in docking station: \"",?.~.name,"\""));
2 O' C1 U2 D; \6 r. z end;
% H$ d0 Z* x5 T& P! F else
9 U u; H ]3 c6 \, \ q% [ @.Destination := assignLObj[1,row];
{7 K/ ]' c. ]% Q( S end;
3 J, @5 i+ ~( j3 @' B5 X newDirection(@);% A) V, j: p% {8 A! x( [0 v
@.HasOrder := true;
; _- A3 @4 J y8 b1 M! [8 d5 c' @ end;# `* \( E4 G6 E% @& c( O* v, {
end;3 J0 M9 ?8 ]4 V' a+ F: {
end; -- of the method# l. h8 ]& g3 ~* M2 X i; ?6 \
|