/* called by: entrance ctrl of the object 'track'- w( Q6 Y( @; |* N3 p' i6 V3 F
*/
; r( U2 c7 p9 w+ e* ^is
u# `8 L6 q; V5 R& R- S; {6 B part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ y$ z/ }$ b5 Z/ l% hdo+ Y9 r, H% N, P# ^. Z& G4 {
Lan := rootfolder.Internal.Tools.AOLlanguage;
. O; y) I) p: P9 Y8 P9 Y3 e if current = @.Destination -- else return5 ]% G, ^3 ~: y4 t( D3 `, R' [9 S
then3 ]% j) E# ~1 |2 a$ {' z' `
@.Destination := void;
$ H/ ]( L" d! Z( }0 @ if @.occupied then
! M: T1 [' |3 z9 G) m/ L& q' L part := @.cont;# s7 K. s! v1 d) |2 G( k
@.transpOrder := void;
; {8 t4 n* p, W4 |$ P4 U5 \3 f* M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ D5 f0 K% L* u5 o7 g9 g @,root.eventcontroller.simTime);
& s* X( C. [2 J0 j" Z8 f @.HasOrder := false;( T: T8 u. ~# j8 Y) s6 S( S- u2 ^
@.DrivingHome := true;
5 A3 K) X& I# r$ J rgManager.tryToStartTransOrder;$ d% o/ g, ^1 y+ s1 @
if @.Destination = void0 u* Q! n5 K& A9 {, {
then -- no transport order for vehicle @. `" }2 `# e7 T$ t! j6 U
@.Destination :=
2 h- z: h% d4 X6 U1 L rgManager.nearestFreeStation(@,track.~);
, f$ P, h5 {- O. u! d4 H5 K% _$ N newDirection(@);
* ~0 `' ~' x: H! O) d! \- ? if @.Destination /= void then2 m" B, P! b1 K/ s# \" n
@.Destination.NumReservation :=
& W7 E' A0 k& i7 z @.Destination.NumReservation + 1;7 [; y4 I& L1 V/ O& H( h
end;
1 ^3 g/ Y0 G6 {( P/ \9 P @.CurrIcon := "drivingHome";2 K# _6 E6 s z. O, j3 w8 ?0 c
@.DrivingHome := true;
% _6 V8 R& F) x end;
, Z, m4 D( a# X2 U' l0 ]4 _0 W- @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station E/ c& A. J& Q% ~* h
part := @.transpOrder;
$ b$ K$ k0 I8 k9 y* f4 V8 D7 V0 x& c part.move(@);-- load part' O2 k) z2 N9 x
@.CurrIcon := "load";
' Z$ u& U& T# X; R9 i, ?* w GlobalDistObj := part.globDestination;
" _1 N& ~5 b! }( k- c assignLObj := rgmanager.rgAssignL;' y" c, c' P5 Z* t! Z' ]) b ?
row := assignLObj.getRowNo(GlobalDistObj);9 O. K) a4 y$ K4 w3 ], u9 \" c
if Row = -1 then -- since 70
9 s4 q+ m$ e+ T. |1 I if lan=1 then
; w1 |! x4 l+ U' s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ m& y+ b, N" n5 K' G) V0 C9 v to_str("in der Andockstation: \"",?.~.name,"\""));0 Y6 @' N/ k! N ~/ x* H& t7 K9 T) }7 B
else( y; N+ P; N# v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 s$ w7 t W2 `+ q' c2 z to_str("in docking station: \"",?.~.name,"\"")); - I% v. n. X& h7 ?& e: _: c' E
end;, ]' @. P- [/ A+ I$ q
else
2 b# Z' n' z6 \' A) J @.Destination := assignLObj[1,row];' u3 U$ j4 {# w9 ^0 I9 D$ k( D6 A
end; 7 E( B5 Y# t4 T
newDirection(@);4 K$ N$ g% \7 q, n
@.HasOrder := true;
, m# ~ ~6 T1 }7 p1 U6 o end;
6 C# K0 z7 ?6 | end;
9 V1 k( q7 t; P, D8 i5 c( T5 yend; -- of the method' o- G" X& y) x; _0 `! j! \
|