/* called by: entrance ctrl of the object 'track'
# x1 U: u# z5 A# c*/" A# y' J2 \1 Y# D
is
8 |: x- R! W+ [+ v; E$ }/ L* k# ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 W& u& e' x. _ b% J
do
# B6 w. p C; F9 k X0 p) e Lan := rootfolder.Internal.Tools.AOLlanguage;* X6 O Y8 s+ N
if current = @.Destination -- else return7 p. C- ]+ I4 A% J1 y
then& w% T+ t, U' L+ S2 F
@.Destination := void;
2 G C' M }& v ?0 H if @.occupied then
- E, |- @2 X6 e2 y/ w, R part := @.cont;
/ M# ~3 N+ W( ]( ` @.transpOrder := void;
, p) V" b2 V! c( L1 | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, C5 S- p* z$ ~! H1 ^1 ^ @,root.eventcontroller.simTime);
+ h7 J' C1 x! q- C @.HasOrder := false;% z6 W2 U$ j, M, n' e; {
@.DrivingHome := true;: v' P- x, K, a
rgManager.tryToStartTransOrder;0 p6 s) H8 g2 O( G
if @.Destination = void$ B# s" N* k: ? ]' e
then -- no transport order for vehicle @
8 E9 }' `8 ~. g/ |6 f. X7 @8 n @.Destination :=
& g C7 H2 U- k+ d: z rgManager.nearestFreeStation(@,track.~);
- V5 d J. W0 R2 C newDirection(@);
& ~ _9 `; A4 K if @.Destination /= void then
7 p0 w$ u1 z) S7 H& c6 l- j% N @.Destination.NumReservation :=# k, n0 _$ i7 Q: n) x0 `/ f) _
@.Destination.NumReservation + 1;# c( d' G1 F) ?! B% `9 E
end;
2 V. k# {: m# A ]: v2 t. q$ I @.CurrIcon := "drivingHome";
7 ^/ g- I, A5 c @.DrivingHome := true;/ G; c$ \ r2 o1 u t) u
end;
% W# I6 m' |1 _% y- }& c' S else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 U4 W/ e. P$ a# W+ k
part := @.transpOrder;7 l* e: ?+ Z h* ?
part.move(@);-- load part! W) H4 y5 b8 A5 T- x
@.CurrIcon := "load";% a1 r; [1 u# O* n3 g r- D
GlobalDistObj := part.globDestination;
: L& S# f h+ I, l! z assignLObj := rgmanager.rgAssignL;' A, `. W" O; I+ W+ V/ q
row := assignLObj.getRowNo(GlobalDistObj);
" ~3 v7 _* Y* J2 i0 n* U: L if Row = -1 then -- since 70
. ^' V. ^9 P2 j8 O# [ if lan=1 then
4 L2 A, |7 N! p# k* a7 G% i7 ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- \7 c! \' E1 T( U
to_str("in der Andockstation: \"",?.~.name,"\""));
1 V( U: e6 A" ~% A1 k% e. V, ?, H else0 s- ~% W7 ?* B% X4 j7 y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 G! I8 Q4 a5 F% K+ g& r
to_str("in docking station: \"",?.~.name,"\""));
! R- m! [. E/ a" P) r& r end;
# S* D4 j/ ~9 |" j* k- N* S- m! r else
# |3 i7 p) H0 c @.Destination := assignLObj[1,row];
. ]: S7 ^) V- l5 g- D end;
1 e3 M4 {5 T5 X5 [/ w& ^; Y& H newDirection(@);
9 b3 z* E8 h( c @.HasOrder := true;- h# ?, o( r& M8 g
end;
& r1 n! ]) m: H% z6 ^ end;' u& E* j/ C F2 ]2 Y
end; -- of the method8 K" b3 c8 m2 c% j; e' G
|