/* called by: entrance ctrl of the object 'track'
& Y2 j, W% c$ s5 t( y*/) ~1 ]+ A0 P: T* a7 x
is
$ y3 x( }4 g$ c* [9 @8 ~$ s9 ~- t part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 P5 y, F5 r2 b
do6 T# O2 }# a- l. V' b& \
Lan := rootfolder.Internal.Tools.AOLlanguage;! U: `' B4 ^- v5 v6 g: X* G
if current = @.Destination -- else return
! X7 S1 i' E; E( ] then# v! E' t4 d- i! E% b {
@.Destination := void;
$ L5 N6 y) k; f g$ y' G! `' F- W if @.occupied then* `0 v1 f+ w, M: C9 e# u* T
part := @.cont;& ]/ Z7 ?$ b8 X" V
@.transpOrder := void;# l) `, v6 r& A- c" z( W) @! N3 o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; t+ q) E8 | ?7 _/ v, ^; t
@,root.eventcontroller.simTime); P1 C& D0 g+ e$ _; r
@.HasOrder := false;, B- K% M, _+ M. m) F! ^" l
@.DrivingHome := true;
4 u( a8 L# C* ~1 ?, ] rgManager.tryToStartTransOrder;& y7 h% _4 A" `9 @8 ~$ x
if @.Destination = void
+ r$ A1 q( b! N' i+ J then -- no transport order for vehicle @; }+ G2 ~& U& O! M; f! M% y2 S: h$ x0 M
@.Destination :=
6 V; x# q* R; M3 C, [+ m rgManager.nearestFreeStation(@,track.~);
( o+ Y1 H$ K2 z9 |% V* M; q newDirection(@); ! w+ h4 o8 K: ]9 y9 E0 W+ U9 d5 K+ N
if @.Destination /= void then
# h9 l$ M: ^$ s/ U1 U3 L% f @.Destination.NumReservation :=0 V- \* w a4 b& j. E0 |% [* i M
@.Destination.NumReservation + 1;( f* b5 ?+ v% l9 j7 ?; Q+ x
end;- Q* C6 |: w# J+ I( P$ H
@.CurrIcon := "drivingHome";
: l* P2 e+ }' ~8 C @.DrivingHome := true;
% Z: j% z0 }( x) d6 Y5 A end;
/ {6 ^& e' D: A: g8 a* G- G else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, F& r) f; S, q! D% v9 e part := @.transpOrder;8 T x' Y9 q" f) V* R- Q
part.move(@);-- load part
K4 O2 y- t; O, [/ u @.CurrIcon := "load";$ A l0 [% h3 G( }
GlobalDistObj := part.globDestination;
/ q" y1 L5 U6 Y$ V* y; W* o! X$ C assignLObj := rgmanager.rgAssignL;. B- s) Q! u- y0 t
row := assignLObj.getRowNo(GlobalDistObj);
+ M6 I$ M' ]1 l; g if Row = -1 then -- since 70
' t r8 r# D+ P# c% { if lan=1 then
) Q7 G& \6 \- s# r* F( o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 G3 }& e& n! E9 _+ O- L1 V& d
to_str("in der Andockstation: \"",?.~.name,"\""));& ~3 Y' F! o5 n/ k" Z
else
3 c6 o. M3 `% Z" A% X* | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, Y& E2 `. \6 q" C" e L0 o
to_str("in docking station: \"",?.~.name,"\"")); 7 U; B6 {+ R8 [5 C! D1 ?4 G
end;4 d9 S, e5 G/ f
else& Q$ w) C" @% {4 J
@.Destination := assignLObj[1,row];& X0 T& o" Y7 P$ j
end; 2 J/ D5 r$ w5 b# y; f
newDirection(@);. Q; [3 p* M7 Z* Q" Z
@.HasOrder := true;( Z' c! g8 ~2 `: P& F
end;; Q! w% @9 V5 U" b3 n
end;
4 p4 D0 \, q, s& w/ l5 fend; -- of the method
* N* m! i5 i8 Y7 G |