/* called by: entrance ctrl of the object 'track'8 E" q( o+ h. o6 v/ d, c, N
*/$ G W( U& I. G
is1 X0 o) J) }2 g# N* e$ X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 z( i% [; H- h9 P, C/ Z
do" l& X @3 f/ [: v% F( X, m2 Q
Lan := rootfolder.Internal.Tools.AOLlanguage;
, W3 |( t$ \$ s* b- g6 e if current = @.Destination -- else return
" l, d$ ~3 i& ~6 Y7 |) u; O then- {' }1 y% c- k* b
@.Destination := void;5 E3 o/ y9 B/ o. E" T6 K
if @.occupied then
, m7 ?; l( }% i4 Z, r part := @.cont;/ U2 J4 Q' E: x; d
@.transpOrder := void;
9 f& B$ b! b0 Z2 `1 q8 J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( w) x! f6 s, ?0 F
@,root.eventcontroller.simTime);
! s" ]* l/ D# a7 d7 q1 ?: l1 P/ P @.HasOrder := false;
0 r+ d7 T2 Y- U& o @.DrivingHome := true;8 l7 h1 k) k) o: M! c
rgManager.tryToStartTransOrder;
) {4 h8 {; q% F7 R C if @.Destination = void
% [* J+ T0 x" `! T then -- no transport order for vehicle @
- x. j6 }! E3 E2 G. z8 F, W* f( Z @.Destination :=
+ ?0 c% I2 F" q( J rgManager.nearestFreeStation(@,track.~);
. B1 C* {* V# o5 @ newDirection(@); $ A1 W: G; D5 ^- k+ h* L
if @.Destination /= void then
( R5 ]2 Z, W0 k% q6 m @.Destination.NumReservation :=
6 V& w) J; [1 E" O8 Y6 A @.Destination.NumReservation + 1;
# T6 `) t1 y$ Q6 ^1 H end;2 A" M5 j. H; O/ R
@.CurrIcon := "drivingHome";- U5 K) g" v& R# O4 B
@.DrivingHome := true;
: x# S( O3 G5 }. H, R" V4 t end;
1 m' }! H2 m$ m else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% Z# m: r) u1 |$ T+ ]1 i% e$ t. k part := @.transpOrder;
$ t# m. g9 [1 d0 K* g2 A part.move(@);-- load part+ U5 Y: Q2 T ?: B6 L; M* N
@.CurrIcon := "load";7 D4 Q( @* }& D" ^- f. d
GlobalDistObj := part.globDestination;
4 p2 A2 W# I+ U- ^) H0 J assignLObj := rgmanager.rgAssignL;/ i5 {0 U! n( p. i
row := assignLObj.getRowNo(GlobalDistObj);( }9 U6 N$ q8 ^( x
if Row = -1 then -- since 70
Y0 C @% ^' S* X* `8 e/ W N if lan=1 then5 v, B- M4 y! T/ f2 N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 G. m2 {& z+ {4 B/ K to_str("in der Andockstation: \"",?.~.name,"\""));' W2 X& n# @+ \( g- C" A9 ]) p
else
- S8 {8 K% }( X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! _/ H6 B0 x. z/ n to_str("in docking station: \"",?.~.name,"\"")); 9 y6 l U# f& L/ }
end;
* O y# c3 q3 ^: o, Q0 R else! S$ {7 p* N8 g) I! t2 p; Y8 }
@.Destination := assignLObj[1,row];
( d6 g0 A" k- R( D end;
+ \, v# N' o8 _% m4 p newDirection(@);$ e7 T% f( j+ `, d
@.HasOrder := true;
3 n! c4 a" g/ q( [4 Q3 T end;* Z7 ~* o1 |6 A5 a6 O/ ?
end;
. s# B- L! S: m, l* w6 q" Hend; -- of the method
% A" W2 @. h- L/ e$ ` |