/* called by: entrance ctrl of the object 'track'
. _# x6 R# ~1 N0 t4 q, w% u*/
& l& c; c- ^4 w6 L$ q# b6 R) ?2 Q8 ~is( K3 t n& I& I8 d- {' q" \4 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ b. H \2 Y5 v2 y) [( C2 n
do
: ~% y$ D% r v4 m0 F. W Lan := rootfolder.Internal.Tools.AOLlanguage;
0 [, C* l7 I% W8 ~) Z' W if current = @.Destination -- else return+ e( ]( B" G3 E- \
then
8 l# M7 ~' [. I6 @8 q" J4 g @.Destination := void;# W( o% u$ O" O9 z
if @.occupied then. [' ^3 K- I p+ N
part := @.cont;
2 l4 c9 }! {5 D0 U: {3 T @.transpOrder := void;
0 Z5 L# R1 y; o+ M% H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. U0 v4 R6 t: Q) g3 Y$ C+ f @,root.eventcontroller.simTime); u" K) [8 \* O3 M4 D# m$ ~5 G# p. P
@.HasOrder := false;& z/ x# D& K5 e% J5 J- w
@.DrivingHome := true;
^7 Q: p K5 K- r3 l+ V rgManager.tryToStartTransOrder;
; |7 c7 i. S% w5 d3 P if @.Destination = void# @7 L( E. u: a2 ^& R
then -- no transport order for vehicle @! f' y8 T8 e& H$ z- q; Y/ o
@.Destination :=
0 a. h2 V. J' e' G: e rgManager.nearestFreeStation(@,track.~);0 w% i* P5 N( l2 `2 n- m9 V
newDirection(@);
" S* P: H1 D* x( c# a2 H if @.Destination /= void then
3 q. F6 t, F3 C8 m @.Destination.NumReservation :=+ _" @. a# {: n
@.Destination.NumReservation + 1;2 q* r x; F+ W4 L3 c
end;
' x2 V; K$ y8 T: m7 M& y @.CurrIcon := "drivingHome";
0 i7 S* t9 ~/ O s% p2 h6 n @.DrivingHome := true;
1 K8 x8 d* J: p5 w& l7 A end;- G$ h( Q0 a. ]1 j m" F- ~, ?, U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 O( n( Q6 I% U* } part := @.transpOrder;0 P. S# t+ d9 j: ?6 x
part.move(@);-- load part" F4 ~% T q# F) M. q" U
@.CurrIcon := "load";$ r3 D8 Y9 f% m' m1 z- H8 K
GlobalDistObj := part.globDestination;
, E) y- }0 Q' Y1 t% e assignLObj := rgmanager.rgAssignL;
) `7 q; @7 A! ~" m% ? row := assignLObj.getRowNo(GlobalDistObj);% J+ Z2 Z* h4 m! N; M' f5 J% W* y
if Row = -1 then -- since 70
; p4 a* c( @; P$ A X; [9 g5 m1 j6 r if lan=1 then
' S' ]7 I2 |1 |, R C# l2 k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 U. D( M8 _" ?* |8 w+ A$ e to_str("in der Andockstation: \"",?.~.name,"\""));: V( c4 Z8 M# u: k& X
else
. e0 ?, R! D& K- k" A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 m }1 x* o- q6 o
to_str("in docking station: \"",?.~.name,"\"")); " ~" Y6 F: E( ~0 }8 C- H
end;. W$ G8 `$ B( T5 ^6 n
else
! W1 o! g& P( @ @.Destination := assignLObj[1,row];7 p8 ]) z1 v: {0 J
end;
# a$ Q4 _( J5 o+ ~, d* a! l. A3 E newDirection(@);- _5 A, o( G1 T) S8 T' ]5 o3 y3 }
@.HasOrder := true;, N1 W e' N' \; w2 K) G5 J" g8 C
end;6 a- l: x, ~, y
end;' L+ B. f+ v+ ]$ R b' T' P
end; -- of the method
7 r/ V2 _* E% V' W |