/* called by: entrance ctrl of the object 'track'/ t5 V- h0 f5 F. S9 W3 @
*/
( h! {& C% q- O# a$ h# J# q5 F4 ~ tis
. q; ?. @* y* \1 @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;) r; k5 ~- x ?: K6 R
do
; Q5 O( T' T% G( P+ E) [ Lan := rootfolder.Internal.Tools.AOLlanguage;
1 a& n5 D& i' t/ u# ~" Z if current = @.Destination -- else return7 r9 E! H1 q' @* Z/ K
then4 r& N' c, `! C% {
@.Destination := void;, R. ~7 I. e" D, M; f
if @.occupied then4 |/ ~/ X! N" B
part := @.cont;, R. c0 d1 A1 M/ y) i( ]+ M
@.transpOrder := void;! ?1 R r' o& w3 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& e( P- k2 ]& E$ p# h+ }
@,root.eventcontroller.simTime);
- O% ?( ~: j: ~ @.HasOrder := false;
) B' Y- N+ f5 o+ [7 p @.DrivingHome := true;( c7 r* t0 g- s8 P* |, a* f8 A/ D4 n, l
rgManager.tryToStartTransOrder;
& E9 ?4 X9 _9 ?7 P; P; g if @.Destination = void
" U6 |, ~' y4 `8 p: v. n then -- no transport order for vehicle @
8 W- D- |& d& }+ G1 g0 i( s @.Destination :=
& a5 ]8 e5 ~) |, d9 n1 S3 c) A rgManager.nearestFreeStation(@,track.~);/ G0 j9 N4 a. |3 g0 A
newDirection(@);
3 D% [: {5 X0 V, C; N2 F if @.Destination /= void then( k( P) b: H( g- ^3 f! Z
@.Destination.NumReservation :=
4 _3 Q; X. E" l" V0 | @.Destination.NumReservation + 1; S5 \1 K; h/ V- t0 M& a+ S6 c
end;/ A2 q! N2 W' r/ @3 s3 p/ o
@.CurrIcon := "drivingHome";
* t( l+ @5 d5 u- O/ q @.DrivingHome := true;
' J% }9 K( K7 b0 P4 w) a: p7 \- r end;
2 U+ D' `7 H! Q$ [" I else -- the vehicle @ is empty, both vehicle and part are in the same dock station( f) R3 f- h; R, V9 E$ o; [% ^
part := @.transpOrder;
/ m1 p! n. x- d1 R; t9 X4 `5 d4 P part.move(@);-- load part* h( F v0 o8 L* }0 b3 e
@.CurrIcon := "load";0 z; ]+ f- I: i. Y! L, w
GlobalDistObj := part.globDestination;
" Z2 r. G B) w3 A$ `# K assignLObj := rgmanager.rgAssignL;5 p* D, V( s% u7 c6 e) A
row := assignLObj.getRowNo(GlobalDistObj);
# Q& k0 |- {' k$ T% d: f0 w if Row = -1 then -- since 70, t @- x. w6 C
if lan=1 then1 n! ]+ `" ?% ~/ k+ r7 d
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; l/ H, p# ~/ i( C$ H$ F' B
to_str("in der Andockstation: \"",?.~.name,"\""));, [0 N8 `# T W4 I8 r; y
else
9 {1 T/ \8 t4 v6 y& s1 R! h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 s4 |3 o1 Q! |0 Q- x
to_str("in docking station: \"",?.~.name,"\""));
! h( S0 ?7 j: N: h, T2 v$ n end;
) g X( Z7 V- z; U, K else% y$ v8 L+ ^: O |" {
@.Destination := assignLObj[1,row];
" O- M5 e2 L0 F# A6 M end;
; u6 {: W2 W% b newDirection(@);! [- ^" E9 B; l9 i C
@.HasOrder := true;9 b# u2 n @8 q2 K
end;
x# k! w, I9 \6 E% n end; e2 ?) k% [' [- B1 S e6 }
end; -- of the method
% f7 e, P' m6 L6 q+ a% V |