/* called by: entrance ctrl of the object 'track'
" ], Y u: u) U$ A9 i. @! t6 ~: q*/
, @8 h' w) U+ g. O7 w1 uis
- Q$ P. e3 S) i" D part, GlobalDistObj, assignLObj:object;row,Lan:integer;. l! w4 G5 ?, V' n
do; j% T$ \6 \2 g1 c% @% L6 [. v) G8 [* X9 x
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 k& D+ X( _4 {5 o7 L1 A6 ~ if current = @.Destination -- else return. k8 K& W& U( E9 p1 c" {% K
then, o! k+ d" k9 T, `# F
@.Destination := void;
% _+ i! g/ L/ [ [" Y1 y if @.occupied then/ j% y9 ~3 Q7 l1 N5 t# K
part := @.cont;. l, ]' e: R4 e8 S4 B7 |
@.transpOrder := void;0 Z1 v4 ]1 _4 r! t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) w$ ?- k* s* A0 U4 N3 z. \ @,root.eventcontroller.simTime);, L8 S# D/ P8 E& g! I
@.HasOrder := false;
0 d8 n0 A3 ?7 m, w% H7 {/ I7 Y @.DrivingHome := true;
; a: T, g+ M- L2 c; f8 G* {; E8 D rgManager.tryToStartTransOrder;
# l M; p- P- k$ O$ i: H& o7 O' } if @.Destination = void+ b/ v' [0 j& } ]; o6 ]7 \, S
then -- no transport order for vehicle @8 Y8 f3 H( a; P( A! K
@.Destination :=5 h: v) r2 a& Y( P& b& R
rgManager.nearestFreeStation(@,track.~);5 w2 H" ]/ P) J# t# z3 P3 F
newDirection(@); . \4 X$ a2 \& s. \
if @.Destination /= void then
9 J! D: h i0 ~" c8 H4 n& ^7 x @.Destination.NumReservation :=2 R. I( |! _! W
@.Destination.NumReservation + 1;
4 b7 n2 q+ N) D% _ o end;
9 C( G# h1 O: `$ E @.CurrIcon := "drivingHome";
0 \8 x/ |. }6 H0 k6 I v) q @.DrivingHome := true;8 g0 |6 u( W A! @2 p7 w" P
end;0 T% i2 Y2 A( i4 P! U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 }1 h3 }7 G, i* K* I6 \4 u+ D# n
part := @.transpOrder;) m- O9 j6 i& i6 u3 M+ n$ ~: q
part.move(@);-- load part
' x1 Z5 k3 f h. m# I @.CurrIcon := "load";
8 }, l9 C" d/ R& ?7 h2 n GlobalDistObj := part.globDestination;( B* j9 O& f: {! @; v2 o ~& r
assignLObj := rgmanager.rgAssignL;9 W: G8 Y6 \9 ?1 q7 }
row := assignLObj.getRowNo(GlobalDistObj);
: h/ f: D' f# A" o if Row = -1 then -- since 705 ~3 ]. Q$ |- ~0 o+ f* a7 B0 ~' i
if lan=1 then4 Y9 W+ C& s2 B' q% G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* }; z0 f# e" |$ `1 a to_str("in der Andockstation: \"",?.~.name,"\""));4 @0 F+ H+ S& j
else
5 q' K" {5 x. Y8 E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) g+ e/ x& G1 g% | |! w( ]7 @8 `
to_str("in docking station: \"",?.~.name,"\"")); ! M6 P( @' I. ^4 K
end;, t9 x9 o8 y( z- E& ^
else* P9 f( b4 r1 x) i3 T$ ]: O
@.Destination := assignLObj[1,row];
7 B: {* k2 `' j; i0 P) @, b end; ; _/ l; w- H5 k! m0 w9 F8 Y8 V- z
newDirection(@);
2 s# V3 f* C9 i4 c8 `# Y/ ^* e @.HasOrder := true;
7 j5 z4 r: [; E6 H- U' Q. u9 u end;9 L% s8 R0 W$ x, K6 U- _1 W
end;/ b; i& _$ }1 n1 G; z9 M
end; -- of the method
" _& Q) B; n9 X2 V; z# g |