/* called by: entrance ctrl of the object 'track'5 n. ^9 c0 D5 o% N) A* Q' b M" s5 U
*/
* p6 O! _- ^, n9 L" m+ l% yis0 \' X3 w. n" A2 m: E7 U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) h- t# m( F0 }! K
do
+ S9 q+ H& J0 q Lan := rootfolder.Internal.Tools.AOLlanguage;
5 O3 ~5 j, z1 P" v* {+ ^ if current = @.Destination -- else return
1 r7 O$ _6 i; P. q3 o0 s then
3 Y0 ?; ]% ?. x8 [7 b, T @.Destination := void;1 ?3 V( O8 W- R( T1 V
if @.occupied then) G' |, P- N& K+ o
part := @.cont;: m7 c! ^9 g2 b5 j2 r& c
@.transpOrder := void;
+ W2 t- x2 M8 p* Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 ?' z1 N: Q$ s8 S( ]8 n
@,root.eventcontroller.simTime);
# M8 u% |: J, a7 D. \0 i @.HasOrder := false;
1 l4 M6 d: h: K& {. y5 X7 f @.DrivingHome := true;
1 Z9 u# h+ L1 A; o: M9 d3 M/ J3 s rgManager.tryToStartTransOrder;
4 W" }5 \) b6 \/ M$ v% n( m, x; u, z if @.Destination = void$ R/ w( S+ S' q) b' @- ]: I8 I
then -- no transport order for vehicle @: T$ d, o- Y9 r, I- l3 S- L- z3 Y
@.Destination :=
D! l& u( v3 I3 x* ~* O% T" N& b rgManager.nearestFreeStation(@,track.~);9 V4 V/ R& |$ ? f8 s6 I2 ?+ l* j
newDirection(@);
4 B1 u1 L8 M n; q) D: } if @.Destination /= void then
* c' P$ i* z# T* y4 A @.Destination.NumReservation :=. T/ o6 `; _& I* L0 E* G3 k
@.Destination.NumReservation + 1;
, l* A' g l( L! @( q+ t end;
: Y9 ]& K# L& a+ n O m @.CurrIcon := "drivingHome";
+ r3 `1 S. r' n$ K7 c4 T9 S' P" J @.DrivingHome := true;: v( J5 T8 S' `, s- {. K
end;
1 U h: U1 P' [3 C" b9 G/ F else -- the vehicle @ is empty, both vehicle and part are in the same dock station
S+ k" K$ D) P* n part := @.transpOrder;
% t8 ]$ a# I4 S n part.move(@);-- load part
* U/ m" u+ X/ e8 g) d. p! } @.CurrIcon := "load";/ |6 r. e$ z7 h
GlobalDistObj := part.globDestination;+ ]- t1 S, d# a" k
assignLObj := rgmanager.rgAssignL;2 S$ p% T; R& L$ ~+ O7 f
row := assignLObj.getRowNo(GlobalDistObj);
4 A% a8 h& d) y' q( w. l if Row = -1 then -- since 70, F9 w: ~8 ~ F4 Y, Y, ^. C
if lan=1 then" T6 i$ X6 i& F7 |3 ^; a" o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 ]- V/ A. \& Y8 O& p# j to_str("in der Andockstation: \"",?.~.name,"\""));
( w5 I m8 C, C0 }. l else
; O1 q% a6 x, U4 X5 T2 z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ t6 T1 X3 u. E. C- i1 ?: c$ {8 ] to_str("in docking station: \"",?.~.name,"\""));
. |$ z0 W3 T) O2 K' G/ \- O: e1 B, Q end;
_: W3 {+ T) F( B9 ^( z' ?* W: {: u: m2 T/ i else
( p) f& q' M+ u2 v" \4 l @.Destination := assignLObj[1,row];
! V( F/ o7 E3 {/ \ end; 2 ?9 n0 K( v: ^8 ~+ A/ {$ f' e
newDirection(@);
9 |1 d/ _# B) Q @.HasOrder := true;
1 ^3 p( `6 }% H& ] end;
9 u) e/ ?2 Y, h7 f4 C6 M( ]) p end;
' Q5 {3 r; C! z0 N) uend; -- of the method0 o/ n6 \( i2 L0 e! T; K
|