/* called by: entrance ctrl of the object 'track', K1 f, O+ A, q4 c1 v
*/
. i8 U. |2 { Y* \, Z4 Gis
8 _! t3 C* R: p8 t8 F part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% Y0 e% G( }; t' o/ c$ hdo; ?1 u3 ^+ A) ]& x1 S+ y: U
Lan := rootfolder.Internal.Tools.AOLlanguage;2 N# `" ]; e% [6 a
if current = @.Destination -- else return1 X% w! _+ k$ }$ ?' f0 J
then
% h, S" b5 s; b$ i3 N% z- y @.Destination := void;
, N( M5 u, d* T" z/ Y/ H if @.occupied then
! o, k. p1 \) o: M) \/ m part := @.cont;
, G6 \- |: ?% N+ j @.transpOrder := void;
8 A$ x+ q0 Y. d* ]' Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* I/ l9 f& p1 m* J2 h4 `9 ^. p
@,root.eventcontroller.simTime);
* R6 d. e3 b! g: v/ q' N! O$ I @.HasOrder := false;
0 i3 D! l8 j; a$ v5 o+ F @.DrivingHome := true;# U7 d$ k) T0 A ?$ G& V9 ]' Y
rgManager.tryToStartTransOrder;1 o& B. P5 e0 y. v7 D) r+ X
if @.Destination = void* R/ E7 C* h. u1 k1 s$ e! e& _" l
then -- no transport order for vehicle @
; ~* S9 {/ J$ O( y, p: h @.Destination :=- v& W" z2 q3 t$ t" k* U$ R
rgManager.nearestFreeStation(@,track.~);
6 A/ R* r4 Q: z: x8 K" U, ^7 l2 V2 K newDirection(@);
# I! Y- ^9 o/ o. ]( X C if @.Destination /= void then1 k; X% }- I% W: q- o
@.Destination.NumReservation :=% ?' t" J! T, R* y; X
@.Destination.NumReservation + 1;
$ r# M7 {% e I end;- g9 q" i) c) o7 {1 N6 ]
@.CurrIcon := "drivingHome";
! Q& \4 J- ]/ Y. z! N1 d/ I @.DrivingHome := true;- v8 B- B. `+ B V9 Z
end;
7 {6 ~! F% E. J8 U else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 `6 _0 }: |4 O/ }
part := @.transpOrder;
. R6 I8 z) W/ J# X part.move(@);-- load part
( ]$ D! @+ U( _( L3 e- c @.CurrIcon := "load";% \0 ~% T1 w6 `! i! [- f9 X- I. }
GlobalDistObj := part.globDestination;
. `0 d0 X8 b6 z assignLObj := rgmanager.rgAssignL;$ f" L$ M; b9 t
row := assignLObj.getRowNo(GlobalDistObj);
2 l( W/ }( D: C& `5 e, ~8 p+ \. u if Row = -1 then -- since 70
: S8 z" v) ^; S( H! [7 _ if lan=1 then) i1 c1 g6 @% R
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) y& r2 t* T" S7 p/ _! W
to_str("in der Andockstation: \"",?.~.name,"\""));
/ d! j" R9 \* }+ T& Z else
. G* |) ?2 W4 ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, Y- @7 O' ]# Y/ ? to_str("in docking station: \"",?.~.name,"\""));
) j4 y) V" T7 X \6 I5 M- d end;4 ^* L) F; X- F; @8 V
else1 ` N. F) S7 v$ W) f' R
@.Destination := assignLObj[1,row];
. p& c, b$ ~% r. n) V end; ( b' N) E6 {% y' c2 v
newDirection(@);4 h; l) l- D) d
@.HasOrder := true;, ]! V8 p2 P) Z
end; d5 h- _0 M6 Q: u' v; o* v0 ]
end;
- { a9 R: U" x$ \% Z" [end; -- of the method
: X& j9 e9 v) p% r" [9 l/ Y. n) J X |