/* called by: entrance ctrl of the object 'track'
# L$ M* c. [9 n! f# R* v*/) \9 W+ P( I2 L4 q9 \) s# Y+ W& S
is
; t1 k5 I2 F3 Z6 r+ g- J# O- Q- R part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) Z1 e! k2 d3 P. b bdo
- W9 g8 ^# }4 x1 D) f Lan := rootfolder.Internal.Tools.AOLlanguage;
+ r7 b7 L @3 F4 O if current = @.Destination -- else return
4 S7 {+ C9 G2 ~5 ? then. y7 _- ~: g' P
@.Destination := void;
* l, M7 k: m2 \ if @.occupied then7 l* V- \9 o O* c: K" y2 O! ?
part := @.cont;5 |3 ~0 W6 v4 Y7 ?, Y j
@.transpOrder := void;. U' Q* G: m; `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 t. q. l: _7 h5 f
@,root.eventcontroller.simTime);
8 A, I) s- a8 a @.HasOrder := false;
+ b! M- n" ?2 m& I& o- @ @.DrivingHome := true;$ F3 }/ q7 h; K: r- w6 j/ x
rgManager.tryToStartTransOrder;% Z% Y' b$ t" i9 P) x+ ]0 a l
if @.Destination = void9 _- t% w' Q8 b; O9 {
then -- no transport order for vehicle @
- b* J2 C( {, F4 D* n, E+ l) S" e @.Destination :=' X$ O( s) B# S
rgManager.nearestFreeStation(@,track.~);
% z- [+ [5 v& v1 w/ g& p' d newDirection(@);
9 T4 ~) O* N( }% u/ a- U if @.Destination /= void then
; p8 b. s" y6 j7 D2 P @.Destination.NumReservation :=
- N1 X, y% Y7 p! ?1 N9 _ @.Destination.NumReservation + 1;
# Q/ ? R3 K* W" B end;
" `8 k9 s* O& Y+ P1 _' X @.CurrIcon := "drivingHome"; I) B. a# z; w& S6 T& x: p
@.DrivingHome := true;
2 n7 O1 `5 j) ]1 x4 W end;, |9 e) P; F& D3 [5 b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( s+ C/ K: h, }# ^& w S
part := @.transpOrder;
8 Y0 h- n0 `* |3 b part.move(@);-- load part
! ?% x* g8 b0 I0 Z; G @.CurrIcon := "load";
% e$ R( |+ h/ P$ ~( E: h+ r GlobalDistObj := part.globDestination;
" w8 M `7 w5 ]- N" j assignLObj := rgmanager.rgAssignL;3 l+ |$ k5 C: Z# y$ m% G( `0 Q
row := assignLObj.getRowNo(GlobalDistObj);
6 r8 n t T: a6 l* G# Q: X7 g8 g if Row = -1 then -- since 70: ~$ W2 W7 ]; T/ C1 ]0 |
if lan=1 then
! q4 P6 s+ \: c$ i4 v1 M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* u* j" P; }$ @; b, Q6 ? to_str("in der Andockstation: \"",?.~.name,"\""));
% \0 }% j, P: K8 j2 j else# j# O7 R- t. T! z5 J( ~$ P+ ~7 ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 d: V+ L4 c5 U! V' c+ T3 q# F to_str("in docking station: \"",?.~.name,"\"")); . b4 C/ f. c) y1 N$ Z
end;3 B6 d) w! s$ a. ~% H' p( E/ h
else
% A0 ^" u3 Y5 x5 M! y! a1 M5 I5 o0 e* t @.Destination := assignLObj[1,row];8 \' R2 J, X e" s
end;
- k/ D7 U& ?- u# H; F! b newDirection(@);
5 Z- H; m2 b4 w% @8 W; J @.HasOrder := true;) [2 w2 I J8 ], T0 O
end;
0 G6 }+ O8 ]/ |+ i" q1 ^3 e end;# {, N; j) y0 c5 o$ L+ g6 [4 _
end; -- of the method& [3 z$ _; Y4 K
|