/* called by: entrance ctrl of the object 'track'
) F5 N& q/ X, f) O5 x" C9 {*/2 o8 Z: q/ \' H7 o; T$ w1 e( y
is
2 l* B$ C7 D8 | X& t part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 S! D! B5 Y7 r0 ?; rdo
7 E5 @+ h$ @1 t ^) Z! C Lan := rootfolder.Internal.Tools.AOLlanguage;. u/ D; v; h' i( F* N4 ^
if current = @.Destination -- else return
% \6 t4 L7 u8 e# j then. K# }- a" E$ |& o
@.Destination := void;$ E; W4 K; e" e- P& g; L
if @.occupied then
) v$ w* ]. c+ u/ T r part := @.cont;
& P+ _7 q; M7 B' F& F% k, } @.transpOrder := void;
( H8 x4 W" M( m1 A5 j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ Z+ w# r" i( f* `0 t* S* c9 U7 N, s; i
@,root.eventcontroller.simTime);( l/ m* X8 A7 o5 e& F# o
@.HasOrder := false;/ [7 x. u8 K6 L4 m" A
@.DrivingHome := true;
5 }7 z0 M, U. |+ n) _+ A rgManager.tryToStartTransOrder;( }- O/ |) W$ R( u- ~
if @.Destination = void; h0 i8 p7 K* J# q
then -- no transport order for vehicle @
! u& q" E3 o5 d' y& o% O7 D' } @.Destination :=
! m" F. Z# b( {! N rgManager.nearestFreeStation(@,track.~);
6 l4 p' W L# l( l( J newDirection(@); * D* J* H. q' A3 R5 A' |
if @.Destination /= void then
% N8 h" X, M u' u& b) Y @.Destination.NumReservation :=4 [ I: o' X% R6 f* _: B, o
@.Destination.NumReservation + 1; Q( } I9 e1 g( G$ s
end;, b h. q3 f8 v( {$ R
@.CurrIcon := "drivingHome";
1 ?, {# G# e8 D, @( A @.DrivingHome := true;! ?* x. W& W2 l. s$ x: B! a! L
end;6 R; d: Q: V# L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) Z. b) J( B1 \. g7 h& v. i! W part := @.transpOrder;
- b9 |1 u" v1 T( k: O part.move(@);-- load part: N: v3 a0 O9 `4 l+ [6 }( ?4 K
@.CurrIcon := "load";/ a- m+ B a; _- [- O
GlobalDistObj := part.globDestination;: T8 G @$ `, t6 ^- D u. z' A- c
assignLObj := rgmanager.rgAssignL;" L- ?8 X/ e, n' _
row := assignLObj.getRowNo(GlobalDistObj);/ @% M( u; d5 J c$ R0 ^; q
if Row = -1 then -- since 70
# _( D/ c! h9 u1 J' w if lan=1 then! Z& T0 `( v ?) @ |5 Z. S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. o6 _4 S; H- u4 V, x' Z* m to_str("in der Andockstation: \"",?.~.name,"\""));5 c2 f" v* K0 ^1 j/ G
else4 z* G: }& I' |& D A. h% o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) l! i: ^( s( g9 Q- T( D. | to_str("in docking station: \"",?.~.name,"\""));
6 c& h" Y/ Q# o) }; u end;) i& p- ~7 j- v! i
else/ g' _0 a. e/ F% N. W& r
@.Destination := assignLObj[1,row];, s$ O' r; K% R# m, o( w
end;
- O9 `8 h* A7 ^- m! {( ^# ~' _ newDirection(@);
( V4 I _9 T+ Q+ Z @.HasOrder := true;
" x9 y* H* D+ y% R: o+ b end;
7 @ F5 [- R* a0 p end;. M# o0 d( ^2 ~/ I/ v
end; -- of the method+ H% S) D% Y* U1 y! C
|