/* called by: entrance ctrl of the object 'track'6 K1 U3 d& ^8 X
*/
9 o( R L& i! W8 o$ q+ uis! [( \1 v# ?) A R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) t- T1 c" y/ L" T0 h/ z8 I0 ?
do6 h* m7 z5 w8 d8 j6 C W9 r
Lan := rootfolder.Internal.Tools.AOLlanguage;% e- d W2 r4 e; I2 F- `( ?6 n3 n: D3 }
if current = @.Destination -- else return# R) @& U* ?/ n
then
: g4 D& b2 ^8 d }( P @.Destination := void;
" M* L# {6 M& _4 D1 r4 B1 O if @.occupied then
) y, u: ^" [' ^& F! s* R1 b part := @.cont;, `8 Z- Z' D7 [! m) o2 H4 S
@.transpOrder := void;! b% I, ]/ i% q: x8 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; W1 d p1 b z: u. Z7 q, m/ B5 Y
@,root.eventcontroller.simTime);, k4 z, X+ d( R! W* ?$ P
@.HasOrder := false;
v: v: F& P5 j* ` E0 s @.DrivingHome := true;
( j5 e* T* j0 \& V$ O rgManager.tryToStartTransOrder;, ]4 C. t2 P5 I3 |9 n9 e+ \
if @.Destination = void
" d! \2 ?7 R3 y- Z, t$ [1 Q8 _2 N then -- no transport order for vehicle @
: }. z" {! e c P6 B: W- T @.Destination :=: v* Y6 ^' _/ v$ g( ]* c5 q
rgManager.nearestFreeStation(@,track.~);
' @( M! ]) y0 S% S C newDirection(@);
E' J7 T) F* @. f l/ g" i if @.Destination /= void then
# G/ V ^( `6 t3 S3 T4 {! M0 i @.Destination.NumReservation :=
/ j8 _: _8 _; k. B, d6 w/ H! l& F @.Destination.NumReservation + 1;
+ `! g5 |# @9 P$ C6 o end;
! K4 @+ C4 L' \: q1 ` @.CurrIcon := "drivingHome";& R6 F+ c5 A5 [! o! k, S
@.DrivingHome := true;
R; [# e) L+ B# Q; D% V5 B end;
3 `# W; O m2 e M( E else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& R6 k7 w% q: V part := @.transpOrder;
! X. s) e/ `4 Z/ M8 g part.move(@);-- load part' Z9 U# b9 Q6 p% B/ ]) b% t
@.CurrIcon := "load";; O2 S* _+ y# E7 r( o+ V2 V* c" x6 |
GlobalDistObj := part.globDestination;
" `+ D2 x' \% N9 V! d assignLObj := rgmanager.rgAssignL;
8 u+ o3 X. O3 y" k& p9 {. ? row := assignLObj.getRowNo(GlobalDistObj);
! G! ~1 b; F& Q2 h6 t n if Row = -1 then -- since 70* V0 Z/ P8 {. T0 |
if lan=1 then+ R# l4 q% O- [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ u) N* ~6 j/ K5 G& n to_str("in der Andockstation: \"",?.~.name,"\""));
" j6 r( t9 v% p2 s0 i else
" _- b( ^% I& q2 f, e6 [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ T. P9 K8 m6 G3 i
to_str("in docking station: \"",?.~.name,"\"")); - F# n4 R0 Z* X$ ]& L5 M
end;
* |+ u8 q/ t4 k/ A- V% ^ else( @9 C4 j5 P1 g1 v: u, i
@.Destination := assignLObj[1,row];4 |$ F6 R' n7 M& a. @7 e a7 e7 y
end; : v' R" i4 Q7 n8 J# B- s
newDirection(@);. D4 I( e$ f" i1 f2 A
@.HasOrder := true;. w7 y* E$ y" D, g
end;+ H k7 c$ }) H' r# X
end;
) u9 s. j* x/ n6 ~3 cend; -- of the method, U6 H* ^% s' c2 G5 E' y
|