/* called by: entrance ctrl of the object 'track'3 G) L2 J3 c0 \% B: E* R
*/
' V1 U# W: b( h% Ais
7 t+ u6 N9 M) b* M' } _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 E% t1 `) d$ T& i' {
do
( a* ?$ c s1 ?$ W Lan := rootfolder.Internal.Tools.AOLlanguage;
( u: x: q7 z2 H# h if current = @.Destination -- else return
; f$ @* C5 R! k) u/ O8 ]- B then; A( w4 d; k( X, U# D
@.Destination := void;
0 R3 F) I, G: v if @.occupied then$ i7 u1 L: A" i: G
part := @.cont;9 |: S" o! d% @! t5 @
@.transpOrder := void;1 p% \ }2 e2 c8 g# E1 G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& j2 K! O. B, q3 q) V6 G+ p @,root.eventcontroller.simTime);" `3 |1 v8 Y6 N$ I: T
@.HasOrder := false;/ t6 {( V1 v9 G( u# Y
@.DrivingHome := true;9 S- _# X) l; d* H( `0 I% K
rgManager.tryToStartTransOrder;& y6 w3 O1 O, d) C* W% ?$ _
if @.Destination = void
+ X$ ?/ @, k S2 H Q& m- ? then -- no transport order for vehicle @- P5 b* E! \$ l! d
@.Destination :=; }( K b( H1 N7 J7 ^! `
rgManager.nearestFreeStation(@,track.~);
# k& F# l; r6 }- N+ K- X! t newDirection(@); # d& j) t. z9 a
if @.Destination /= void then4 j: ^' y C( @ V1 A. U+ ?3 R
@.Destination.NumReservation :=0 p9 `, N6 P' \2 j
@.Destination.NumReservation + 1;7 [/ Z, @) L# D( @4 | K
end;) n- o/ w& W I1 c5 y* A6 O* o3 M
@.CurrIcon := "drivingHome";, g1 R0 E! {+ d. Z6 z0 z' M3 H$ D/ t& j
@.DrivingHome := true;. e( l+ d g% A$ N% g+ }: T
end;
8 i7 r, e' o3 Y* [/ T J; q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 m+ p9 E7 |8 m" J+ E. F part := @.transpOrder;, Q9 W. d; V" ]8 j1 I: V. X
part.move(@);-- load part
% _0 W0 [8 P" I+ ~/ R% W2 [1 ] @.CurrIcon := "load";
+ |0 m: V+ f: n% q8 e8 @ GlobalDistObj := part.globDestination;' I8 W1 K% P/ c8 v3 U( C: l6 b
assignLObj := rgmanager.rgAssignL;& m7 v9 X# |9 D, B1 E7 r
row := assignLObj.getRowNo(GlobalDistObj);
% T& S! X1 K! t3 i7 l if Row = -1 then -- since 70
9 w, i* S2 |' ? if lan=1 then: y" {5 \8 u7 g9 ^7 L3 A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 g3 Z0 t/ Z& b9 `6 s) n) l to_str("in der Andockstation: \"",?.~.name,"\""));2 r* n! _# y5 G3 ^* C
else
& g5 A: ]. i( j% ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 ~* t7 n, ^: H4 [" _2 {9 g
to_str("in docking station: \"",?.~.name,"\""));
! Q- l5 J& V/ o5 C1 o' A! J end;7 ]$ b _% d8 U
else9 \" o. W2 |2 w
@.Destination := assignLObj[1,row];
. `1 Q1 S+ H. D) l% F! m end;
5 B! P# m( O$ Y, h2 }9 C- K) T. W newDirection(@);
. m) x9 J; h, s( D$ a# m2 ^+ g8 q @.HasOrder := true;
1 E5 ?& c2 f' G* d( d. ?, ? end;
; y$ z2 l+ k' u' L2 v P end;
" |. l9 J8 r9 f( Z! Nend; -- of the method* D- C; l% g8 ` Z1 `3 Q/ v
|