/* called by: entrance ctrl of the object 'track'
4 l6 |* V. s( |1 |*/% D U+ v) R% j/ u0 t
is
( Q; g$ q' y4 @( X part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* v8 s- v, l6 m- D+ n! D" sdo
% J e- \' C; |6 y5 ?9 v$ d Lan := rootfolder.Internal.Tools.AOLlanguage;( a* z. u4 i& V* @
if current = @.Destination -- else return9 ~5 R8 M' x; D) U" D& [
then0 d/ s! d0 ]. a7 M! O T+ o
@.Destination := void;
% M9 e4 d0 c/ C8 L7 i if @.occupied then
% S4 Z1 @; r" H& Z2 ^ part := @.cont;8 t K6 [" P- z: p
@.transpOrder := void;
, k3 H0 M; _3 `2 w. a# y( j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 U `, a7 Y" H3 W @,root.eventcontroller.simTime);
0 m. L+ P5 b# g) e; p. Q* C @.HasOrder := false;+ |& h6 y( f, ?- Q' S
@.DrivingHome := true;
3 }0 D# l/ [! d3 x! h0 p. N rgManager.tryToStartTransOrder;
; J. {' g5 h* z# s t if @.Destination = void3 A' h& t" _# k, u; ^$ \" F
then -- no transport order for vehicle @
r, P& w, u- ] @.Destination :=
, ?$ z, O& D8 ` rgManager.nearestFreeStation(@,track.~);1 B2 m8 ~9 d1 q/ r) K4 T8 I# X
newDirection(@); 4 Q) f7 _1 I. R
if @.Destination /= void then7 p$ n: w2 e- j" l- _( [$ Z
@.Destination.NumReservation :=& A; w) E' g. V3 U: M9 m
@.Destination.NumReservation + 1;
& W+ z# ^3 D6 m. s* y* L' P end;
+ B0 c: O9 [+ U+ J; t' ~4 { @.CurrIcon := "drivingHome";% \8 n5 a _. S! Z0 \ v& g6 q
@.DrivingHome := true;
& W' y4 s- r* Q; @0 T& V3 G% f end;7 v8 h: S p; x' E+ d0 E4 n' |% u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 w7 R$ ^. q% Y7 W( B3 \2 o part := @.transpOrder;) q, P" q& W3 f
part.move(@);-- load part/ D3 b8 J* f" X2 o, _& z6 g8 J: c$ P
@.CurrIcon := "load";
0 w& R% {- j. T! F GlobalDistObj := part.globDestination;& I% R! z& K! J- u' V8 q
assignLObj := rgmanager.rgAssignL;
6 \, E6 y! L7 i& S- i# A6 X row := assignLObj.getRowNo(GlobalDistObj);' W: [3 l2 ~3 b: ~" I$ y
if Row = -1 then -- since 70 S9 W) s3 x+ U8 t2 T
if lan=1 then5 W! d) ^1 _5 {2 ^' m, e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 @& v, V2 m) S
to_str("in der Andockstation: \"",?.~.name,"\""));
, n8 U! {1 D8 [$ W( O else
- c' x4 v! q- o+ C4 J- k" H: I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# ]3 Q! H9 | F# J9 w
to_str("in docking station: \"",?.~.name,"\"")); + N) k7 T% e( ^( Y
end;
; w: y- \+ o6 C/ F- X else
- \0 z2 ^+ G7 B1 r( p @.Destination := assignLObj[1,row];* f7 ~9 K V. @( B8 W
end;
# M/ A8 u; \" U* E newDirection(@);- |6 E( s* A% Q- F. U' r: f
@.HasOrder := true;2 P- |5 Q1 R% S
end;/ S# R9 a$ N# B+ F8 w4 }3 b+ _/ E
end;
* q- a" }; j1 C" M Mend; -- of the method0 [" j* e' L; i, r6 u; I$ a' c( p5 A
|