/* called by: entrance ctrl of the object 'track'
9 z' B6 j- x% H. N% y& x" P. @*/: I0 Y& S1 n2 h; k0 }
is- W- S( K7 r( a: h; a) c3 K3 F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 Z3 s1 K( a' X5 e( H! o- Z( hdo( @7 R# I6 N m8 K& L) d0 x
Lan := rootfolder.Internal.Tools.AOLlanguage;
( q$ I. t& V2 [6 C1 X& L if current = @.Destination -- else return
5 P, _' p) P2 ] then' r# z9 T. ]( t! g2 X9 m
@.Destination := void;) q7 m. q/ v7 S: x
if @.occupied then9 Y5 ?; P$ ~% L
part := @.cont;1 q, v- K0 m5 f/ T
@.transpOrder := void;+ T* }& ]1 `" ?: L) I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 Y- M, ]& R/ L# h- c( b+ e( J @,root.eventcontroller.simTime);
, _" T, ^" I0 M/ a @.HasOrder := false;+ }* j% s c- `7 u2 w+ R, O7 n/ n
@.DrivingHome := true;4 \/ `8 ^+ a o9 S- h
rgManager.tryToStartTransOrder;& S; k1 A6 z9 T$ Y4 U1 T! G3 }- D
if @.Destination = void
! X& _1 s* @9 z- [. I then -- no transport order for vehicle @
: F+ _1 ^4 B- g' u/ _% E7 O4 B @.Destination :=
2 }1 s, r; B R4 P rgManager.nearestFreeStation(@,track.~);
1 z7 i5 R' m5 T- {. z4 G newDirection(@); $ K& \# z1 f0 X" @* T
if @.Destination /= void then
- s$ o# g3 J3 @4 F) z @.Destination.NumReservation :=5 d9 @$ v; k R3 h/ c
@.Destination.NumReservation + 1;& ?1 y% B" N+ ~ D5 [
end;- Q0 b- h3 @7 x
@.CurrIcon := "drivingHome";
' b7 K6 F% ~6 ]" P& [ @.DrivingHome := true;
+ S, p9 v* F' h& V end;
`6 X6 r" p6 [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ k' {$ ?9 D- M2 `5 U part := @.transpOrder;* a0 p* d# G( X3 k7 b# @: l/ l
part.move(@);-- load part& v5 I+ _& y/ L' s2 ?) f
@.CurrIcon := "load";
- s- a" M1 u$ ?6 i1 d0 f GlobalDistObj := part.globDestination;; W/ J2 j- i/ Q8 _
assignLObj := rgmanager.rgAssignL;6 N% _9 J' c6 e3 }
row := assignLObj.getRowNo(GlobalDistObj);
9 K: J. t1 x" N if Row = -1 then -- since 70" T( M6 a3 M4 l! I" B
if lan=1 then9 n: f1 s5 o$ L. L ?! [& V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 \' _" K0 G; p x F8 A6 p6 X
to_str("in der Andockstation: \"",?.~.name,"\""));4 v& [. Z* g& N0 C( b8 Z5 S
else+ {: m3 C2 D9 e1 i1 V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 R0 g/ ~/ E ]8 M+ h' Z. I
to_str("in docking station: \"",?.~.name,"\"")); / c; Y, a4 H' s5 q( J2 j
end;
& g4 g# e; J2 Z# f. N4 R else
! A& ^% c! z# i# w% z @.Destination := assignLObj[1,row];
( d8 }1 R7 }+ `, r) D; { end; 2 Y+ G) s: {( E% \$ \
newDirection(@);* J; S" V9 ~ O) _! U
@.HasOrder := true;0 P: ? U. x% `9 w7 N6 Q; \& i
end;4 g6 H# s0 ?- x- Q6 g6 f
end;
# x/ B' H! i! N* m- E; aend; -- of the method
# {7 ]& S m& Z' R' O# Y |