/* called by: entrance ctrl of the object 'track'* Q" r: _5 j! {& n; w' {
*/) F; l" Y. o. l( k7 ?* p0 K, h2 w! \
is4 q2 _5 F9 D2 h, t* m5 d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ `6 b1 Q* j1 o6 z* A. D* gdo, U$ z( T- U( l1 I% X3 h9 W5 f
Lan := rootfolder.Internal.Tools.AOLlanguage;, z9 ]4 U! ]6 U
if current = @.Destination -- else return
0 r) T& {! H0 F8 V4 Y" p3 f1 f( ? then
) g. {, O! L4 v: c @.Destination := void;- }$ }( @( e& [
if @.occupied then( ~. _, T) \ O/ t" p+ k7 E. b
part := @.cont;0 J, X$ H8 Y- W% X5 W" q$ ~
@.transpOrder := void;
. D: r# e* E* @/ \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' g: P3 Z/ z; V! X" n6 B @,root.eventcontroller.simTime);
6 J! u5 s& {. E8 P0 }5 j @.HasOrder := false;
, W4 H4 L4 p: | @.DrivingHome := true;' f% _) q, J5 t2 l% ?
rgManager.tryToStartTransOrder;5 c( ]" w! e/ `* F6 O# f% T* P
if @.Destination = void" H0 ]- X, d/ P# k: Z" }) m, K- q
then -- no transport order for vehicle @$ z$ I2 t' X# q u8 `
@.Destination :=6 R( D% K3 {5 T
rgManager.nearestFreeStation(@,track.~);
( K: L5 q# R, P newDirection(@); & K# ~" i/ E: Y0 J, x4 p$ C2 i
if @.Destination /= void then
! ]+ ^0 S9 [* w" U, n. o7 K @.Destination.NumReservation :=
8 o4 r, ]9 D9 x1 B$ Y8 Y: v @.Destination.NumReservation + 1;
; V4 \, q, d, o0 V' D end;! ?! k B. v) c9 D( Z6 I! }
@.CurrIcon := "drivingHome";
* {% Q- r8 f) w" {' K" A4 }, n @.DrivingHome := true;8 @) V2 c! m5 m! k" X1 i( O
end;
, q7 A. N6 e9 k" _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station% P: i& o! v( i) W% L
part := @.transpOrder;- [/ E+ n( T- e0 `
part.move(@);-- load part1 `8 I% J2 C4 w3 U' Q% \
@.CurrIcon := "load";( G6 x$ M9 T9 o( x6 l
GlobalDistObj := part.globDestination;
W/ j5 z& \( f, ?# m6 R6 d* p) X" @9 ~ assignLObj := rgmanager.rgAssignL;
( R. w3 U) Y4 C6 P4 b row := assignLObj.getRowNo(GlobalDistObj);. A$ b) L# b0 ^- U! L* r4 }# s
if Row = -1 then -- since 70# \% s; E# h- O3 B% a b2 S
if lan=1 then. G2 i5 }# Z$ r1 U; W/ |0 J, w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! q9 M/ R) d- J- d1 n; E, ~! H
to_str("in der Andockstation: \"",?.~.name,"\""));
8 I: _% j% F( x% x! X else& v& A& P* B/ f# A! {6 ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: O( F" E7 }: s
to_str("in docking station: \"",?.~.name,"\"")); ( d+ l3 n: j" t1 U8 b9 l$ |5 k( b
end; E1 Y5 K. o: k4 k9 I% _+ v. x# O& C
else
9 ~1 }& |4 P5 z1 e* I- y7 Y @.Destination := assignLObj[1,row];
' f2 e5 g6 H. e* g9 D0 X end;
5 F) H" \" s0 H newDirection(@);
4 s( b% W6 g# v9 V Z5 l @.HasOrder := true;
: F+ m8 {$ S$ z. x1 F7 n end;
: K4 G& S( w( u! X end;
2 y. k/ M: S' E4 c5 }/ ~5 l1 V, Pend; -- of the method
( y, v) {- J+ N7 ~3 g- y, a |