/* called by: entrance ctrl of the object 'track'+ j0 w2 q! s3 o
*/7 E! }* _8 j# t: F
is/ [. h( E; G( ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" M p9 X, D" P
do
. j! }4 c0 N$ w, j* h: r4 h6 p3 r Lan := rootfolder.Internal.Tools.AOLlanguage;. U$ ?; Y) h2 K0 g
if current = @.Destination -- else return1 o' @" i( C& | ~ t
then) L X1 ] m' Q o9 C6 I8 x. b
@.Destination := void;5 i- i1 M; }& Z3 G2 T* n( G
if @.occupied then
6 T! }6 L% P, c, _ part := @.cont;
- V. O) _9 i" B5 K7 ?. _: V, l3 f @.transpOrder := void;, J0 i7 m' x) m9 G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; ^5 T5 ^: n$ f: [- D0 m8 s- Y
@,root.eventcontroller.simTime);" h) L0 ]$ T) n# I
@.HasOrder := false;
& v) v% y, E% a3 ~& f% K- ~ @.DrivingHome := true;
$ n+ X' V6 p! I y- { rgManager.tryToStartTransOrder;; @; X5 D* ?$ {& s" ~6 `7 y
if @.Destination = void
, f1 I" C2 Z9 a g) D& I a then -- no transport order for vehicle @* M B/ p0 W& }. b! E
@.Destination :=8 P% Z1 b7 q9 G# W; Q
rgManager.nearestFreeStation(@,track.~);$ u" D3 X; H" [+ A( w1 i* Z' j
newDirection(@); + W9 b* ^$ i9 n5 q
if @.Destination /= void then
( y- {2 ?& ]9 I( h" M @.Destination.NumReservation :=
u( v" W T6 w) s6 Z( X @.Destination.NumReservation + 1;
4 y+ f8 N# s5 F! Q8 ^) Z end;
% A9 Z( o" A; n# x: l @.CurrIcon := "drivingHome";+ N0 _% f' Z ], |. ~, U$ U
@.DrivingHome := true;' V' X' d" t9 J& D! Q: [ {& }
end;
) A- U+ j- G- w' k3 D else -- the vehicle @ is empty, both vehicle and part are in the same dock station& p1 ?9 Z3 l1 s, n" K
part := @.transpOrder;
/ W; b7 A {3 N, e" g& Y part.move(@);-- load part8 z/ A7 }( K, q( y/ l. X2 e
@.CurrIcon := "load";
$ O* {3 X" _& Y$ E: A GlobalDistObj := part.globDestination;( w) \& J. A- Q9 q) W5 d& r
assignLObj := rgmanager.rgAssignL;
* Y$ \. g1 B4 _" N! w$ q7 J: X1 ~7 C row := assignLObj.getRowNo(GlobalDistObj);0 j' o) t8 P! f# g7 H9 q4 w
if Row = -1 then -- since 70
. m5 p1 N j: A! [ if lan=1 then
+ d& Y, x) O* `9 Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- [& q+ V4 P i9 q) f2 c* X: I to_str("in der Andockstation: \"",?.~.name,"\""));
7 @- K4 O% Y: Z else6 H! A9 \/ Z1 X: b( }. R& ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: h- H) q/ q# u: r( Z5 U; M
to_str("in docking station: \"",?.~.name,"\"")); / \" @( ?# }8 r' k) v4 `# b9 i8 \
end; D1 F! ~1 u4 a8 U
else
/ U% [0 G: [; N9 V6 t @.Destination := assignLObj[1,row];
/ b* X- W0 E7 y8 m5 p end;
6 |! Z6 x6 u; @) @0 R, _0 @( p newDirection(@);
' I$ S, t9 D3 [( i6 d# w @.HasOrder := true;
% Y! `# \# Y- s! h* j: K# F2 X8 k4 o& ] end;
: C) L8 I$ a n0 J! Q$ ~, @ end;
2 z9 l, b/ V- ^0 \! j/ Cend; -- of the method
' U% E0 m! n# w: D |