/* called by: entrance ctrl of the object 'track'
% o9 P, V' F( \, ^9 C: T*/
/ z0 F8 z: }1 @: U' d. V( yis
) y a& u) `+ K1 A part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ I g) }# M# o' D# o
do
% s; t. k A' |8 a7 l0 s! X. V Lan := rootfolder.Internal.Tools.AOLlanguage;) A% e6 d1 D3 V* w
if current = @.Destination -- else return
2 b( _5 g6 E- ^! K, c5 t ^0 [3 Q then! }! ?3 N4 _: x5 w2 f3 L4 C: w
@.Destination := void;
, _2 S T( p4 @; s w if @.occupied then
6 W) r9 N% R, l7 w2 ^3 m part := @.cont;+ m( T: w$ S. `: J3 a
@.transpOrder := void;
* X7 N' N/ S9 ]$ n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
b. v4 A0 T. z% H: j* e @,root.eventcontroller.simTime);
! L, a) Q" c/ l! ]3 |5 C @.HasOrder := false;& ]6 I5 w$ S6 |/ O/ f
@.DrivingHome := true;
8 o! |9 h: g6 l' V9 w1 b, R0 w/ B rgManager.tryToStartTransOrder;: v& {6 ]2 m' o' _; f
if @.Destination = void
- w8 N! R+ c2 a: w4 ^( Z then -- no transport order for vehicle @
. Z9 `2 ^9 D* N- b @.Destination :=
0 Q+ U F- R3 h1 I* r2 V rgManager.nearestFreeStation(@,track.~);
) G- F, Y; E8 e0 u newDirection(@);
2 M; I1 M- T, ]/ F8 q0 g7 _# l if @.Destination /= void then
+ f* h0 K: L( z7 t- m# Z @.Destination.NumReservation :=
3 T0 j* h5 _2 m& @8 i! P @.Destination.NumReservation + 1;6 e6 S5 i) w9 m- D
end;% m# ?: E3 E, B; v+ C1 b
@.CurrIcon := "drivingHome";3 N U$ h% x! Y& V
@.DrivingHome := true;
3 W; o( q3 }- _1 E3 F0 {" {7 U end;7 Y$ W' t' i! B# P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 H2 B0 N- [3 x7 k! H4 ~
part := @.transpOrder;
G& \; k0 L( \ part.move(@);-- load part
- B! s0 w" V* K5 ]/ z @.CurrIcon := "load";
; y' J: a% _; H t8 `- C$ T* b GlobalDistObj := part.globDestination;, `" }8 W+ S8 b* O% |; c, B1 F
assignLObj := rgmanager.rgAssignL;
. ^- g3 S& g9 ~+ V3 G row := assignLObj.getRowNo(GlobalDistObj);% @! m2 e7 l- e7 E
if Row = -1 then -- since 70! r' K5 D$ }' Y# Z* [
if lan=1 then
8 k+ C: \; w: \+ W; r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& I# R- k. f& S1 k to_str("in der Andockstation: \"",?.~.name,"\""));
# O" N2 U( N2 ~* Q1 D, U0 ~. O0 j! e else
6 h1 o4 s' M" a+ G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, d# t+ ~. \6 u# K9 N to_str("in docking station: \"",?.~.name,"\"")); ; l$ a1 t2 [5 l% C
end;
0 R3 H4 P, t* ? else# }4 C% i& `) s% B
@.Destination := assignLObj[1,row];
' I0 I( W- `) R3 n# U/ |0 b/ L end; & a+ a9 A% T1 M9 @# V
newDirection(@);0 L8 L' K6 w3 S/ D
@.HasOrder := true;0 p$ y6 _* p. E6 y* m. a
end;% q% `; v. p# Z# \8 K1 @
end;' Y& a, O- e! R* B: ~
end; -- of the method% F* ]5 E1 S0 G* n7 ^! e+ w, s
|