/* called by: entrance ctrl of the object 'track', _) `- S1 h1 K' H5 J& G5 o7 t
*/; a4 Y$ f( S) }' p& O3 @
is
1 [$ O0 c5 B/ _1 n4 Q7 f part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 L$ h+ U& I) W
do- F2 Q. V- a6 q
Lan := rootfolder.Internal.Tools.AOLlanguage;
# Z" x* W A. w; n1 r6 E if current = @.Destination -- else return" S$ |/ j+ O' E7 e
then/ {3 J0 z! X$ {) |& w
@.Destination := void;$ @. |% n( L0 K5 b; A8 G5 F
if @.occupied then
; n1 b8 ], i& o2 m9 X part := @.cont;
1 R A7 D% ~. ?& d& V @.transpOrder := void;
1 _6 H3 K; n, k9 k0 K' l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," T5 m# D4 v' x+ J4 W
@,root.eventcontroller.simTime);
7 R9 M! J3 P- d2 m, w" Q @.HasOrder := false;
7 ]% Q4 P/ p& `: \/ T7 y! i) g3 K @.DrivingHome := true;
& V. @! [ |0 @& r: g& N6 {- B# F/ q rgManager.tryToStartTransOrder;
3 Y! \# r! m* I/ S if @.Destination = void* x0 X! l5 ^" c- K; w! E! e
then -- no transport order for vehicle @: W1 w, H @# `, i3 W" E
@.Destination :=
3 D+ W- n3 q: U6 k, X rgManager.nearestFreeStation(@,track.~);
. P+ `6 m0 f1 F i2 |2 f9 \ newDirection(@); ! L) C* `9 P, ^2 q7 P, b, |+ @
if @.Destination /= void then
9 _ E* N1 A3 |1 H) G+ n+ j) \/ t @.Destination.NumReservation :=$ _ m9 t9 q% K1 j, u
@.Destination.NumReservation + 1;8 T/ k9 M. r- f$ K
end;
4 |' n- d6 r, ~1 n5 k3 l! X @.CurrIcon := "drivingHome";
7 A' q& w: m/ X% Y; L; d& n$ T8 q- t: M @.DrivingHome := true;
4 a3 H, S% J/ A( t; }+ N4 T end;
3 U% |% l) I& Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 O( j& d; R* o3 ^1 b# y. F part := @.transpOrder;# \4 j# P: f1 N
part.move(@);-- load part7 K, \! t1 g" C$ K7 g
@.CurrIcon := "load";
, H5 U5 i- F! K' u: R/ |2 N8 N GlobalDistObj := part.globDestination;
! w. Q- m9 }1 e- }) R) V' w assignLObj := rgmanager.rgAssignL;& b! v+ p% q9 p l0 o' j
row := assignLObj.getRowNo(GlobalDistObj);% j) P q+ `4 Y+ S/ H3 g
if Row = -1 then -- since 705 w! ?: u' I) N' V
if lan=1 then
. p3 P U4 n$ D4 Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, M5 u+ U0 {0 h6 K* m3 y1 b
to_str("in der Andockstation: \"",?.~.name,"\""));
4 [! Z- i* P; ?; O v- Y else0 l: I$ ]( X3 j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) K, u4 o' \8 G1 `& b) S5 s to_str("in docking station: \"",?.~.name,"\""));
& {5 _& j: S- K+ I6 D end;5 u! H/ ?( A6 Z
else
1 Y: K3 F K3 u6 @3 ]$ | @.Destination := assignLObj[1,row];
) b) O' e) k# p K5 F ] end; 5 s1 w; S% u Q) k7 Z9 K( G, Y
newDirection(@);6 K# r A- L$ O
@.HasOrder := true;' [$ h5 T2 o0 S
end;
% k# ~1 e" A. b* m end;
3 M- G8 ]8 \, h* |5 ?' w3 G, oend; -- of the method Z& K7 ^; K _6 s4 T
|