/* called by: entrance ctrl of the object 'track'
" h" ~' C7 \2 p% i*/
1 g' S' `- E) w8 Y: j4 O2 v N8 I3 ris
# I+ Q T- E6 M7 H5 d part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 I) G& W' l5 Y. l& L6 o
do
. X9 H1 z8 p# C& { Lan := rootfolder.Internal.Tools.AOLlanguage;
0 E" C6 _2 R; L& |% C if current = @.Destination -- else return
I/ ?5 F) Y3 {- r" Z! @" [ }) ^% |: J then" b8 R$ }( i1 Y& t. a( |1 w
@.Destination := void;
/ _& J# |* M- H; a if @.occupied then
$ i0 S+ q9 u( x8 F$ h3 {/ a1 M part := @.cont;6 r3 e1 q! x4 o' I! }9 Q3 w3 k
@.transpOrder := void;6 H3 r- o1 j3 u9 x2 _ t2 C% ]7 L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 h6 a7 S8 \0 y& o9 F3 V @,root.eventcontroller.simTime);" _1 z! s h5 _* n! E. Z# V
@.HasOrder := false;
4 \0 Z8 _4 n) R& j8 `; D @.DrivingHome := true;
- A; Z N, B$ o/ P5 t; J2 P rgManager.tryToStartTransOrder;
" u2 P$ a+ \$ V1 }6 `. a if @.Destination = void, p {# @ C _; n1 k" K% m" E: a
then -- no transport order for vehicle @
' S. p/ ~; a% A7 Q @.Destination :=
; U- F$ i+ b5 T1 R rgManager.nearestFreeStation(@,track.~);) ?9 ~& N1 z* I4 y, R/ [4 l3 G
newDirection(@);
" h* v, k" B1 @! F# I& r* | if @.Destination /= void then- h3 K) I8 h- M7 { V2 s; h! X( d
@.Destination.NumReservation :=
2 F6 x1 W1 F" W5 I/ A5 o @.Destination.NumReservation + 1;
' E" S3 F; T9 ~2 V7 z, q8 S y end;: [+ U6 m, o& W/ T5 W
@.CurrIcon := "drivingHome";
. t# s( E8 s- L! p" f @.DrivingHome := true;
4 O6 E" E1 P- K) M0 x5 J end;8 K' ?5 n- `, X" `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, P7 a2 m, Y9 n7 g8 _
part := @.transpOrder;
$ O+ L J6 x' y! j9 S part.move(@);-- load part7 s+ X% x: c1 g+ X4 r
@.CurrIcon := "load";
6 M6 Q( z0 |8 y; z9 y6 D( L GlobalDistObj := part.globDestination;
# } _; P+ J c# \3 v& s; U- I assignLObj := rgmanager.rgAssignL;
+ S- X. V/ Y1 L row := assignLObj.getRowNo(GlobalDistObj);& y) X/ A* z( l% u; Y! H7 K0 {: L3 g- {
if Row = -1 then -- since 70- f$ M9 C0 b9 V( }: ]/ w, Z: [
if lan=1 then1 ?0 m4 o* M) Z% H* ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" X5 m: _) N& O3 c1 m/ b( D2 r* J to_str("in der Andockstation: \"",?.~.name,"\""));
2 H Z( j2 W) \* U4 {3 D else
, C$ | f9 o, d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# g: A0 F( t; `& K, ~2 o
to_str("in docking station: \"",?.~.name,"\""));
! @, F |! R' x% F8 r3 ] end;! g( y$ r: s1 y% l8 F w* ^. A, \- q
else: L: e0 N) m3 i9 M7 |4 B& b
@.Destination := assignLObj[1,row];1 X1 g9 J) t% L5 \4 T$ m/ h
end; 1 c- M* b. [6 d8 H1 C7 h
newDirection(@);
0 t D- x P. I @.HasOrder := true;
! C6 k# G+ q {8 z% Z end;6 ?& K# ^& N% S1 _: K
end;1 i5 ] L6 V) M; f0 l+ G
end; -- of the method4 j2 D$ y! \4 {/ }1 _3 y! ?3 a" R
|