/* called by: entrance ctrl of the object 'track'
) h) }: f# o* Z$ v; j( m$ L* S, i*/
% I+ ?+ p+ g6 R8 A3 p: v9 u- z9 U, D% Wis. j4 Z O+ F8 T( e, X7 ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 n7 Y; U* X9 `; C+ L( L% v
do
! v$ r) f9 j8 X5 L Lan := rootfolder.Internal.Tools.AOLlanguage;
/ |- G2 S+ I6 [! i& ?" m. e7 n% g+ n G/ A if current = @.Destination -- else return- F) U! h, W8 ]$ J' V2 M7 ~0 c
then
7 w) K* `: h/ |, C3 b @.Destination := void;2 O! Y1 F# n" L6 \7 I1 _' h3 C- V0 E
if @.occupied then9 {9 \# m" G- X; q
part := @.cont;
0 |! r/ d8 s0 x6 Z0 h @.transpOrder := void;! {0 |$ l% G+ z" h% D6 G; c* U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 n4 A+ k1 t, ~# v- c4 a0 P1 ]5 X @,root.eventcontroller.simTime);
2 u- ^/ F7 ~' j) b0 C @.HasOrder := false;
' B$ |5 e- _8 ~6 E- R! a @.DrivingHome := true;
" ^- B8 P* k+ E% v* S4 ^! \' G rgManager.tryToStartTransOrder;
5 K. i6 b- z7 o3 O/ Y if @.Destination = void0 ^) E/ ]$ M! l! X' o/ N' N% x
then -- no transport order for vehicle @7 ?. ]0 F. w, [9 Y
@.Destination :=
( d6 K& t3 t% p6 A9 z rgManager.nearestFreeStation(@,track.~);6 x* g8 h1 y7 i3 D$ G7 j+ J2 G
newDirection(@);
s& [, A/ l" A4 D" j, X if @.Destination /= void then
/ G& W8 d6 B) A6 x: I5 D3 F" U @.Destination.NumReservation :=* E( k% H+ R/ ^0 {9 W% v
@.Destination.NumReservation + 1;5 F7 y0 W3 f; h+ x) H! m; E1 Y
end;5 X( @. A8 `! V1 D0 o
@.CurrIcon := "drivingHome";2 h2 G$ R4 e$ F$ u) p
@.DrivingHome := true;1 V8 X- g# y* |* F% j
end;
$ [; E" X1 U4 d( p% X( g else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 S U, a! m/ x) J part := @.transpOrder;! l7 o; U P) ]7 O+ s! I$ C
part.move(@);-- load part
% W0 W+ Q) a5 p" ^$ c @.CurrIcon := "load";/ m: ^: D+ R% P6 }, i6 C
GlobalDistObj := part.globDestination;
/ b. k2 ^. B8 H1 q! t assignLObj := rgmanager.rgAssignL;
3 O! b J. O# @9 Y6 h; Z+ k; ~ row := assignLObj.getRowNo(GlobalDistObj);9 z) @; a: s8 q6 a4 p9 t
if Row = -1 then -- since 70
G- X- w; z2 C if lan=1 then
. d, A3 d' A; ~* Z' Z1 C; h, v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: Y) r* V' J0 o4 i7 O to_str("in der Andockstation: \"",?.~.name,"\""));
& x! ]3 `! ?4 e9 L# }% A else
4 K {" O0 u0 t' a- F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 z6 A# b) U% V% I9 v! r to_str("in docking station: \"",?.~.name,"\""));
a, ~6 [* \0 g end;/ c% J4 N4 C. o$ ~# A5 F. L
else' ~& s9 a" a8 Q, Z) r
@.Destination := assignLObj[1,row];( A E3 @) K1 L
end; 1 R K5 J3 S: n: h# Y$ |
newDirection(@);# n, K& T2 W; I4 D" N" @3 u
@.HasOrder := true;6 p9 b; [" ]0 H4 g w: q. b9 [
end;
/ d9 W* \; g) x4 d end;
H; U F. i7 k$ ]* d n% o5 qend; -- of the method- t7 \& N! U( S F
|