/* called by: entrance ctrl of the object 'track'
9 N5 J3 L: o1 s" _' v*/% v8 l/ p3 l3 i! g4 U
is7 f( v( V3 S) c7 B ~$ B% P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& q; n! g* u& w& z% Z3 F' v
do3 Z, c& X5 B# z) h. ~2 x2 Q1 t* x
Lan := rootfolder.Internal.Tools.AOLlanguage;
# ^/ f% ]- V7 B if current = @.Destination -- else return+ W( G: z* Y& x
then4 I: X8 D; I1 b" R7 U, y0 R8 z
@.Destination := void;
; `6 m" z3 C( f4 @+ z( L( H if @.occupied then, } q5 w; l& I" E2 s9 C v( l# ?3 Z
part := @.cont;
8 M* u5 l$ i; K/ C2 ~ @.transpOrder := void;! b2 b0 E& t; q8 D) m \4 u, h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: y3 a- E) `: d* G$ r6 _& O @,root.eventcontroller.simTime);( q% b3 o& ]$ ]: V9 n4 v7 O! |
@.HasOrder := false;7 v! b) A# Q5 u3 N7 ]
@.DrivingHome := true;; A. B! `' c7 a8 g
rgManager.tryToStartTransOrder;
* ?9 [# F) f2 D" Z4 ]' k$ W$ G8 k/ B if @.Destination = void+ t, W9 e$ Z* Z) r, t& l9 h
then -- no transport order for vehicle @
" C" |0 _# B9 M: U7 \ @.Destination :=
2 h9 Y2 ^* \3 F z, A7 G4 s rgManager.nearestFreeStation(@,track.~);6 Z/ _( T6 n; H6 p4 e4 u2 f( V& E
newDirection(@); ) l- j( Z0 h* S0 ]" k* S! ]
if @.Destination /= void then, Z4 D' U7 v! S0 H% G2 B, B
@.Destination.NumReservation :=) D+ e M6 O. Y4 m7 a
@.Destination.NumReservation + 1;' ]* y" V, G) z& x" C2 e
end;8 b5 g" z; s3 q& `4 U% {
@.CurrIcon := "drivingHome";5 I' H; V( k, V( I3 A
@.DrivingHome := true;
- r4 C6 H6 i+ X end;
% `7 O4 o+ u: d- Z/ k else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 r2 F, K5 Y% F& \( x
part := @.transpOrder;4 Q7 S Y! }0 @- w- _+ W0 `
part.move(@);-- load part
0 k5 N& Q% a4 m" G$ t @.CurrIcon := "load";, |* z0 F+ E, ?( M9 x& \
GlobalDistObj := part.globDestination;
5 d; Z0 I, H7 K( w( ]/ q. |/ Q0 l assignLObj := rgmanager.rgAssignL; o4 Y3 d- ~1 G& Z8 I9 y
row := assignLObj.getRowNo(GlobalDistObj);
6 _) q+ s2 }; C( N6 p0 R# T if Row = -1 then -- since 70) |& {/ Z- `! E2 K, @; Y( @& f
if lan=1 then7 G2 F- @% u9 D3 Q; D* ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 v% M& f6 E2 l% o. I! D( y* P
to_str("in der Andockstation: \"",?.~.name,"\""));9 q# P# P' i( [. _% |
else% d6 A, b" V" y; ^# o4 Y3 h8 C9 ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# ]: p$ t' {& E1 }. A. ]0 O
to_str("in docking station: \"",?.~.name,"\"")); 5 K: N* K4 x- s: L# k. Y9 Y
end;
. q2 @, d# e# b Q# P. [ else, P. |( j- c& C# l
@.Destination := assignLObj[1,row];
6 u' ^( P9 B# s* [! r; g* z, @ end; , _. h( `: K' n) p8 T- S: |
newDirection(@);
+ H9 e v- u4 r v& x: d @.HasOrder := true;
! ]( {6 I* o5 D1 K5 Z end;1 Y+ G. L* S6 X0 T
end;; S; R; _1 E1 Q/ Z9 e
end; -- of the method
! l4 W8 Y; T- h0 h4 A7 ^ |