/* called by: entrance ctrl of the object 'track'3 T$ ?# x: n0 f% h7 F
*/
5 T( Q u) q! q( `# P- qis6 M7 ], w3 M! ^) a. w2 s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 z2 d. C( s. M. g9 Q6 U% b
do3 l6 ~+ t c4 ?. I; K7 d8 B
Lan := rootfolder.Internal.Tools.AOLlanguage; O+ G2 A& b1 B* n# \
if current = @.Destination -- else return
6 M$ v0 F% t4 w: E9 H; D then
3 d$ N1 _% I/ E, l4 R @.Destination := void;
3 ~! W2 c0 ^/ w/ ` Y if @.occupied then
% F* A% d( `. b7 p; L& i# e4 ^ part := @.cont;
9 s- o$ C/ S8 B0 h% b7 w; m$ Q9 L @.transpOrder := void;
+ r7 i$ S4 C0 e. U% D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 Q- {! H0 ] l7 G) @$ y
@,root.eventcontroller.simTime);. ~- f X3 c @/ R0 S
@.HasOrder := false;
! N2 x" x) ^% _ ]" R* X* \ @.DrivingHome := true;
$ m# T$ {6 Z' Q rgManager.tryToStartTransOrder;
; g% l( q& }2 i5 g( A+ _' a if @.Destination = void, F8 i# \% f3 t7 m: S
then -- no transport order for vehicle @* j; A' p4 X( S! C: h- U
@.Destination := h- y- t' M: ?/ n( |' m0 {8 X: M
rgManager.nearestFreeStation(@,track.~);
0 h* V" t1 X6 h; b newDirection(@); ( ` t9 o! d! g) J
if @.Destination /= void then
% V! K. }9 ]/ f1 j7 f4 X @.Destination.NumReservation :=4 {" E2 Z' D8 ` \ p7 M
@.Destination.NumReservation + 1;
; l$ i; D0 X* g1 a! j+ ~ end;/ F. ^3 R7 i% s" z, ?
@.CurrIcon := "drivingHome";
J2 R+ Q) N Q @.DrivingHome := true;
% F0 |0 ?( E0 w9 Y+ D6 G end;# Q; g5 j& g+ V. z! G: E1 P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) u# ]+ c6 C! m3 v$ N' H9 e$ E
part := @.transpOrder;
/ h+ ?- L8 x# k+ P- m part.move(@);-- load part" _; o/ ~- N% l3 M5 ^2 K
@.CurrIcon := "load";
# R1 Y, l% _: k1 i5 E3 Z" P8 ] GlobalDistObj := part.globDestination;
2 X* o$ a# ]* i N. B: T assignLObj := rgmanager.rgAssignL;
2 o& V* Z: d* Q( T+ Y/ T( E/ q row := assignLObj.getRowNo(GlobalDistObj);
' Z. P* w* b# \$ Y9 M0 Z if Row = -1 then -- since 70 V: @+ I7 O/ |/ |- l
if lan=1 then
% l! z. o$ ~* ]% w! `. A* d1 d. e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- ]+ L6 ^. m6 F& [% |: L$ H
to_str("in der Andockstation: \"",?.~.name,"\""));: }4 @+ ]! Q5 H8 m3 Q! p- R
else
' j% n( Z* M8 v3 `9 x: c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 f; z7 d0 M; _- a: @' [
to_str("in docking station: \"",?.~.name,"\"")); _3 W @& d; G) p. e
end;
$ c# P$ C" t- r/ V; V7 i else
, d: E g1 ?5 ]) \# T% b% x" V @.Destination := assignLObj[1,row];( {+ Q3 t9 x; C, _6 f ?
end;
5 X% B7 t4 |9 d2 [ newDirection(@);3 e5 Z1 E6 G, I9 x7 b
@.HasOrder := true;
, g# ?; {) D$ P8 I/ c% x$ u end;
& {1 b9 U. b8 | end;
/ I% g( v2 U2 l/ rend; -- of the method# s: v6 ~& S0 p$ F
|