/* called by: entrance ctrl of the object 'track'
* A8 F8 I# X# ]8 g*/5 m5 ~5 f; U( B7 _ {
is
. j. f3 ?9 O* V, w! w$ _- U part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 U# ?" l7 ]& x Y8 T( o
do+ ?% l1 c. I2 d4 M# i, z
Lan := rootfolder.Internal.Tools.AOLlanguage;
& } g, m! c% I$ H! `% B& @) D' f if current = @.Destination -- else return
8 a& C+ E, l! L) _2 N. O! L1 G then' Q9 W! {( X& s
@.Destination := void;
& y; x7 f! m% D2 ^$ p v if @.occupied then5 a+ m1 _! K. ~3 U# U- V5 _- O8 q/ A9 o
part := @.cont;
. D& Z8 e$ w9 Y& c( k1 Q4 C @.transpOrder := void;
; m3 n& B6 g! N6 o; [: x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 B, V$ V8 q, ~4 v ^) F, d8 C; J @,root.eventcontroller.simTime);; k* q3 y5 f! }' E: U
@.HasOrder := false;
8 Z5 `; ^* @0 U( C @.DrivingHome := true;, f% [$ C' a8 J7 b
rgManager.tryToStartTransOrder;
& t! E0 \. J) H( q if @.Destination = void! ?" F3 C' h3 O. ?9 V
then -- no transport order for vehicle @, d) g& t. _2 ~9 \) w! D
@.Destination :=
$ @( f0 C( e+ I' j rgManager.nearestFreeStation(@,track.~);
0 Z; S; ?5 w3 Z( m/ a) P newDirection(@); , z! W# O+ W% f2 g' G
if @.Destination /= void then& O5 q v b) U1 F E, l
@.Destination.NumReservation :=
1 U2 J' S! N6 d g @.Destination.NumReservation + 1;
. p1 v) P8 x& _- K) ~7 l) h end;2 g5 }& R: z: \! q+ x: N! j
@.CurrIcon := "drivingHome";
8 ]( W8 ]7 }8 D% `: F4 Q @.DrivingHome := true; W3 c4 ]- i0 u" z+ U2 L5 h. P" \
end;
3 t; n+ k+ x# [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 `7 J5 H! }! s part := @.transpOrder;
! M9 ?/ d7 H* M% G! Y4 b part.move(@);-- load part
7 t d# U& I3 S/ s) w @.CurrIcon := "load";, |3 }/ J! ]+ O& z- ]' \) U2 H
GlobalDistObj := part.globDestination;
& R1 [+ q, H, o! e9 y assignLObj := rgmanager.rgAssignL;* Q9 N6 j9 V6 q! L' B
row := assignLObj.getRowNo(GlobalDistObj);
$ v, q2 O' Q8 r: F) b if Row = -1 then -- since 70
: j$ ]1 |! A! w+ F; l% W if lan=1 then
2 t e- Z+ \% r. f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! g1 m* n3 v# y/ {4 }+ A' K+ Q# a
to_str("in der Andockstation: \"",?.~.name,"\""));7 q5 a3 I7 K* s/ N
else
2 ]& e2 h$ B. [+ O8 I) s" G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: I9 W% |& K, n$ X& k6 H: u; N2 r, R1 J to_str("in docking station: \"",?.~.name,"\"")); + G, O: i) ^( o' U9 V w- S( [* d2 d) K
end;# s' L. _1 M: U0 H
else' \1 _1 [$ `/ h
@.Destination := assignLObj[1,row];! \) X7 a2 d- k( x: D4 y0 A
end; ( d1 |/ r) _/ c o2 W1 n& j
newDirection(@);& o |5 r! m/ Q. n: f+ _
@.HasOrder := true;4 ?8 h! Z" B. g1 s: e; a
end;
G2 B: z9 n+ t- n& c8 A; ~3 _ end;
{# u3 i! o4 U7 Kend; -- of the method9 T% p' W! Y, \. B* _
|