/* called by: entrance ctrl of the object 'track'9 x: c* O0 A+ Q7 K3 \# J
*/
5 L. l. \' o2 E7 @is0 q; |5 n! H, ` }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 ^" g3 g$ H# q* C( M* mdo
7 N! i9 g( e* T/ h' L2 f. U Lan := rootfolder.Internal.Tools.AOLlanguage;7 a4 j, q, e9 a# b
if current = @.Destination -- else return7 {+ Y. M) a- L5 k& a% O( n( [* J
then3 t ]" H1 N, f; ?
@.Destination := void;
- p7 n* a- q# o% y; U0 N/ O5 \ if @.occupied then
0 `& }) c8 T- C9 p; m part := @.cont;. t- E, `+ [# b; M% T1 r' N
@.transpOrder := void;
& I5 @" C1 N+ I8 e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 D- u& k' B) ?3 y) j) R6 d
@,root.eventcontroller.simTime);
& k6 z2 t) K% _' U2 u/ A @.HasOrder := false;
, B3 X+ ^7 b* f @.DrivingHome := true;2 ?/ Z+ N4 f& b$ U
rgManager.tryToStartTransOrder;( e" K$ v5 a* w$ m9 R* i. ]7 k
if @.Destination = void
$ E5 |; J! H* p, _; O d then -- no transport order for vehicle @9 v" K i0 {, r. C( o, s* p
@.Destination :=
: e! P0 H+ w0 N$ i, x8 y. Y* @, A B rgManager.nearestFreeStation(@,track.~);
" K& ^* o; R _$ v' T9 v newDirection(@); . D; G- Z! L8 L# k) B
if @.Destination /= void then0 @; u. b2 \4 S/ E: |) C7 }5 e+ c: T
@.Destination.NumReservation :=
( Y. R; G; I9 K0 k( t- B& x' C @.Destination.NumReservation + 1;9 U/ j- G( R# y
end;2 a: J& k6 c5 |) C/ L$ ~
@.CurrIcon := "drivingHome";
- ?( Y$ k1 u" ?/ X& U+ R% q' O @.DrivingHome := true;4 b) F! ~) w C0 C5 Y# h V) i( R+ e
end;% Y4 C% Y! J( l. s* B- N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) C/ C, c/ b# c5 w! A9 y
part := @.transpOrder;
2 I' U9 Q' e6 F) G5 q part.move(@);-- load part
' f! A6 l' x' e& q0 ] @.CurrIcon := "load";
" \9 w4 @) M' R# X! _ GlobalDistObj := part.globDestination;. H1 @! g, Z Q$ S: D$ L
assignLObj := rgmanager.rgAssignL;/ W" u% Q- S$ {3 V
row := assignLObj.getRowNo(GlobalDistObj);& C8 b5 B! q5 e
if Row = -1 then -- since 70
5 A5 q9 {5 G4 _* K* ?) r( y if lan=1 then
l0 E" m B% ~! R# u% x! w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# t- c* z4 b [ to_str("in der Andockstation: \"",?.~.name,"\""));2 q2 R) O& f" u# n W7 y
else$ q' n8 k7 c3 ^2 w" I* ]( }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( F( H* V! j$ @) `/ `
to_str("in docking station: \"",?.~.name,"\""));
% q, A) O; |* Y* n% Z/ b9 h end;
3 K/ a2 F7 P4 C2 K5 m& E else
/ M; G) \2 S. K8 U* r) h1 {3 ` @.Destination := assignLObj[1,row];
: z' U2 ^0 w) ]' h/ B: D end; ! }* f: X a, X: q' v, E) | U
newDirection(@);
' `1 q* p7 n f0 t1 m @.HasOrder := true;
; z) X7 ~3 z# @: F8 b ^) ~ end;
1 Y) m1 j$ W. P7 p end;9 n3 B. k5 a2 s! j
end; -- of the method
! g4 B! A, A' X+ R |