/* called by: entrance ctrl of the object 'track': d1 X5 d" p$ Q
*/; u: \$ J# G P; W9 G7 B: W6 ]& @
is
/ j7 w) x& i+ a/ M part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: p8 u, ?" o h% Y& s) |6 Xdo# o9 \, L" B! L
Lan := rootfolder.Internal.Tools.AOLlanguage;& M5 B. i1 \& s! f6 ]
if current = @.Destination -- else return$ O5 b9 d! O6 p' _. G
then- E$ B. b( X: D, e( W3 U- o4 i( H. a% b
@.Destination := void;- m- a0 E& r7 o2 w" w& R$ ?
if @.occupied then q9 ~1 y9 i4 N$ `
part := @.cont;
9 ?3 K: b/ j! b6 f @.transpOrder := void;
& d: y8 _4 i$ y* p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 v9 V5 i( r0 S' x; ]' o$ V @,root.eventcontroller.simTime);
/ @' `/ G, @; P$ {8 _ @.HasOrder := false;5 X/ N( s$ m4 q5 M$ E
@.DrivingHome := true;8 s" @( a% S q( p' o9 q0 ~. I
rgManager.tryToStartTransOrder;
g$ x* ^5 Q8 f4 e0 z" ?( s( m if @.Destination = void/ o, v7 ~1 |4 E1 j5 h# v
then -- no transport order for vehicle @
3 @( U1 ^; q; H+ } @.Destination :=% ~4 k1 d; x8 F: C! c# _( X* W
rgManager.nearestFreeStation(@,track.~);1 N* ~( m5 H+ A2 L" j
newDirection(@); / F2 f# `" O+ I3 S# b+ ?! z( ]1 |
if @.Destination /= void then
+ f, E3 g* g3 X- X# m# h3 p' m4 O& L) P @.Destination.NumReservation :=, m) F3 `6 {8 [0 Q, X
@.Destination.NumReservation + 1;9 i4 t! j) j- ?: X) J
end;
& |8 u* B4 v1 _ V# e0 ` @.CurrIcon := "drivingHome";
, e9 F( L2 V4 N. z @.DrivingHome := true; [& [' D3 A9 Z3 ]- H6 c0 K0 U3 |
end;
# Q5 m; H# e8 D, Z) N# J0 L( u5 ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station- I# t; ~5 @4 i+ D8 D. f
part := @.transpOrder;
9 W4 I$ ]# ?! R6 S6 { part.move(@);-- load part
M/ L, q0 Z, [$ ^! l$ [ @.CurrIcon := "load";8 _, |: |7 ^/ S1 M
GlobalDistObj := part.globDestination;5 N4 ?$ }$ O+ j4 H- a, @4 f% N+ D
assignLObj := rgmanager.rgAssignL;
: w5 l" V2 X& N' J" Q1 R row := assignLObj.getRowNo(GlobalDistObj);2 f. Y+ G' g& n* @( c: B
if Row = -1 then -- since 70
6 H4 p8 a4 a' O- E if lan=1 then! Y+ y2 q0 E+ E3 S, C. O6 P5 ^9 h$ V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 J/ y5 G. q$ |. V" X to_str("in der Andockstation: \"",?.~.name,"\""));
7 V: k' o& H1 H6 B3 y else
/ U6 D% X n9 S* S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' K" k2 A/ X6 P) }
to_str("in docking station: \"",?.~.name,"\""));
+ H; Z& m% N a# Y0 N end;
7 ^9 c6 H" m; g else- G( Y7 C6 a* v- i+ h% C [$ Z
@.Destination := assignLObj[1,row];
4 |% _2 X" D( E& O4 J- C% A; t& ? end;
0 R' |4 g) J9 g0 Y6 X newDirection(@);
/ n. ^/ h3 G# L: H @.HasOrder := true;
* I6 Q9 V# Z# ?- I U$ V3 P: L end;
2 O' J; i+ B( [; w8 r. l, x6 Q end;
' K5 [, d+ P- ]end; -- of the method/ R* J) G$ [& F' ~
|