/* called by: entrance ctrl of the object 'track', P7 r6 Y ?( Y( T3 @& _* D$ y
*/
! q9 o% D! N& ]$ ?4 L+ \6 |) [7 ~) jis
f; q7 I2 p! g: @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# k# R9 Y& b4 T9 a; K- Ldo* Q! j6 C# q2 B5 a% W; u' N
Lan := rootfolder.Internal.Tools.AOLlanguage;0 A& v" b, D& r" t
if current = @.Destination -- else return$ W8 [# T8 H; P' m3 k/ y- d1 u0 g9 X
then
# M8 e/ w3 h" Q9 p; @ @.Destination := void;
* \( M* n( y; Q8 L3 y5 f' ? v' I if @.occupied then
# L+ ^$ i& p# [1 x6 G- g part := @.cont;- N5 U" h0 @" m5 P5 T7 h
@.transpOrder := void;
+ {6 n9 t" z$ b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 B4 j. M) T$ K& c+ X; j' ` @,root.eventcontroller.simTime);2 S% e$ B+ [8 p
@.HasOrder := false;
9 P. I! ^$ N+ P+ H @.DrivingHome := true;
3 P" C! k ]* W, q! i. q rgManager.tryToStartTransOrder;2 l1 h! ?( j" L5 \9 l! o1 w
if @.Destination = void4 U' E( \3 {& \; H
then -- no transport order for vehicle @( O5 F) r. [9 e* b
@.Destination :=" x; ?$ o/ q, v" l
rgManager.nearestFreeStation(@,track.~);
( ?, Y _; j6 \! z: C newDirection(@); " n$ `* B4 Q: C6 S8 B0 h3 L/ T. X, k
if @.Destination /= void then
- v+ M7 w& `* B/ F3 T2 r) r @.Destination.NumReservation :=
! W4 K" d! T& \/ T. p# a& Z @.Destination.NumReservation + 1;$ L7 G! H) j$ D2 I
end;
. l& q5 J1 N4 L @.CurrIcon := "drivingHome";& e5 {. R6 Q' k2 H" Q0 p* u
@.DrivingHome := true;" a; R$ F% h: {' T- W
end;
" j7 n+ J" |$ ?) L4 C3 a1 G2 ?2 a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 r5 a: ^" v. }0 P7 N; N part := @.transpOrder;
x# D0 F6 q# }: _) N# u part.move(@);-- load part
& o' m( H5 K6 L! y2 `; Y* k1 z @.CurrIcon := "load";- Q# P* j( x; [" [
GlobalDistObj := part.globDestination;
$ N) C: w1 Q6 w! Z assignLObj := rgmanager.rgAssignL;
# z9 K1 S% ?4 [- k: B4 O row := assignLObj.getRowNo(GlobalDistObj); ?; p$ V4 k, _; K' _' ?
if Row = -1 then -- since 70/ s5 r6 H) Z7 O, L5 p
if lan=1 then
+ q2 h' v! I6 u& V/ s7 @2 h: [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; v7 l) r- c* ~7 {% J5 P& B+ ]% M# R# s
to_str("in der Andockstation: \"",?.~.name,"\""));( E5 u! @. [0 I7 q& S. @! i* K M1 d
else7 K: L+ @2 i. Y( ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. T9 D# [) e1 X6 B9 T3 b s
to_str("in docking station: \"",?.~.name,"\"")); 7 k( ]4 b: i# ~2 m' g! M
end;$ m. x$ `* @; I/ _
else# r4 j7 d0 B9 K! H
@.Destination := assignLObj[1,row];
# i0 j. ]4 \8 _ end; $ ~1 e- G$ S# H" }1 ?4 H
newDirection(@);; a' ^; B" B4 J$ w5 Q K
@.HasOrder := true;% A8 r) G, i% L0 E
end;
( I: Q |6 Q! n8 f7 F end;
1 M g( p( ~9 ~" C$ l6 R; s) I. Jend; -- of the method
* J1 U5 W) h4 C: C |