/* called by: entrance ctrl of the object 'track'
9 D( p! d% H1 z( `: m! b+ S" y*/ \) E# {5 [6 H3 C t# O
is" _. N2 I7 s: T, P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' ~& m! f: E. N- w; m' `1 l6 @, A
do" k y* k2 p3 c: m/ T* i2 p& n
Lan := rootfolder.Internal.Tools.AOLlanguage;+ ?1 G9 e/ e6 t, k# ^4 ^
if current = @.Destination -- else return
5 |( n$ W4 {. i' `; L/ O then" X1 V) T1 y/ b1 K* V" e
@.Destination := void;
$ R1 {% k" f+ F8 v0 ]7 O if @.occupied then# s0 t) O8 @( g" G1 ]
part := @.cont;, z- o, U4 A! F
@.transpOrder := void;0 M. Q4 [( C g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ q. h% w$ t6 Z ^$ I. B7 k @,root.eventcontroller.simTime);& a( O2 n2 u6 T- j
@.HasOrder := false;
/ ~& E7 r# D. j4 c @.DrivingHome := true;
6 Z" F# h9 Z$ O rgManager.tryToStartTransOrder;3 T) P+ y3 K5 c1 H/ o) n5 q
if @.Destination = void. E$ _% B2 b, \( A/ w, N9 \
then -- no transport order for vehicle @: l( M* S- i6 ]9 u7 @$ H0 W! Y
@.Destination :=
4 r- O Z W5 P5 `3 y2 w. E0 Y rgManager.nearestFreeStation(@,track.~);
' C4 z6 l0 x* X U. V8 Y newDirection(@);
# b' s% o) W1 h3 P1 y" t if @.Destination /= void then1 @5 p9 L+ L" C( P9 C. e3 g& W
@.Destination.NumReservation :=
& D& X2 {# \, }% z3 } @.Destination.NumReservation + 1;
% g% I- J& e- P% I: x end;
G) t* d+ m% `; O- v# `: w @.CurrIcon := "drivingHome";
: [8 l9 g; [& R5 k+ Y+ P9 h @.DrivingHome := true;
4 s8 a* h! C, T; x end;
2 H% |7 y y1 P' I+ r! B B: Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station# J) M# O1 ~! Y* m9 ^& c0 R
part := @.transpOrder;
2 {- D( c% i8 O- x9 @$ d+ @ part.move(@);-- load part
% ^, H0 g' D6 v' E9 s/ @! P @.CurrIcon := "load";- K- Z. j2 u" A5 _% w3 v3 \* O% S5 L
GlobalDistObj := part.globDestination;( `. x8 X t0 G* P" U
assignLObj := rgmanager.rgAssignL;0 s7 W6 M p2 J! ^! S' n
row := assignLObj.getRowNo(GlobalDistObj);0 I$ z9 c3 F5 v6 t- V% f4 W) g) d1 R
if Row = -1 then -- since 704 [* k0 e* b9 K% t( @
if lan=1 then
" M' D7 T, f1 n$ X J% N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 l3 d. \$ x a8 G% s* ?
to_str("in der Andockstation: \"",?.~.name,"\""));9 T, ^1 R" Y+ V @6 o3 e
else
$ q1 H* \2 w% g3 B) i/ z$ d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ V1 T+ h8 [1 D5 p4 d4 N2 E2 V$ e
to_str("in docking station: \"",?.~.name,"\""));
/ Z. G) u0 c9 O& I" T$ a end; A' k/ d" I9 p, [- H% y: n
else% x9 G8 M8 w) e4 d* s
@.Destination := assignLObj[1,row];
$ v# [6 _0 q; `3 j5 t end;
7 l6 {4 `! S/ X newDirection(@);% I# D* L; Z) b2 F8 y
@.HasOrder := true;( A9 C( c: j8 @, M* P2 B; J8 N
end;) ^) _* K1 g8 |& \8 c0 [* X5 S8 r
end;
0 }7 [$ C- C$ t! V% Qend; -- of the method
/ f- \! L S8 ]* o# s |