/* called by: entrance ctrl of the object 'track'
; {* i9 y$ l9 m+ v w; S R6 ^*/( {# Q- z! P5 y$ m
is
: R/ d2 E' [0 b part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 ]. p+ F- H/ }) I4 N: \% P! m
do
, _9 O! X N% H* H* }7 z Lan := rootfolder.Internal.Tools.AOLlanguage;
' U ^) I" @4 b/ g+ u& z if current = @.Destination -- else return3 c: ]- u" c4 Z+ b! i8 p3 `
then/ P. u( }' D( h2 C
@.Destination := void;6 t0 [7 E: P r$ ~6 i% R2 k
if @.occupied then$ J% _2 ]$ C/ ]6 x! I9 Z
part := @.cont;5 Z) S; Q2 }9 c8 r; l7 j* R
@.transpOrder := void;3 U, C: f% a5 `# f$ C4 d4 Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 d1 _8 y1 T7 v9 U3 \, Z- d/ J @,root.eventcontroller.simTime);
) q. W* E' a d" D% |5 v; @ @.HasOrder := false;
2 u/ e' Z- q1 k- a1 |1 f( h @.DrivingHome := true;/ @ ^9 u1 G) _6 [0 r
rgManager.tryToStartTransOrder;% a% n# M' i8 C' O( B, b7 X
if @.Destination = void
$ u) X7 `3 k4 b1 G3 B then -- no transport order for vehicle @
/ c$ B+ m1 n8 ?6 U r/ O7 |$ s+ ^9 ? @.Destination :=
- D8 x1 j9 y) G, G6 I rgManager.nearestFreeStation(@,track.~); m5 n4 s6 z K+ q' \
newDirection(@);
. p3 \% v/ {$ b2 K if @.Destination /= void then
6 X+ v6 z1 Z+ ?- q8 k @.Destination.NumReservation :=
9 |, n( X/ k: M/ J" _' Y @.Destination.NumReservation + 1;
" Y6 `3 f* b I5 g4 L end;( w, [( q N5 b+ f
@.CurrIcon := "drivingHome";- A1 ]$ ? O! Y: A0 C( n6 j
@.DrivingHome := true;
( |- O8 d( H* S# g* a1 _ end;
9 [! @- {% O( @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station% c$ p9 C# k4 r1 V+ G
part := @.transpOrder;# n+ \: O6 Q, W; t$ I$ Z
part.move(@);-- load part
- {' R* L G6 c1 T# A& Z9 V& y0 Y @.CurrIcon := "load";+ g7 a! g4 r! B4 T* i: N( o
GlobalDistObj := part.globDestination;, x4 |: ]" P4 a& s0 [$ g4 P' Y1 r
assignLObj := rgmanager.rgAssignL;- j! t3 e" ~, {, W, n
row := assignLObj.getRowNo(GlobalDistObj);
8 f, Q+ f' L8 }' }* x r8 h if Row = -1 then -- since 702 Z9 X+ D. V" x# @; m \+ n' q
if lan=1 then
, R4 J) e9 k' i: y/ f' `/ X' W- { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% n4 m0 `9 K" X: |" e: [& x8 ]
to_str("in der Andockstation: \"",?.~.name,"\""));
' \% G: R: }' b/ Q else9 ]' J1 |# p: r N
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- S1 x G$ s6 K6 X6 Y9 n! z. O to_str("in docking station: \"",?.~.name,"\"")); ! a" [4 j( U6 W& L
end;
9 A3 g! ?$ V. p$ B9 ~: ^ else
+ O6 ?, z4 z+ @4 S8 `; |* o @.Destination := assignLObj[1,row];
* R6 M" g9 U7 Y2 m5 q end; , s) P8 t# O8 f" j5 c
newDirection(@);
' e" i& k1 s& P6 F H! O1 `' o' K @.HasOrder := true;
- z/ ~1 ?0 {* U! d; B end;
6 X& o; B1 {! P6 L end;
& Y" ?9 A' g1 @: L, k/ [% ^0 l. aend; -- of the method
4 ?7 t$ y" i1 L |