/* called by: entrance ctrl of the object 'track'" e6 ]" G3 L- ~$ k& |: O# Y
*/8 I. e6 e3 j! o7 ]* j- ]
is" \; ]' I# t* _3 r% X0 ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& C3 [+ B, K* r: d1 u1 Z
do
7 ^1 F/ W; s: U( k& e' L$ J Lan := rootfolder.Internal.Tools.AOLlanguage;1 t2 V' u/ ~/ n0 `7 ^
if current = @.Destination -- else return7 Z6 W: m1 Y( a6 s( s
then
- R/ o1 B- w# d$ S @.Destination := void;
& j3 i3 ?4 h/ \ if @.occupied then) N/ o H) ^( a0 C
part := @.cont;
8 T; o" Q; L" i+ R @.transpOrder := void;) n* E, i+ O. o4 e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
m7 P, s: Z# @! ?9 F @,root.eventcontroller.simTime);5 j7 ^: S4 @/ _& u( o
@.HasOrder := false;. ~3 i: W5 l, u5 G8 ~1 _, m) C
@.DrivingHome := true;$ D% Y7 j/ L8 Z2 y& Y" d( }% ^2 I9 e
rgManager.tryToStartTransOrder;
0 g2 Q3 k* f. _. m) e8 E% J( x if @.Destination = void
* k( T9 [0 i# G, N$ T3 [ then -- no transport order for vehicle @/ M* I8 B6 ~$ L* v( q, }
@.Destination :=9 I9 S3 P5 y" F$ S+ E) X
rgManager.nearestFreeStation(@,track.~);
, G: f# g+ p6 x2 Y newDirection(@);
4 ^4 a2 E. L% u; B# ^ if @.Destination /= void then2 i$ ]- H$ d, d# L; }
@.Destination.NumReservation :=
\/ L E) r n$ A @.Destination.NumReservation + 1;9 ^4 E# T) `1 i+ D- `7 s
end;
/ J+ }" I: V# ?5 O( }% l& A @.CurrIcon := "drivingHome";
& j9 e( @3 H3 c k* L6 Y/ w @.DrivingHome := true;( }2 N) n7 ^- E2 t- u9 K
end;
5 w1 D( O$ n+ I' O! v& O+ e/ t else -- the vehicle @ is empty, both vehicle and part are in the same dock station" Z$ y" e- J+ ^' h5 v; ]
part := @.transpOrder;7 z5 ~" S! E! s2 w5 C. n6 O9 `
part.move(@);-- load part: ^ {+ r) G' L3 E1 z
@.CurrIcon := "load";
7 \$ n5 n7 _) D5 V2 k4 b E/ ^3 D GlobalDistObj := part.globDestination;$ W- r3 B. N: C
assignLObj := rgmanager.rgAssignL;: m! K2 V1 i. L, X
row := assignLObj.getRowNo(GlobalDistObj);
. X0 l+ J& a2 S% m- w if Row = -1 then -- since 70
$ y) R4 F! m8 R- g if lan=1 then' ~7 p7 H( j) g$ @/ N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% o1 z2 t& x) m3 L6 [ to_str("in der Andockstation: \"",?.~.name,"\""));+ s4 a9 ~* }# U6 }8 V
else
0 g' c+ g& P2 E0 j6 t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ z1 M9 I2 ~ l to_str("in docking station: \"",?.~.name,"\""));
8 s% A9 P* s) t7 z end;0 @3 Q7 B: q' A4 D
else o: |2 j9 K+ \3 e; `6 ^7 s
@.Destination := assignLObj[1,row];
. F& @' p% z) M3 r* K x3 @" O end; , {9 B' m0 A( A( `! L8 E! A
newDirection(@);
. C6 {- N! H5 B3 V+ u @.HasOrder := true;
0 [% t ]' `- M) g( y end;* v8 I2 F5 Z$ z/ _& c- e
end;% W, m4 [3 s8 t: K' _" R
end; -- of the method8 ]* M9 w4 _/ B/ k( {
|