/* called by: entrance ctrl of the object 'track'
% W; r6 W( x0 |' P N*/( |) u- ?7 Z0 L* j0 c
is
, o' f* z* S) g# s8 h part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 b/ I7 t" ^# x. |% jdo- y# X; q' v% @& R! t$ r6 E
Lan := rootfolder.Internal.Tools.AOLlanguage;
* Z# E8 ~7 {6 {0 x' r$ m if current = @.Destination -- else return
( D; F5 ?" W6 B4 l7 O, j( @ then! Q( u7 F& r5 h6 L! A! \3 D
@.Destination := void;
8 c! x1 x2 F D# L4 t if @.occupied then
# o9 f) a2 f: w; q/ O9 s8 G7 a part := @.cont;
4 K( f$ \% W+ Q @.transpOrder := void;1 S) C! ]5 M) V5 p d7 e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ E6 J( b5 S/ X/ z Z
@,root.eventcontroller.simTime);
( J T Q/ ~( e$ w! F @.HasOrder := false;
0 m' _ ~1 U, ^" p7 } @.DrivingHome := true;
$ m. @% Q$ X) r+ v rgManager.tryToStartTransOrder;
, m1 O/ k# _" X1 O; \ if @.Destination = void
e4 ]: r) ~6 f# N7 K" \& Q! s3 ] then -- no transport order for vehicle @) O; f( Y ^) T% i% _; \* T3 K. z) F
@.Destination :=
2 ~5 _, Y# r8 _7 @( m7 G rgManager.nearestFreeStation(@,track.~);6 j: y! U7 X; W1 W
newDirection(@);
; f6 N# V1 k& C3 X' {$ A+ c if @.Destination /= void then
' f& i+ ~- ]3 w/ _7 C: Z6 M @.Destination.NumReservation :=
& o4 x! {* b' J- _ @.Destination.NumReservation + 1;
6 u( H, ], Z( V, L; ^ end;
" r) _/ z" g. A( U @.CurrIcon := "drivingHome";4 J& N. Z3 c. z+ ~3 J) ~
@.DrivingHome := true;
, t! ~. C4 P1 p3 G h+ I end;! b0 W/ z4 d8 e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 }6 f: S6 b s
part := @.transpOrder;
7 b n3 M3 w! S: f6 Q( z part.move(@);-- load part2 x' T% K) Y' t
@.CurrIcon := "load";
. U# h; B0 D: w C, n GlobalDistObj := part.globDestination;
& e3 R- z) k0 t: Y( y$ D6 `6 R4 u assignLObj := rgmanager.rgAssignL;
8 Z5 g; G4 a* |, l& Z3 n) u row := assignLObj.getRowNo(GlobalDistObj);: j! d R) ?* b; {* P5 B: {
if Row = -1 then -- since 70$ `# y$ [* }& c' N' ]
if lan=1 then
3 b7 C+ S' ] T) _# W u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& O6 ?" e, R3 R; ~7 q! [ to_str("in der Andockstation: \"",?.~.name,"\""));0 @1 B% U. a/ ?4 c
else& d, J8 P1 H& W4 ?$ p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) `+ d0 w/ L& `* ]. ^- Q7 s
to_str("in docking station: \"",?.~.name,"\"")); $ L4 i" E K2 n" U! k
end;
6 i" k: @2 I5 B6 J else
2 |" u" N4 Q6 T I( G @.Destination := assignLObj[1,row];3 n* Y* _' `+ U0 V' r* z4 Y
end; $ P! k' L, {/ R
newDirection(@);1 @: R! Y& m2 R- G- U0 S4 u$ P0 ^
@.HasOrder := true;
" Q+ O1 X* N( ~; m5 @% d end;
: w: M7 {+ `4 C2 J) f end;) w) t! j% a* p$ T2 C' M
end; -- of the method
+ u" b, D( e- |# y8 h |