/* called by: entrance ctrl of the object 'track', r. U" a B' n! _
*/
* y8 ^+ Z/ X3 d. Z( Y6 ais7 w/ Q- c @* m7 E; c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% c6 I3 y6 u. t1 A n* Zdo
; ^8 p% x& c6 o Lan := rootfolder.Internal.Tools.AOLlanguage;
l0 C6 N$ {* Z+ g5 Y- Q" z if current = @.Destination -- else return+ b2 c5 g+ v; R9 W
then
) C& a6 b: w, r3 t0 O @.Destination := void;
# g2 a @6 `! D: Y- \ if @.occupied then
+ d3 H- u& ]- I+ P$ w part := @.cont;
6 t: u+ F. _4 |& S @.transpOrder := void;$ K2 ]/ i& o% h4 i( R" T9 F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," y3 Y, x5 `% C
@,root.eventcontroller.simTime);( W. S4 U' k/ N% \! e
@.HasOrder := false;
8 z" \9 J5 e% Z% m" V( _( q% L @.DrivingHome := true;) z( s0 B7 w# i; [7 e' T
rgManager.tryToStartTransOrder;
; |' j: Z' C3 e. o2 K+ |- R if @.Destination = void$ N! I& h8 h: K
then -- no transport order for vehicle @7 y P e" X' }3 p
@.Destination := `; e- ^& H. h$ B5 N
rgManager.nearestFreeStation(@,track.~);
# A9 _8 c% M% Q8 z5 ^2 ~ newDirection(@); 0 D4 Y# G) Y( R9 h8 l
if @.Destination /= void then& f4 e* X, L; _. O& O& {5 k
@.Destination.NumReservation := @5 \" e9 u2 M; O
@.Destination.NumReservation + 1;2 v0 Z% c3 f5 v5 C. q" I
end;4 p5 P8 ?, V1 _2 ^8 K
@.CurrIcon := "drivingHome";
2 ]% p5 E9 |5 x1 x0 u6 a% M7 f9 z @.DrivingHome := true;
" c- H3 G* ^& E; R/ g end;
6 f' E3 @" g; p {& v else -- the vehicle @ is empty, both vehicle and part are in the same dock station; i% n9 t1 G! k* u6 m7 E8 X$ o
part := @.transpOrder;
L5 G/ ]( c) {, U0 L& B9 L part.move(@);-- load part y1 y1 g' }2 n. B
@.CurrIcon := "load";
+ o6 a$ h# z3 v6 K j# M% h GlobalDistObj := part.globDestination;
/ W' y7 |' X3 c$ X7 `3 ^9 s/ W0 N* u assignLObj := rgmanager.rgAssignL;
& h; ]8 @$ d) ] H# J* c. Q8 f row := assignLObj.getRowNo(GlobalDistObj);6 J) B$ x- R' @" R4 g
if Row = -1 then -- since 70, ^! @+ Y5 R Y" U4 `* F
if lan=1 then/ `; l/ [- G. L f3 h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 t& X1 y [6 H' C* P
to_str("in der Andockstation: \"",?.~.name,"\""));
3 ^% u+ h8 y7 K" D, S% D1 _1 j else
2 [: ?: w% z: l) h2 t: \( k6 l6 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 I z7 S' m' c2 T
to_str("in docking station: \"",?.~.name,"\""));
4 T$ Y* E y2 C V) p2 q end;/ ], Z u# q1 W+ ?
else7 o4 T5 P1 k ?! \7 I
@.Destination := assignLObj[1,row];
: _$ q8 t& \, u end;
, X+ t* O$ [+ g# A- v# W newDirection(@);
+ G* W- g6 o) i2 r0 \. E2 K @.HasOrder := true;
, m: d# k, Z) X; _ h; r Q8 G end;
. N0 H3 q4 c4 P end;
u7 `( s% }+ W6 p3 @+ Cend; -- of the method! ?3 ~# }3 ^& g5 I; }" I0 @7 ~7 y1 o
|