/* called by: entrance ctrl of the object 'track'
4 r1 |5 u+ U, o0 T) k j*/
W: S7 g; ]/ \" q. I& |is0 C0 F' W9 E% P+ O( z1 Q, d- Y0 x6 ]# v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* M% r8 K' C1 t0 x( Q0 R7 h( S: bdo, u: Z8 W* _7 n0 f
Lan := rootfolder.Internal.Tools.AOLlanguage;* X/ W6 _ K( s- \' [3 @. H
if current = @.Destination -- else return) D2 v. k- @) {6 i
then
: z* V1 x1 `9 { @.Destination := void;3 a+ X+ ]5 O4 X: k: j
if @.occupied then
5 e- U d! p: C9 ] part := @.cont;) V8 v. G: a u; p! z9 A
@.transpOrder := void;
" t1 \0 V& z% ?7 ~: q, b/ g1 G8 t4 I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. W+ A# `8 V% I% F. E @,root.eventcontroller.simTime);! N9 F* |9 s* U( ?5 F5 X x) \
@.HasOrder := false;4 S2 x5 q* T* @4 ^* [
@.DrivingHome := true;
$ ~7 P% g2 w; I! t8 H3 V) `/ K- o; Z rgManager.tryToStartTransOrder;$ G. y% y* W4 p4 }& @5 f/ S
if @.Destination = void
- S5 U; @" j1 j0 q then -- no transport order for vehicle @* _+ J; \4 O7 P# h& @: K$ r
@.Destination :=
x+ K8 r- \6 i; m- v9 t/ L rgManager.nearestFreeStation(@,track.~);+ j. Q3 g! Q5 V- V
newDirection(@);
( S* w+ j5 x0 t! {6 [/ ?5 L2 i1 K if @.Destination /= void then" G* q! P4 L2 z) g8 V
@.Destination.NumReservation :=, T+ y a! P! x/ [1 `6 V, ?
@.Destination.NumReservation + 1;1 f8 F; J [4 D* h$ u
end;$ X- N+ q. A+ N
@.CurrIcon := "drivingHome";4 W* ]' z( N( c9 G
@.DrivingHome := true;
; A! G3 }! I1 G6 Q! D end;
( c% t% O. s& M% T) k3 O+ ^) t( }+ J else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 _6 g2 Y; U: m3 m- _; O part := @.transpOrder;
6 j0 c3 ?; g' {# N( h' M part.move(@);-- load part
: n8 d8 p8 t. Q! b6 [: M, ?; r6 N3 i- ?) q @.CurrIcon := "load";. q5 X" R7 x: n
GlobalDistObj := part.globDestination;
2 t" s9 |1 {& ?( u, _" Q- F8 b8 z6 _( |4 K assignLObj := rgmanager.rgAssignL;. O3 C6 ?# K+ ~; B7 c4 h: u7 ]
row := assignLObj.getRowNo(GlobalDistObj);
$ A7 Z& g1 b8 p5 M! J* [ if Row = -1 then -- since 705 L5 n, w' f! F- \0 g; p+ r
if lan=1 then
3 _- D" r$ n' F2 y$ m: v8 s+ v5 u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- x" V: n$ A) F to_str("in der Andockstation: \"",?.~.name,"\""));
1 e9 U! F! \; M2 y# @! C else
! V' F+ Z7 o- N/ J0 C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), m% t0 k2 f4 p( f
to_str("in docking station: \"",?.~.name,"\""));
0 Q& k+ B9 f- \( X end;2 K' O" B6 ?6 d& L
else
! g; ]8 _& H" D$ ~0 w1 @ @.Destination := assignLObj[1,row];
4 o8 a1 N3 y6 i' N8 s* y+ }7 f( I6 d end; " e6 z: `* e+ y4 s" M3 ~
newDirection(@);% E; |7 c$ R( y/ C1 g% ?# ^& Q. i" E
@.HasOrder := true;- I) D0 ~4 b0 @
end;
7 M5 k/ R6 I4 v7 h' H6 ? end;
- v- x* R' E w6 Tend; -- of the method
& S* F: [8 g/ d- y* W |