/* called by: entrance ctrl of the object 'track'! t* E+ N) W, }; |" s
*/
9 l, P L, I; P/ Ais* u( d- o0 p/ n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# c2 s: Y9 \ B2 K6 h9 l, ndo! W% T+ x5 D. ?+ D" h* F- a
Lan := rootfolder.Internal.Tools.AOLlanguage;
) V" Q7 ?, Q5 v X. v, F6 u* ` if current = @.Destination -- else return4 p, u& H- ]6 ^3 F9 b
then5 @' C& ^# f' N- e( _5 ?+ k$ u/ R N
@.Destination := void;& U/ n o5 m8 M" o
if @.occupied then9 q5 H! [6 s8 q0 c+ l% ]0 z
part := @.cont;
) @; o; M& a, I/ J) |6 M$ ? @.transpOrder := void;" x" r. s( z1 u6 B$ z/ G& [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% c0 C0 O+ K. V2 F) v) [
@,root.eventcontroller.simTime);
* G: l* m* X1 Q7 {- [ @.HasOrder := false;
/ E9 D) T ^1 `9 D5 z @.DrivingHome := true;% c/ x5 @6 W) d) g
rgManager.tryToStartTransOrder;
. |# J: r+ P P% i" U8 c) Y! p if @.Destination = void
; r- I1 W: R" V then -- no transport order for vehicle @" w: f8 @- [' \) O6 D9 Z
@.Destination :=' q; E) E$ |7 t
rgManager.nearestFreeStation(@,track.~);8 T/ [0 f* h6 g+ R( b, j
newDirection(@);
" H# w! Q" ~5 Y d/ f# g$ A( k if @.Destination /= void then
' U& _/ b0 A' d9 e0 ?! H1 s6 | @.Destination.NumReservation :=
3 G+ H7 f: x8 d3 ] B) ~& W9 | @.Destination.NumReservation + 1;
2 n! h$ H9 f: \; l0 S+ {9 a end;1 K; v' i- Y, ]( V p
@.CurrIcon := "drivingHome";. f0 v1 }7 \! p( Z. q; H# }
@.DrivingHome := true;
9 k' _9 x% v0 I' Y |2 a5 w( G' O8 s end;
) u( S( U& z t8 p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, k( X& |* ]1 X; M. V4 H part := @.transpOrder;
. X2 p( K+ Q+ S part.move(@);-- load part3 S# i8 ~/ q) A* |6 r0 d) r& v! m
@.CurrIcon := "load";6 r U* T# ?7 i3 y8 D" U
GlobalDistObj := part.globDestination;
) |! g9 t6 J/ W5 \! ]: C assignLObj := rgmanager.rgAssignL;$ h- h8 \7 w5 U: w* ~- I
row := assignLObj.getRowNo(GlobalDistObj);
$ ]: \1 `4 r1 t3 S if Row = -1 then -- since 70+ J' O& z( B8 G9 g1 S6 h
if lan=1 then
; p6 D' Q, }1 ?$ P- {# D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% |/ m$ x. Z& Y' y6 C. Q to_str("in der Andockstation: \"",?.~.name,"\""));
. u3 S( p3 P( K7 f F! i7 r else
9 \3 Y& H# {4 L% W }7 r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 Z/ k6 I2 j4 i# L: W9 U5 j, Q to_str("in docking station: \"",?.~.name,"\""));
% e. d- n6 O/ K end;2 {- D: H7 _8 G& E7 [5 ]: h
else
: C2 @& e9 @+ ~5 g% g+ L% U @.Destination := assignLObj[1,row];- d# _9 q1 c/ c/ S1 I
end; ' @ g! K; c- P( o4 n
newDirection(@);$ K! D7 u) c0 D1 Y# M; }, b0 K
@.HasOrder := true;% S1 C' U& n' E R' L f
end;
- u4 X2 |" G& J7 ]5 v! M2 F end;
5 l; T. u5 [) q( Qend; -- of the method
: B6 C* m2 V4 f; Q |