/* called by: entrance ctrl of the object 'track'
/ c2 k: L" T- L: ?*/
# L9 M* C6 C% h! X8 Ois3 L# v$ X9 X) V# Z7 i9 j
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; Y7 y1 z( V c! y" j( ldo
0 u- N& |9 J- I+ x. P! R5 m Lan := rootfolder.Internal.Tools.AOLlanguage;) L3 ?9 x/ P6 L6 F
if current = @.Destination -- else return
( D3 K4 R, ]$ _) s7 X then
- N1 g, U0 ]# [0 T/ M& |4 R @.Destination := void;
9 G7 _+ i5 k, [- E if @.occupied then, l5 e, s" \: B4 O
part := @.cont;3 A4 f% p- t8 V% H. s! v" H' D
@.transpOrder := void;
3 X7 u5 f# u$ ~0 p$ v* ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" q8 d" R* W8 d. Z* x c @,root.eventcontroller.simTime);
- m U2 s1 G0 C4 ] @.HasOrder := false;
1 d+ A5 c) ]* X @.DrivingHome := true;* C9 u3 E, F3 Y6 G; S" h, _
rgManager.tryToStartTransOrder;7 u6 p- Y- v5 u$ ?/ J! K; ^
if @.Destination = void
6 L- d8 b) Z m4 b2 i2 c then -- no transport order for vehicle @
$ d# ]8 `; [7 e, O( w @.Destination :=5 z! f( D) \$ z, f
rgManager.nearestFreeStation(@,track.~);
, s9 x5 n, X7 \; Q: k% l/ L newDirection(@); ! f' C9 S* F {* W4 o! V1 q2 }8 E
if @.Destination /= void then- }' B, w3 z6 S) V r' \
@.Destination.NumReservation :=8 w2 n7 Y9 h" n, z2 d7 A" U
@.Destination.NumReservation + 1;
% P$ S( _5 ]! E# [; i7 F end;
( w A+ ]( ]: T, d8 A @.CurrIcon := "drivingHome";3 k! a$ D$ f2 J6 A" S
@.DrivingHome := true;4 f% }0 G: }' q- T8 m- ^% w
end;
% n( S1 _: e1 _5 ?$ {" E0 r else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 L' R( A; y0 W4 m8 p9 N part := @.transpOrder;6 m8 R4 N% p! ?: }5 e( U( \
part.move(@);-- load part& F, b' r* T4 e! P8 D8 ?
@.CurrIcon := "load";( y% u- s2 z2 f6 W
GlobalDistObj := part.globDestination;
w* P6 |+ G" i! j* p) r9 { assignLObj := rgmanager.rgAssignL;6 z" i) i5 ^8 B% M
row := assignLObj.getRowNo(GlobalDistObj);
6 d: I1 {& V( c& O if Row = -1 then -- since 706 A Z2 E2 Y4 M
if lan=1 then
( g& \- W! X8 ~' ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ e" |: D" \0 }9 { to_str("in der Andockstation: \"",?.~.name,"\""));
. b! P6 G3 C, c; H else0 R+ p' H% r5 X y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' {' y8 ~. K8 M1 z$ I I- b4 M to_str("in docking station: \"",?.~.name,"\""));
) \( v7 s. q/ T7 y end;: Y( o1 s8 ]; Z c
else% X# B V9 F+ T8 ^2 |
@.Destination := assignLObj[1,row];; U! W( I' V3 }7 @! @, S, ]% \3 Z
end;
' \' _$ b5 _$ i4 L% Z# o newDirection(@);
9 v4 v* M1 U' U @.HasOrder := true;* ~5 t! _7 y7 {5 d
end;
/ Z n; P. s$ ]2 o; Y) h- [ end;# D/ L' e+ N- ^ r$ R
end; -- of the method5 b- N& z, J) d5 m1 J& ~8 `
|