/* called by: entrance ctrl of the object 'track'; a5 k0 u3 I% z- t/ B" w
*/
1 N# \/ d( K) V/ t, P: ris7 A) f9 b @; Q" C. Y1 i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* W3 t5 @' Q- G ?/ T5 ddo
$ T' H J) X$ x R7 X! w Lan := rootfolder.Internal.Tools.AOLlanguage;
3 t7 i+ L& @0 u9 F4 [* V* I" J v if current = @.Destination -- else return1 { K6 L, l4 |$ C t
then& |: j# m% V9 J& j5 s1 R7 {0 H
@.Destination := void;
& T6 O, b: w& F. ^1 o if @.occupied then" Y. w) G2 l. B% a
part := @.cont;
: F' E+ m4 f. P3 c) [: g @.transpOrder := void;, A0 D4 R4 Y% Z+ ~" ]. P& b" M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 n1 y. N, t: @, `! @/ [
@,root.eventcontroller.simTime);
- b8 H5 U2 L' i3 Y: `; U2 U @.HasOrder := false;4 U2 O- `7 T4 B V0 c' t/ J' t- c
@.DrivingHome := true;: K& w$ _+ U$ V- Q. r
rgManager.tryToStartTransOrder;' B( x8 P! q4 `
if @.Destination = void
! X- G H3 f0 |' e1 u$ Q; o& u then -- no transport order for vehicle @
u/ S8 a& e I2 B' @0 z( b @.Destination :=
2 U& e" D* V1 K1 f rgManager.nearestFreeStation(@,track.~);9 K# a6 W, k' R$ P e! `; F6 a3 ]
newDirection(@); _1 V, h4 M4 G- \. y1 g- f1 V
if @.Destination /= void then
- u6 d; I) T* I* R @.Destination.NumReservation :=' [# V- w ?. g1 ` W5 ^& x
@.Destination.NumReservation + 1;6 }3 I/ m) P/ f* ~6 |" f
end;$ s, n. m0 H$ L2 e% G. Z5 ?1 t8 \
@.CurrIcon := "drivingHome";
4 R; A" J/ } p8 X @.DrivingHome := true;
& ~7 _0 d2 r) r9 K end;% Y% j4 k; D3 k# A. Z! [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# }) n! K5 W/ S2 {. T8 w part := @.transpOrder;. k% Q5 y% E+ m9 t3 o; f3 h/ n) g
part.move(@);-- load part. F# F( g8 v3 g( Y) @
@.CurrIcon := "load";
* `) S4 o8 V9 k& T& p" O1 l GlobalDistObj := part.globDestination;6 l: v9 X+ k6 p
assignLObj := rgmanager.rgAssignL;
3 F- o( s9 ]' ~6 V0 ]! @: d: i* p row := assignLObj.getRowNo(GlobalDistObj);1 x$ d! c! I. j6 P9 k& m" a& f7 Y
if Row = -1 then -- since 708 w0 O4 @1 u, z
if lan=1 then
& g8 a% x/ v a' ]8 E+ a# @9 c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 D7 n$ c3 {" `+ r3 ^+ q to_str("in der Andockstation: \"",?.~.name,"\""));
0 c) i4 R7 T9 e& E4 ~6 z else
: o) H3 z: i& s6 p- } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- z! s; @3 B$ f8 `6 f
to_str("in docking station: \"",?.~.name,"\"")); 0 U2 U' G+ t$ m; G2 T* c
end;
0 u# g4 f/ s; _6 C8 U9 h else
' a- O, |0 \: }% i, |3 @7 V0 d @.Destination := assignLObj[1,row];4 c! L: _% w( h! z* G3 {+ \/ K
end; ) _# L$ W7 r2 V- j7 d
newDirection(@);
- H. B" G2 L& `0 s @.HasOrder := true;" o9 e v" b3 ^( J9 E
end;
6 \2 \1 Z {3 G- ^0 i: i3 W" \( A end;
# Y6 n* i: e! y$ ^+ B- }end; -- of the method
: e! d& O# m, `1 X4 G+ w8 i' K |