/* called by: entrance ctrl of the object 'track'; v D' G. Q# K ~: C
*/! P% w$ O' Z1 o2 h2 B* w7 Q
is
+ K3 s. w% {. y8 R3 G0 U part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# }, a' e0 Z1 Z5 ~) Ido9 K# R" Y8 w9 N: Q4 J
Lan := rootfolder.Internal.Tools.AOLlanguage;% ?4 Z( y# B4 `- `' V
if current = @.Destination -- else return
# y0 ?+ s6 P. \# `9 o5 d then- e; U n( u/ K& m7 d: \
@.Destination := void;# W* L7 s7 U9 ] H1 o
if @.occupied then
" _' s( j3 [$ h3 M$ Q part := @.cont;
) t3 H1 {3 L6 R7 J) |# ^ @.transpOrder := void;& u$ H/ x. H$ ?2 C9 Q6 {2 t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 T! W/ O/ h7 x3 L @,root.eventcontroller.simTime);9 d! w% m, H6 U" V* |' e
@.HasOrder := false;
1 b$ K( i7 i- L2 u/ T* k* X @.DrivingHome := true;; w; h0 i4 x* P& I7 q" A- B
rgManager.tryToStartTransOrder;+ @6 N$ z* p4 H! V( J* ?& F% ?6 U) m
if @.Destination = void
2 D* _, l- G; E+ t. z then -- no transport order for vehicle @, Y) C5 P+ Q. L
@.Destination :=
' y$ x' ~ I0 {& ? rgManager.nearestFreeStation(@,track.~);) j2 [+ K: `/ S" d3 w4 ~
newDirection(@); % M3 W! l9 z; w6 c i; ~+ {
if @.Destination /= void then
, i u; @% |; m. m1 l! ?( r @.Destination.NumReservation :=& ]: F1 G( }# r& `& l; f
@.Destination.NumReservation + 1;
- k; i% Q( r8 g0 O O0 o1 |; w end;0 |+ w) q3 t0 @
@.CurrIcon := "drivingHome"; f% Z2 f. B5 S) }' U @) M
@.DrivingHome := true;6 P& N2 v; c/ X7 v9 O
end;
0 R. g# n( G! L. g+ b else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" |" J1 \! j! T: ^" [4 @% G part := @.transpOrder;
& j. V8 x R3 D& P part.move(@);-- load part
4 i9 z- p+ B9 y( C" B5 p, { @.CurrIcon := "load";5 L9 Y7 {% {. h% i1 B0 X- j* [1 s
GlobalDistObj := part.globDestination;
+ a8 R. u- s' m+ n assignLObj := rgmanager.rgAssignL;
0 \, j9 L) b( u8 | row := assignLObj.getRowNo(GlobalDistObj);
% X+ M7 ^( Y& M7 `# L! q) Q$ @1 Y2 \ if Row = -1 then -- since 70
& q! m9 ^3 y. G% i6 P- w% Z, K5 q: k if lan=1 then
. u/ q/ W7 |8 ?; e& K1 c% L4 } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 q8 B) `7 `6 ^; P1 Y- y+ O, i to_str("in der Andockstation: \"",?.~.name,"\""));4 x2 f [" X) v8 M* ]
else
/ L6 ~0 g% n, y9 _2 c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& }) ] P5 `, t7 y
to_str("in docking station: \"",?.~.name,"\"")); . ~. j3 ~, i$ Y% `
end;
7 G. p( ]+ U- W# y- ~4 s else
+ `8 F4 w5 A$ c# @& U @.Destination := assignLObj[1,row];. g) |. o' ]; R& k5 K9 S9 w
end; . @) Q# w3 v, m' y& C) C/ t# H2 \
newDirection(@);
* n9 @. Y! [* \4 E. ^) ~ @.HasOrder := true;
+ }9 m" }! `" _ end;
8 d- T# o6 ]8 b7 i& Y5 Y end;6 A# X5 S7 X0 [9 \7 ^4 J
end; -- of the method6 w$ t8 [! g+ w7 J
|