/* called by: entrance ctrl of the object 'track'0 a. w7 J! W5 g0 o/ O8 q
*/
9 ]$ j2 _5 [" E4 L) pis
4 }( P5 d8 \& N1 w part, GlobalDistObj, assignLObj:object;row,Lan:integer;! F& I0 Q r; a" q: L
do
6 Q7 F. G/ G9 i: X: p) | Lan := rootfolder.Internal.Tools.AOLlanguage;
0 y6 v6 Y1 }( f' _8 F if current = @.Destination -- else return
! X5 j# }: V% d) {* g' W then4 z+ M: e9 i( a+ B& E' I
@.Destination := void;! d$ X, F3 Y5 _0 w2 Q
if @.occupied then* C% M" x) O5 }( g" a
part := @.cont;
8 H' E+ n* `) d @.transpOrder := void;
( t* U: F; J1 F6 Y0 |# E% h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 D( g3 E0 v/ W9 N! e% | @,root.eventcontroller.simTime);
1 K/ U+ `9 E5 { @.HasOrder := false;" {- B/ w1 {( v. i# Q
@.DrivingHome := true;
$ T( o) _) z7 S rgManager.tryToStartTransOrder;
- b0 s4 H1 ^; p4 K g% l/ m if @.Destination = void7 h0 s4 Y9 h. E/ V0 ^
then -- no transport order for vehicle @3 V+ {; v4 b0 D
@.Destination :=9 d8 |8 s1 \- F S K
rgManager.nearestFreeStation(@,track.~);
$ s% f8 u% ~* m# F7 M k6 d. H newDirection(@); ( ^% t' v3 ?" [' [1 p
if @.Destination /= void then
9 G. b( z. K% U% a) z% G6 d @.Destination.NumReservation :=
M( a( b0 b4 q7 r @.Destination.NumReservation + 1;
5 ~( }1 I9 M* P4 J end;
# c9 Q8 Q- f4 l. X2 Q. z3 e @.CurrIcon := "drivingHome";( B7 G; D5 B. ?5 w8 W
@.DrivingHome := true;
' N9 M5 _: }# O) y( I$ r end;
6 j* V0 V' F- H f else -- the vehicle @ is empty, both vehicle and part are in the same dock station* C' T. d) ]( J- |1 U6 t" w1 W. V
part := @.transpOrder;
& s( u7 ?. g) T: Z, R/ @ part.move(@);-- load part+ H- p" n& l6 j, q$ ?0 {& A( Z
@.CurrIcon := "load";7 h, ~* _9 V& r% F% n
GlobalDistObj := part.globDestination;6 M; P, _5 T. I6 m# e% ~. p j
assignLObj := rgmanager.rgAssignL;4 U& j% t6 ? P2 c0 C5 r( F& N+ O9 ~7 b
row := assignLObj.getRowNo(GlobalDistObj);
1 A+ r7 K$ h9 ]) `3 \3 k. { [ if Row = -1 then -- since 706 L& Y+ T2 B: c8 m: ^6 H% s
if lan=1 then
4 q% Q% J, I* l4 d5 f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 e" |& ]+ I7 S; e8 G9 o
to_str("in der Andockstation: \"",?.~.name,"\""));
% S z: u6 D6 u0 I# W4 \ else
$ r, Q" |& {7 e8 A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; e8 \' e* \6 S. \& U
to_str("in docking station: \"",?.~.name,"\""));
4 w% h( l6 p: Q% o/ X L) J4 W end;( g4 {* `% x; l/ k" x9 P
else0 t- M+ L) F! L$ _; P/ N
@.Destination := assignLObj[1,row];, V! c2 R+ \, _8 h
end;
, f& Z( a/ ~$ q& L/ ]% D newDirection(@);
2 {' l) B2 y" t/ l! X @.HasOrder := true;4 N$ ]: ?2 r3 b. r7 j
end;
5 P: |. @+ k$ t! k end;
4 N4 e0 l, O1 @7 d5 Pend; -- of the method1 T0 o) K4 [: y& [" w1 K+ I6 b5 l
|