/* called by: entrance ctrl of the object 'track'8 O3 O! r1 Q; D& b$ v
*/1 K" T0 @2 T3 i( Y; a) N
is) v( v H! A$ R7 m9 d% e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 l3 j/ z5 S, O! N e5 H& b' W
do
& ~) b3 h2 h5 O+ @) K. }6 R! U* L Lan := rootfolder.Internal.Tools.AOLlanguage;
: y8 { F4 m7 Q+ f if current = @.Destination -- else return
4 U p+ e3 ~: s then
8 F2 a/ n* F$ _; U# L9 u @.Destination := void;
! @0 |) e6 y( K( t" w2 [ if @.occupied then
' Q7 U( o& _" c part := @.cont;4 \( V& q n4 K6 K% b- T9 Z5 A
@.transpOrder := void;- ?, w" X' h# M- l' _4 K3 ?# L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; P/ t- Y+ J+ S @,root.eventcontroller.simTime);2 U {$ d! B- K, D, t
@.HasOrder := false;: D, p$ j) W5 F# I5 W, \
@.DrivingHome := true;* j4 Z3 B: n" w: Z- n- B. a( \
rgManager.tryToStartTransOrder;! Y' W: v* z4 I$ O9 s( {/ V
if @.Destination = void. f! ^3 t# y3 t" H0 m1 N
then -- no transport order for vehicle @; ], k9 K+ C! z3 d, |
@.Destination :=( @4 T* B8 z! O9 H$ L* j0 }) a& P1 z" h
rgManager.nearestFreeStation(@,track.~);
2 `5 o" k: Y1 m/ I! a newDirection(@);
5 p3 G& L4 ~. v. ^3 ` x( z if @.Destination /= void then
' R$ o: H' i% W% R7 |2 W+ [ @.Destination.NumReservation :=
" }% ~! v1 y* R! _" X z. q @.Destination.NumReservation + 1;
. M' o: a/ p& P8 F end;5 L; F- r8 |2 {
@.CurrIcon := "drivingHome";
( ^1 o; A5 m) m# x* M% W5 v" | @.DrivingHome := true;
6 n; p( R4 ]( H4 w, M9 Q end;4 g' y. h- p' K" {. l- I% ]0 r8 L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 C8 `/ W; O$ w- i; P. Y, H$ E part := @.transpOrder;
1 k8 z7 W$ Z6 u part.move(@);-- load part
% t: r6 K2 O5 _& q7 S, K @.CurrIcon := "load";
+ h% }# y9 r {" R GlobalDistObj := part.globDestination;
" a M X2 s% [4 W& Z8 a6 h/ O assignLObj := rgmanager.rgAssignL;
+ h5 w$ R/ Z( r _1 I$ o4 ^ row := assignLObj.getRowNo(GlobalDistObj);+ x4 t8 E- [" i6 i: |3 D
if Row = -1 then -- since 702 V7 i& P c0 r% _# v p7 G& ^% \8 |
if lan=1 then
% }, v/ K/ c- [7 M) j: r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
`" ]0 U# o4 X* L' V2 _3 u4 E to_str("in der Andockstation: \"",?.~.name,"\""));
; R3 _8 S" o, Y2 X else5 Q2 K1 c' S2 l& [2 Z8 w8 I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 y: ?5 E1 V. ^! D. i, c) |# ]* ^. }
to_str("in docking station: \"",?.~.name,"\""));
1 g, j* I5 Q" |5 ]5 @. \4 `. z( g0 g end;, X6 g; p; d' Q4 o& M
else
+ t3 Z* g0 [" d, Z8 X @.Destination := assignLObj[1,row];
; F. G J- g$ z) Z ^+ | end; ; n$ A0 o$ |- S' R* D$ ]: E l# E
newDirection(@);
# f5 i0 t+ a3 E" s6 A @.HasOrder := true;
* t' l4 ^* Y/ j1 H* A end;
: T2 G( y/ p! Q0 `. ~/ L& d+ H- d end;
5 L" z4 q/ e R; Xend; -- of the method
& Y3 d8 e# i/ @/ D# } |