/* called by: entrance ctrl of the object 'track'
1 t# M8 @! W9 u0 S; ] k% a2 D& Y*/# ]% o) _1 v/ c+ G: I, u4 A" l+ W
is/ {+ ~- Z6 P1 |9 n$ P. Y2 J4 s m( w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ Q& Z2 I& S; ?' A" c( W$ y0 r
do% M }& B! U9 E3 p3 G9 f
Lan := rootfolder.Internal.Tools.AOLlanguage;5 `) O8 s( I, Q. b: ~& P0 J
if current = @.Destination -- else return
) \4 e5 q$ Z9 M- \( m then
6 A0 h8 k% k4 d7 [% d5 U @.Destination := void;
' ?3 b. n+ T; e* _! p& r if @.occupied then- h1 ]7 A/ P8 D' p, w9 }. x/ B( Z/ S
part := @.cont;7 p& B; H" |/ n: v
@.transpOrder := void;& t. a3 |9 S+ Y$ f2 _( t1 l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) k+ ]+ {9 V3 V! M @,root.eventcontroller.simTime);, s7 P; {7 X: h b/ X! H* d
@.HasOrder := false;% j) r) Y% h9 v. t
@.DrivingHome := true;
/ t, @2 C; x- i# `& @- O% h8 L rgManager.tryToStartTransOrder;8 O5 P* j L8 B1 q; I- n# M
if @.Destination = void9 f- n& ?$ E0 i
then -- no transport order for vehicle @
0 f5 O$ v! C& c6 z" e @.Destination :=" d9 N- G% K* P @1 J+ f! l
rgManager.nearestFreeStation(@,track.~);( M& [; o! A3 u
newDirection(@); + X! z' M# J+ S+ j( x6 Z
if @.Destination /= void then
1 u7 L# W x1 n; j/ { @.Destination.NumReservation :=
; [- L1 `) j2 `" F @.Destination.NumReservation + 1;
1 e1 ?2 \. K5 d$ t6 g end;
+ D' I+ @4 O3 q @.CurrIcon := "drivingHome";/ j G3 l& g( x8 v8 X; @- L8 o
@.DrivingHome := true;
" a' @, B+ N3 [- q" T* s4 G0 \ end;( L: B/ S, N2 G, e$ X; R+ R5 ~5 m3 X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* `' D" c, s+ Q6 M8 G: C
part := @.transpOrder;9 {# Z9 g8 U- p! m+ G+ u( i4 _' s
part.move(@);-- load part
. Q6 e; y) T0 L1 i( H$ I6 i" A9 _ @.CurrIcon := "load";9 e! s& i0 w9 u
GlobalDistObj := part.globDestination;
4 a0 |( z. `9 r" e7 t7 Z assignLObj := rgmanager.rgAssignL;
( ~# u% t5 R: b row := assignLObj.getRowNo(GlobalDistObj);
2 l+ k" C& q# V3 E if Row = -1 then -- since 70
/ {% L$ Z" c: n7 o! Q7 A if lan=1 then2 L2 T; x" |0 ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( ?3 L& D6 m6 e, H) d
to_str("in der Andockstation: \"",?.~.name,"\""));) y" @/ t3 H) ^4 C
else
! y/ \" P7 ~: E& b- ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 V( q- J' ~$ A& L7 ?6 W to_str("in docking station: \"",?.~.name,"\"")); ( F4 X) Q9 ~% L0 e
end;
0 ?8 m. b( o4 M }9 x/ {: @& R+ h' a" K else/ `+ `. d7 L5 `" J' b. C" j
@.Destination := assignLObj[1,row];- S- t( }4 ]. M- w9 b
end; ) u. h/ H7 p. v/ Z
newDirection(@);! U* f5 w# A' \! U
@.HasOrder := true;
; k5 o o6 @ M7 a1 }0 p end; ~2 d" d# E6 G
end;
) X: n& }7 ]; {* F% q$ [end; -- of the method
( h: I# |7 x, R |