/* called by: entrance ctrl of the object 'track': i6 F9 m0 n m& X$ Y5 h" i5 h
*/& L3 f4 E' s% Q9 E
is b6 m, W0 W6 i0 P- D
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* B4 N4 Y# u) G5 E1 `
do
" w0 v$ c5 J. n' k Lan := rootfolder.Internal.Tools.AOLlanguage;
& [2 u" u/ j9 ] }# X7 @0 C( x. b( p if current = @.Destination -- else return1 Q. h+ B8 @. L3 q' t
then- M, L2 L. I3 x) S% x( n* Z* [
@.Destination := void;
6 Q7 {& Y5 h' d' S X4 Y' I if @.occupied then
& B; u- e! k$ \0 m, h part := @.cont;
& R& X2 w' M: j0 ^, a# M @.transpOrder := void;
z% Z! P& j6 m: Y* V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 A5 Q( a* W* d+ S% [5 X) X @,root.eventcontroller.simTime);/ m( T" G I7 f. l7 Y1 r( M% Y
@.HasOrder := false;. r' i- [ r* c0 z1 h& `
@.DrivingHome := true;+ R m0 T9 O9 S: G
rgManager.tryToStartTransOrder;/ v0 k/ a2 L- f- t* B
if @.Destination = void/ S) B" K3 l$ j2 M
then -- no transport order for vehicle @- Q4 E$ i/ y- O7 v
@.Destination :=
+ N' A" I0 M t! j3 a rgManager.nearestFreeStation(@,track.~);; ^6 k4 N a& w
newDirection(@);
/ W. o& i0 q) v+ D! f0 W if @.Destination /= void then
/ c5 B3 |0 A- O Z7 U' \ @.Destination.NumReservation :=
+ P( _# B4 G- q8 x @.Destination.NumReservation + 1;2 f" `3 w+ \2 R
end;
! _/ B8 L1 ~. V* w N) D @.CurrIcon := "drivingHome";
/ A" ~5 j) h' L @.DrivingHome := true;
1 Y& X. R2 W* e( P& ?& }( { end;
' O5 H' r" t9 ~2 p: |* Z/ w else -- the vehicle @ is empty, both vehicle and part are in the same dock station: m$ {& d1 e# o2 T* E
part := @.transpOrder;
* G! s" `9 {1 w5 o; \/ K8 J } part.move(@);-- load part" Q* A7 j n1 X$ S) v- h
@.CurrIcon := "load";1 n4 e: b8 ?- R& {, T: I% j
GlobalDistObj := part.globDestination;
) ]) P7 K$ E% I5 j assignLObj := rgmanager.rgAssignL;
$ ~% u: o! L C0 h row := assignLObj.getRowNo(GlobalDistObj);( b4 K7 Z9 ]7 T* V& Q
if Row = -1 then -- since 70. X3 b+ E; k7 |; s, D; o
if lan=1 then
6 Z1 ~. W/ S8 W) d( a0 w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 D- U$ I6 r' W& j, N3 e! _
to_str("in der Andockstation: \"",?.~.name,"\""));" j2 ^/ X& Y) B7 O/ e
else; [2 G( w9 k% \& N1 Y# l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& y: w/ B! a6 z
to_str("in docking station: \"",?.~.name,"\"")); ; |: V q! D- S+ A- u5 j2 N; |) @
end;0 u3 n4 L6 `* [( ]4 f
else d* X2 }& i: M+ \# ^( m: r- {0 C+ h
@.Destination := assignLObj[1,row];
" u9 W6 w( W6 i end; - J- d( l) \* `, N* }
newDirection(@);* V* c+ S# y- z- Q8 n! E
@.HasOrder := true;' h* \1 g3 r- y' S0 l3 F
end;0 l+ G7 I. o$ n
end;. e: a3 s+ n( {, n, i, [. T! W1 z
end; -- of the method1 q" r* L7 {; G) T
|