/* called by: entrance ctrl of the object 'track'
7 S# r* k4 W$ u: h+ a/ f5 s( a*/
( I& V6 Z1 u; T' [7 `4 dis
' N6 K' B$ k9 ~4 z, ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- d! a5 H/ A, i' d9 Zdo
6 ~; j/ Y- f3 r. K4 [ Lan := rootfolder.Internal.Tools.AOLlanguage;
) p$ T7 J& i7 B2 u8 w if current = @.Destination -- else return$ R+ f. Q- n l$ {1 \" ^
then8 r6 D: S( e {% k4 Q; v
@.Destination := void;
3 U" X/ D0 x- R if @.occupied then
8 _! b; `8 B7 h* r$ f part := @.cont;3 d, j3 }# I' d" j) R
@.transpOrder := void;
* T' H0 z1 h9 B2 m& x" M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 ~5 W O% }5 ?8 g
@,root.eventcontroller.simTime);& s- d, @# e8 F/ c2 z- j: Q' o
@.HasOrder := false;
6 o. D4 v: x7 j! Y, J7 J4 [ @.DrivingHome := true;+ }( Y: T8 U4 S7 V1 {& e5 l$ t
rgManager.tryToStartTransOrder;3 E; e1 [/ ]* u: N4 n# p
if @.Destination = void
8 C5 t7 Q) e h( H3 q: b1 i then -- no transport order for vehicle @' T; e6 c0 K4 Q8 s5 G% U) ^' z
@.Destination := \) a; u, Y# j% k& L k
rgManager.nearestFreeStation(@,track.~);5 Q5 `2 f$ o, V3 x; j% o; C% r
newDirection(@);
1 V) ~( b# o, I" v: _; y5 E if @.Destination /= void then
- V4 `1 Z, z8 |$ R @.Destination.NumReservation :=
8 Y7 m$ m+ ^' r8 k4 d @.Destination.NumReservation + 1;% r: o+ k9 E: @3 ~) V
end;
- S1 e. E5 \ N- I @.CurrIcon := "drivingHome";
7 l" M) N) F" [- w6 H5 Z; a6 A; x @.DrivingHome := true;
^, P( i' w- g, c0 b end;, \7 A9 ]2 G: d0 j. C+ Z! Y0 e5 T1 n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; R d/ w* W$ a! ^6 E7 }
part := @.transpOrder;
. g: ?! w% j# X5 G- T part.move(@);-- load part, _3 T7 X" S, Y& k1 m1 n
@.CurrIcon := "load";
# }+ O* Y) d+ L; o GlobalDistObj := part.globDestination;
0 e! T+ m9 M2 L% t) r# ]) ` assignLObj := rgmanager.rgAssignL;
# |$ S7 }. E8 Z row := assignLObj.getRowNo(GlobalDistObj);) L. Y* f b+ Y- F1 l' ?
if Row = -1 then -- since 70' {% C% T. s! r& i! A& {, w$ r
if lan=1 then
" N" G) P8 i% z0 Q" P$ m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! S- i* _, I. ?+ b7 x+ a& S to_str("in der Andockstation: \"",?.~.name,"\""));
& C1 k6 @* j. n# u6 y( X else
. V) F8 i' O4 Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: S% f1 B1 P- r- v. ^4 u
to_str("in docking station: \"",?.~.name,"\""));
/ I; |- H) h) R7 e$ | end;
, J; J& }# ]& l/ t1 N else
4 X! {1 N8 [) A' q$ ^$ d, p2 f: t @.Destination := assignLObj[1,row];0 j* K* t6 Y. L7 R, ?. [" l
end;
) n' g9 D( w( { newDirection(@);
$ W* h2 q3 E: Y( r @.HasOrder := true;
( m. n: ]! ^( o$ \ end;- t m! [) o- X, q8 K: q' N
end;
0 g. @/ G* j- w8 N( Yend; -- of the method6 r7 z/ Y9 \. [; p
|