/* called by: entrance ctrl of the object 'track'
/ @# `4 H# M) H4 `# D) h*/
" a% @: r5 N8 ?7 i' r0 o5 ]6 W& R2 Kis( w2 {! ^* X& |/ L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 U, t% X; {1 p( `
do
& h- j! Y# @6 {, R `1 t Lan := rootfolder.Internal.Tools.AOLlanguage;
( ?, B4 _' s6 C+ v. e if current = @.Destination -- else return# h8 X6 W. @) H; k% g
then
/ @* k/ ~$ m6 v: |/ L @.Destination := void; R3 [/ P- C" L8 L- C
if @.occupied then9 O( L! |) k& D" J
part := @.cont;+ D9 s+ G" E7 f# D3 t- L9 \( a
@.transpOrder := void;9 \, ]$ t" t) r( t1 B7 h! G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' K5 r5 h4 o1 z @,root.eventcontroller.simTime); N/ s. N7 Y P
@.HasOrder := false;
% w" \# h }5 u- ^- I @.DrivingHome := true;+ x0 H* d$ j: g/ d/ P _
rgManager.tryToStartTransOrder;( Z9 H9 z8 b8 ^
if @.Destination = void
# M+ U' I; F6 N then -- no transport order for vehicle @4 J0 U: l) J5 s
@.Destination :=
3 o, N e) t E3 b rgManager.nearestFreeStation(@,track.~);! W2 x" y1 k: N0 k/ A- x
newDirection(@);
( w( z8 v8 v$ U" B! S9 r if @.Destination /= void then
( z) h. s) V- p! a @.Destination.NumReservation :=5 s3 f" a' q% E' h1 z) ], A2 `
@.Destination.NumReservation + 1;1 G% u/ u" \* B; P
end;: T& [! x/ q' v& q/ v
@.CurrIcon := "drivingHome";! l- C/ `7 B' X0 c
@.DrivingHome := true;+ v9 z0 r n4 G
end;
9 f* ^* S, P+ B" I: n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 ]4 ~* q+ `( w; ~+ P+ s part := @.transpOrder;
4 o6 Z# l. @# `2 A part.move(@);-- load part7 w6 y' q" g1 F
@.CurrIcon := "load";
( r2 N+ U. {" T/ c GlobalDistObj := part.globDestination;
) I) @/ V# F4 r2 p0 n# {8 C9 c assignLObj := rgmanager.rgAssignL;4 M* D! s8 ~& _; V$ w6 d
row := assignLObj.getRowNo(GlobalDistObj);
1 A) P. p, f0 `+ i) u3 g1 U if Row = -1 then -- since 70) Z% c5 k$ O, J1 c0 Z# f
if lan=1 then& @ t( n2 _+ z5 x9 U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 Z* V# ]. O5 g: r, a
to_str("in der Andockstation: \"",?.~.name,"\""));) }' V1 J, Z, I( L% @
else
6 R% O3 V6 }# S% U+ l) O# b7 j. E- ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ m. c* p$ [7 \0 x0 B9 i
to_str("in docking station: \"",?.~.name,"\"")); ) E% X: o, B4 l0 q
end;
- K& ?2 B( P! m `% T5 K4 E else
; y; `) p: X9 l, G) T @.Destination := assignLObj[1,row];$ ]+ z; c3 o2 Z0 v! f. C7 u
end; , V2 a& r/ G# ~5 e* Z
newDirection(@);: i; a$ Z6 l. ^+ M$ a, a9 t
@.HasOrder := true;
; R1 w9 [8 Q! K! y% b' q0 b0 \$ Y- U1 ^ end;1 L: J: ]: ]2 U+ A, G
end;
% O5 U+ E1 z. ]' x' Y' m2 `+ x4 Rend; -- of the method
5 O0 b3 s- K0 S! D |