/* called by: entrance ctrl of the object 'track'
" z0 y$ \, ?. _9 x; J0 P3 q*/
5 ^" ]% o% C+ j g2 ]- [is7 y7 Q( O' v* ^. Y6 Q& i& _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; V+ _% k4 {! `! I+ Rdo
, r0 m" d0 |2 u" w% V Lan := rootfolder.Internal.Tools.AOLlanguage;
% W& M/ h1 Q) I; G! k if current = @.Destination -- else return
" r* h ^7 V' @9 X4 ] t, v3 s then
9 y7 b0 V' X0 ? @.Destination := void;5 L( X1 G: t3 K
if @.occupied then! S. r/ f& i" C0 I# v; X% y
part := @.cont;
; k. d M4 V, M @.transpOrder := void;# z5 @. E8 @% `7 e% }9 g; P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 E3 a& s" A; a# u3 e! Y
@,root.eventcontroller.simTime);. [% c [6 @! b' u z, K
@.HasOrder := false;' v. I- H. k% n* N3 _: t
@.DrivingHome := true;
$ e7 `7 B/ {: g' u- v; o rgManager.tryToStartTransOrder;
+ l, B" T1 Z" [ if @.Destination = void
9 d( ~$ n, }4 E9 V2 @ then -- no transport order for vehicle @
9 {( u6 @8 G1 ` @.Destination :=
1 B5 }" Y m- J t5 o rgManager.nearestFreeStation(@,track.~);
1 h: e I) \9 `! Q! X" b newDirection(@); / r `) }8 K# p
if @.Destination /= void then
; ?# d/ \; g: `7 ~. q- I3 p @.Destination.NumReservation :=
" M5 l4 T( V I @.Destination.NumReservation + 1;0 q: S2 F# [9 ~' ]4 f, @! ^8 ~
end;
$ S9 m! D5 _- O$ b- s+ ~$ j( s @.CurrIcon := "drivingHome";
7 |. `, u) L9 K% Z" X! W: s @.DrivingHome := true;
# H: _2 q, L! q& ? end;
. @) ^- x* t( i4 m3 Y& v else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 K# x6 `. }: c+ i% {
part := @.transpOrder;6 } i8 ?0 { ~' Z% M
part.move(@);-- load part4 {+ q) `1 r1 N9 t& o
@.CurrIcon := "load";0 k; h3 h/ }. [, _2 M5 C
GlobalDistObj := part.globDestination;
, U+ M K j" h9 n+ g" m3 P assignLObj := rgmanager.rgAssignL;
& ^9 ]$ N* k- r+ t+ d! r0 j# N3 Y row := assignLObj.getRowNo(GlobalDistObj);
# m' w3 {' ]7 t( A U+ W if Row = -1 then -- since 70# F& R1 c7 \3 j/ s& D" ]- `
if lan=1 then
) d- \- r" a& P2 o3 z9 n9 g1 L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 w8 S7 r" Q6 _, Z/ A
to_str("in der Andockstation: \"",?.~.name,"\""));
& A3 d+ p& t* z8 B8 P3 S1 G) } else
. L1 W! J6 D6 k! I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 u: X: p: n( q; E
to_str("in docking station: \"",?.~.name,"\""));
/ o" ~ a2 e' V8 p! q+ G `0 Q: | end;$ c* z: \8 e S! k0 z
else- g8 l K0 K( y" q+ N. q
@.Destination := assignLObj[1,row];& a0 R; c$ V8 I! {/ o5 {- k
end;
; V4 j" L: j9 B% S/ I/ u7 [ newDirection(@);
# y- I- d- L( x @.HasOrder := true;! ?2 a/ n$ v2 k1 ^7 M% N
end;
$ }5 d8 X1 f# o; G6 I end;
/ F3 A8 m# U. v6 e0 ?end; -- of the method; ~: T p8 }" |6 h( V7 p6 g2 _ ~' F
|