/* called by: entrance ctrl of the object 'track'
9 u2 L$ z5 y' ]- [*/
& m2 `* Z" P. z) q$ c$ o }is
# N- i% T$ Y0 p5 n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 ?7 V& X6 a4 @4 wdo
# x( N; B0 m" B% ] Lan := rootfolder.Internal.Tools.AOLlanguage;, ~7 q+ r8 c0 V+ ]# L
if current = @.Destination -- else return
; q8 |1 Y0 R% p4 K$ I) ^; e then% z. l; t- P8 X, J/ I2 h, g7 \
@.Destination := void;" w" X. X* [: Q: m5 R' L
if @.occupied then
! s. C @) H0 p part := @.cont;
* p. E) t: f9 u2 U9 q4 { @.transpOrder := void;
8 {+ v. I( ^9 G. I0 m2 }# I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) c# N* y( \, j/ o* k( I, { @,root.eventcontroller.simTime);
" [: h B% A) {, X @.HasOrder := false;
, K X4 F- A5 l8 U @.DrivingHome := true;- B7 s/ r- D* _2 ~3 M7 Q
rgManager.tryToStartTransOrder;" d9 Q7 p! k, ^2 @8 L
if @.Destination = void
, T0 j% ^2 B5 ~, E. r& B* @ then -- no transport order for vehicle @
* w! u" c: w' f& ? @.Destination :=! r+ M7 e M: r7 N6 ]$ T- u
rgManager.nearestFreeStation(@,track.~);! D0 e8 M0 E y) v! M* U
newDirection(@); ) U6 u9 l# T0 N6 o7 x Y
if @.Destination /= void then6 x" O* L, ^( {3 t. Z9 m
@.Destination.NumReservation :=
# m6 O9 D5 n$ x: k+ R1 ~ @.Destination.NumReservation + 1;3 ]% ^/ n0 n& t' X9 R8 b/ U+ X
end;
1 B6 Z9 ~' X% k$ K+ D. r- H @.CurrIcon := "drivingHome";& m, S$ `; n2 T$ k; x
@.DrivingHome := true;
+ H- S+ W2 ~" z9 g7 ^, ] end;+ K/ x# g- G9 a# A5 |) F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& l ]8 t& O# f4 _! A part := @.transpOrder;- j( j0 {. |1 C8 y
part.move(@);-- load part
( \2 n( n0 \7 \5 s3 C @.CurrIcon := "load";" l6 h3 _- w% M3 X* q
GlobalDistObj := part.globDestination;6 ?. b5 c0 o) e
assignLObj := rgmanager.rgAssignL;
9 d/ s7 [ d; K+ O; y6 G row := assignLObj.getRowNo(GlobalDistObj);
) s, W- |6 P& q/ ]1 { if Row = -1 then -- since 702 i/ w% m7 Y9 e: k: ]7 w$ G
if lan=1 then
* Y: [3 G! ?" Q# R9 p6 {# @ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 m1 U+ N6 D/ R+ r8 S to_str("in der Andockstation: \"",?.~.name,"\""));
1 ?0 \' k3 @6 G3 A5 M3 s, N else
5 f1 H4 G& D6 t G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 E$ I% A9 Q4 K6 K6 c
to_str("in docking station: \"",?.~.name,"\"")); 8 c: N( c1 \2 j( k0 x6 J
end;
d3 `- m4 m8 ^4 l2 ^7 g: \& U else4 w/ V: v/ |" F0 X9 {
@.Destination := assignLObj[1,row];
0 R2 Z/ W( J: p end;
4 X' Z- C6 r5 d0 b+ ]) D newDirection(@);
! T1 _8 Y" u7 W' B; [/ C/ z @.HasOrder := true;
( `/ ^( ]$ R! v8 f' g end;
8 w- a0 e$ C$ x9 ~ end;
- A+ G @: y( C+ _end; -- of the method
5 Q5 K! Q3 I) N; J, I c, Z; s |