/* called by: entrance ctrl of the object 'track'
Q2 v, v) B6 D0 b# F) b+ L; C*/
: t0 R' m! G# V% v" R3 c' U# bis
7 E/ U, u& e8 z. ^3 ]0 m" _; n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( O5 q' Z5 S5 F( D3 Ido8 N3 x' Y X3 F! ^' s1 @9 a
Lan := rootfolder.Internal.Tools.AOLlanguage;' V( ~6 |' o: x* }5 b
if current = @.Destination -- else return
% W! h% @+ d1 a( A. C% ^ then4 q3 n+ E ^( A' g# S
@.Destination := void;
U6 R, |: Q, W8 ^* Y0 z if @.occupied then
% {6 A d- y/ ?, O2 r% o7 m part := @.cont;: z( V* D9 S" a( a5 T
@.transpOrder := void;2 h( P2 G- [3 H5 H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ n$ z3 l# |' V' N
@,root.eventcontroller.simTime);" x' `" N" ^5 v: F* T
@.HasOrder := false;
1 T$ o# P# H" h7 ?3 G' G) T @.DrivingHome := true;6 t" T, ]3 Z3 m3 k2 @" X! O
rgManager.tryToStartTransOrder;
; p0 }' m* u: l6 X if @.Destination = void& O% g5 h/ F. x! n7 F! D
then -- no transport order for vehicle @
1 E; M1 g, w R5 {4 E" E% m6 D5 ^5 d& @ @.Destination :=
- k4 d! H- y) v( }. f/ q% V( V rgManager.nearestFreeStation(@,track.~);
9 q+ Z1 d7 {) F: @5 z; o newDirection(@);
( `. X1 p& R. N, w( J if @.Destination /= void then* q2 _% d5 ^# k0 G+ q: _% T
@.Destination.NumReservation :=' Z b/ P3 d, w! G' j
@.Destination.NumReservation + 1;, H6 i" {6 s: F' Z( S
end;! l4 B" H; h5 I- s
@.CurrIcon := "drivingHome";
' X. |( n5 x% ?$ S. C @.DrivingHome := true;# u: ], r) H5 r
end;) p7 k. @, ]! Y4 V& ~) K0 h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* C( S( s* v) ]5 H8 Q+ w4 q) t part := @.transpOrder;
( W ]- N# `! b( s part.move(@);-- load part
y% T2 t; |7 q& `& U2 ^) ~ @.CurrIcon := "load";
2 w. V) a/ |% T! O6 c5 j GlobalDistObj := part.globDestination;
2 w* ]9 Q, e0 D5 t; ? assignLObj := rgmanager.rgAssignL;
* S3 I( V4 P& L row := assignLObj.getRowNo(GlobalDistObj); ]1 K3 `' Z0 P/ C5 W
if Row = -1 then -- since 70- X, v& A# ?, V. c9 s+ @
if lan=1 then
. i5 p% @ [/ R- H- Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; M7 }* j1 \1 v2 {3 u& b+ o6 b0 N to_str("in der Andockstation: \"",?.~.name,"\""));
1 E% {5 m; G/ @1 q, a- ^+ X else
% x" ^6 v/ ?) K+ q4 F7 f6 R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( C7 F( ^+ r7 ]* u
to_str("in docking station: \"",?.~.name,"\"")); . ^' N% O- w/ s" ?6 I4 @
end;
$ [- q9 R; l& a$ Z$ n6 Q else
+ b; k! v& ]( O) m" \ @.Destination := assignLObj[1,row];
) g' j8 m/ }# N) I( k end;
$ q) u& n) t. W4 l, m, Z newDirection(@);
# {( H, n6 U, ] @.HasOrder := true;
0 c" |/ }; n# U' e) e { end;
; E: w: |5 `" c6 K end;
# U* n- a+ x. Bend; -- of the method# d. |2 j. X* V: `8 J# y# H
|