/* called by: entrance ctrl of the object 'track'* x/ X0 O9 o' d& V
*/
$ v+ u5 `6 D1 i$ B% m4 g( ais
8 [8 v1 \5 ~4 u& h2 d t part, GlobalDistObj, assignLObj:object;row,Lan:integer;& b: s- L+ O; L" { g
do* B' C9 M9 C; Y$ u% ~) z
Lan := rootfolder.Internal.Tools.AOLlanguage;6 h6 p# Z5 r6 @3 E# b
if current = @.Destination -- else return; Z6 e& v4 y* ]$ F
then: g0 m V) e% y. c4 o4 S6 F
@.Destination := void;9 _# R1 ?3 T! [, w
if @.occupied then
& a0 i7 `, t' R4 V8 ` part := @.cont;( f" B# C' B% i; T( Y* J
@.transpOrder := void;
1 T$ k P- m0 a* t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 O- R0 D3 ?$ m5 ^! V
@,root.eventcontroller.simTime);! p. B% v: r! E, K1 l
@.HasOrder := false;
0 r& e4 ~( h# b c @.DrivingHome := true;
8 q5 l& o7 Q6 ]0 q) \ rgManager.tryToStartTransOrder;
2 I* ?) R* U7 h7 L/ C& I if @.Destination = void
2 m) \# j- R. I& d @ then -- no transport order for vehicle @
% `, E+ \( B! \8 X& b4 y! E- x @.Destination :=
& D, u7 f& o3 l6 Y- V rgManager.nearestFreeStation(@,track.~);
: P% G% R$ S7 Q1 ~ newDirection(@);
( K- z- [6 E3 q: ~, Q/ a: ^( u- b if @.Destination /= void then' f3 A7 m, @( ~& K" n; r, z9 R
@.Destination.NumReservation :=3 [7 Q4 N3 E6 D0 V
@.Destination.NumReservation + 1;# t' N5 M6 q& b( ^, c* H
end;
' Q `) Q5 @0 G/ w% i6 F ^ @.CurrIcon := "drivingHome";
& }% v6 M, A1 s v1 B @.DrivingHome := true;
* e: G2 H6 z7 b end;( `! M7 |1 y! H. P. K" |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 \* p. `' M# ~+ m/ E* y part := @.transpOrder;6 ]/ C' b7 ]+ r; x! x' V: \" l
part.move(@);-- load part
/ \1 {: K# J r; a% E5 i) S @.CurrIcon := "load";# q0 R3 d7 P0 g6 o. c) g& D
GlobalDistObj := part.globDestination;$ D9 n( ~9 y) [5 R& {* N' N
assignLObj := rgmanager.rgAssignL;6 p* K: d9 i7 z9 x5 C. K
row := assignLObj.getRowNo(GlobalDistObj);1 y" f$ l' `6 _ Y1 i5 X: }3 w
if Row = -1 then -- since 708 G+ b' O3 E' k A5 K+ \- t4 i9 @ W
if lan=1 then4 {; t' |6 {3 u% {" ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 U& I0 |9 ^3 b' }
to_str("in der Andockstation: \"",?.~.name,"\""));
8 j/ u4 v2 B, g* J% } else# w1 k; y3 G/ R( d/ P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 _+ l* E/ t Z* c/ Y9 } to_str("in docking station: \"",?.~.name,"\"")); " ^! y, |8 h0 r* Y* O' a8 q
end;) k. L( ?2 W6 C9 S$ t. T; {
else5 o' y8 S# {9 W# X. L7 @- J' n. V
@.Destination := assignLObj[1,row];9 Z" T5 f8 K& a. l
end; 9 d$ D" ?, S+ }: I. @4 U7 x1 ~
newDirection(@);
/ \, ?1 |" c6 N5 D. }6 H+ Q1 k0 @4 [ @.HasOrder := true;
7 H3 l' A7 M; w6 `; o% d5 T( E2 v end;
& L9 z+ R8 Z5 }8 J) H end;
3 C2 R) i% f3 w0 A; v+ zend; -- of the method7 i- z; N2 g) w+ }) X* i
|