/* called by: entrance ctrl of the object 'track'1 p2 {8 S, Q+ b. ]. v0 @
*/; ^% V& C( s/ ]- \
is
& y$ C3 j6 }3 b5 F; {4 D' I8 I part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# X) N$ h! a& O" u3 ?) Z2 @- pdo
7 N6 C9 [% ?) f: Y4 y Lan := rootfolder.Internal.Tools.AOLlanguage;8 A2 M7 p# ^) S: y
if current = @.Destination -- else return! U+ | O4 M6 D' Y+ ?8 S/ |2 }% o1 _
then- c( b; K3 ], |2 I' E* o
@.Destination := void;) t1 e; C* e, r; H- O- T
if @.occupied then, @; m; C/ [7 s! F
part := @.cont;
1 _% L- I8 v) i9 x6 d E# e2 A @.transpOrder := void;
# [+ s! h5 I) T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 ^2 Z" J5 z* g4 x/ Z @,root.eventcontroller.simTime);
! p- X* f& `$ h) @% Q5 U @.HasOrder := false;
v1 y/ g% V% V, \9 G& ~, I% y @.DrivingHome := true;
% r% z7 \- g& o, X E rgManager.tryToStartTransOrder;
5 W! J2 G5 o. ~* o( o0 ^6 d if @.Destination = void6 d2 n( V$ C8 V! p" z7 J1 o
then -- no transport order for vehicle @. K5 K, ^, r5 r& q* d
@.Destination :=
- ?( C4 u" b# ^ rgManager.nearestFreeStation(@,track.~);/ O6 p; Z/ W o, t
newDirection(@); 0 P3 G$ f G! s% p+ | }$ b
if @.Destination /= void then, ^+ w7 C* I. ^1 x; ^" f% o" m
@.Destination.NumReservation :=
( [: t% j5 s. J. d) L @.Destination.NumReservation + 1;# }4 o. c7 q \8 U9 t
end;" b( }$ D, k+ g, a5 F4 W
@.CurrIcon := "drivingHome";3 M' u/ p" N3 P8 g6 r
@.DrivingHome := true;* F9 I1 c( h% o+ z$ ~9 t8 [
end;
# X9 F) k& P; ]4 l+ H- b! q) ?4 Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ s0 Q6 R6 ~' ^ part := @.transpOrder;
6 g. ? e, X5 q" I part.move(@);-- load part3 X g1 D& F5 _& t7 _
@.CurrIcon := "load"; f$ @' e$ i) D2 J5 l0 L6 C
GlobalDistObj := part.globDestination;6 h. v2 Z1 c4 p0 s/ N& I$ y
assignLObj := rgmanager.rgAssignL;
3 x' s/ U1 }; W; O: ` row := assignLObj.getRowNo(GlobalDistObj);
+ B. n! z. Y. [) Q) p if Row = -1 then -- since 70* I) A5 n' \1 m7 J
if lan=1 then
5 [2 D. d5 \- y) T0 d4 l promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! J' v, |; N& X
to_str("in der Andockstation: \"",?.~.name,"\""));
1 p5 ~: `; q* d1 L. _# q8 c else
9 q' p( @+ }( B1 |. b7 U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% V3 q" D9 J8 k
to_str("in docking station: \"",?.~.name,"\"")); : N+ J3 @4 p1 Y0 Y8 S0 J6 B
end;$ D! E0 Y- i# w9 V& @, f% ~
else
- B! G# W& E8 T3 @5 v @.Destination := assignLObj[1,row];# ~8 c3 h7 G5 G! E# K; X
end; + B: M- Q. o2 [' Z& S- d
newDirection(@);
+ c% V- R& R% J; ?9 z s @.HasOrder := true;
$ G6 g6 m% \4 P2 |. t, v+ Y end;+ J b7 @3 j Z9 j: [9 c+ E9 u
end;# X Q& W: C: A, k/ u
end; -- of the method6 o1 o" ?2 S4 M5 o Y3 ?
|