/* called by: entrance ctrl of the object 'track'
3 l; E8 j% M- ?0 |) _9 X+ Q @*/9 B% Y% \: i0 @
is
) ^9 U% q3 @0 X! V# I7 q# P, z0 q part, GlobalDistObj, assignLObj:object;row,Lan:integer;; s3 v3 J% P& {: z. b' {/ S
do
" u6 [5 s2 k. J) V% p6 n9 ~) ^ Lan := rootfolder.Internal.Tools.AOLlanguage;4 @2 E! Z2 w- Q# r2 U1 k9 M
if current = @.Destination -- else return
' n" Q( z4 R& h) N then
: H7 }# m3 X$ w5 A) c @.Destination := void;& j1 r" I4 H r4 Q3 P$ w2 l
if @.occupied then
" p( a2 \5 s4 U2 m" }5 E' c3 S* B6 t part := @.cont;
_+ x) G0 v8 f4 c3 s; `& y0 D @.transpOrder := void;" Y/ E A: T5 l' j* R/ t# r; ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ V3 O6 V% L$ \& X: R @,root.eventcontroller.simTime);
/ l$ Y0 S }: ?# @3 { @.HasOrder := false; i& c @& D8 w4 k7 d' G) ?1 |. _
@.DrivingHome := true;$ |% r7 K r, `
rgManager.tryToStartTransOrder;/ l% Y. ^3 y1 k. ?5 g
if @.Destination = void
* Q, e2 ]* K& H/ w then -- no transport order for vehicle @
2 c8 e& [. @# ?/ j @.Destination :=2 p5 C& n$ K l( Z5 A5 {
rgManager.nearestFreeStation(@,track.~);8 M7 Q6 o$ k% f
newDirection(@); ! ^) g5 `; N/ Y0 V
if @.Destination /= void then
) Y! S) C, }: _" V% t. P8 J: C& w# Z @.Destination.NumReservation :=
# B8 M8 t/ K8 i% j @.Destination.NumReservation + 1;
+ Y! ^& q& u0 T. P/ \ end;
" e. Q/ U5 c& Y% q# J @.CurrIcon := "drivingHome";
. U& o3 |* |2 f& S @.DrivingHome := true;
3 D* D A' k {; z+ B/ H end;
. Z; P7 l3 M7 [ q4 g3 J2 n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# W1 K! U( o$ k4 c3 O part := @.transpOrder;
7 d9 B$ b- e2 i- a4 A part.move(@);-- load part: _# l# {& M# W, d5 E
@.CurrIcon := "load";
$ W6 @) E0 I9 ?; H: y GlobalDistObj := part.globDestination;0 ^/ ^! _. N/ m4 M$ u
assignLObj := rgmanager.rgAssignL;; }4 Y' ?5 @3 F! |- C) L" i X
row := assignLObj.getRowNo(GlobalDistObj);3 S5 I2 |- M$ a3 G
if Row = -1 then -- since 70
5 O6 ~. ]* h8 R if lan=1 then& @4 h) X. f; z4 A" x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' h" Z; _1 I" f" d: u to_str("in der Andockstation: \"",?.~.name,"\""));
+ d2 ~% R) H! z+ h, ` else, s8 ^! i. O1 S" I. {, F8 y0 p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 F$ `0 F* l5 Z& s# i$ P$ o to_str("in docking station: \"",?.~.name,"\"")); * A1 c! r# Z6 N. o
end;& n9 v4 L( }* S; C5 I' T
else
2 y1 {) ^1 ?9 _4 R6 @( b# f; J/ a @.Destination := assignLObj[1,row];! v- ^+ b4 r! e6 h: A- j) q8 P8 b- s
end;
) B4 t% n7 X+ |) M4 L newDirection(@);
+ D$ q" n4 f* w9 u* B$ W @.HasOrder := true;- E7 r3 @2 i- S5 B
end;8 T7 R7 w# ^' {. D9 M
end;
7 J1 p1 ]; K( c$ Qend; -- of the method7 w A9 `, p! m
|