/* called by: entrance ctrl of the object 'track'" l3 c8 F# b0 w) O
*/
% D5 l4 m+ i$ R( Cis
# d( a, x' z0 ^/ \) z* ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;" M- O/ ~) p& ?6 {
do/ B" o/ F. F6 d
Lan := rootfolder.Internal.Tools.AOLlanguage;6 z+ e4 q2 O a
if current = @.Destination -- else return( R- r% z" _2 r6 n
then
. N/ B2 w6 C7 R' c5 |" u @.Destination := void;
5 |/ ^9 x; f4 j1 x; H if @.occupied then
' I. c7 T8 q' d part := @.cont;
& f% D7 K) j' n+ G @.transpOrder := void;
( i' R) m0 E# F* e& w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 M& x6 N0 c5 f
@,root.eventcontroller.simTime);
, k$ ]$ V/ q: q9 M @.HasOrder := false;/ W; M2 b4 B: F; b- S" Q. g( m6 E
@.DrivingHome := true;
* b( M; X& Y. c/ Z: }9 J rgManager.tryToStartTransOrder; Q/ H0 v3 W7 f( ~
if @.Destination = void
+ m# f: G+ Q$ a7 ^ then -- no transport order for vehicle @
' ]7 A+ D) f( O% O. K$ p3 l @.Destination :=
, Y1 I9 j7 y, Z" }3 a1 A! w rgManager.nearestFreeStation(@,track.~);, Q$ Q C+ ^. T- u1 W
newDirection(@); " d5 z% h, d/ o% {
if @.Destination /= void then. Q7 a% K+ X9 h3 \2 e
@.Destination.NumReservation :=) B7 C/ [0 S1 O# g
@.Destination.NumReservation + 1;
7 f& Q0 f( j3 q" ]4 C end;
, V0 Q6 S# e$ | E @.CurrIcon := "drivingHome";2 k/ u% }8 D$ H5 v: e" {" a! I
@.DrivingHome := true;
' ~. B" L. {. K& [( r end;
/ w1 R7 s( k! f, t" v: w/ ]' Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 C. S; I0 ?: t3 H) \; m part := @.transpOrder;( F8 _% G9 U. ^, P* d
part.move(@);-- load part3 |, R- c# n: t, j
@.CurrIcon := "load";
# X ?: p. R5 \: @- w3 Z GlobalDistObj := part.globDestination;
5 W& d1 p7 @8 k" G0 x assignLObj := rgmanager.rgAssignL;
0 u8 @; m& V `, r# H row := assignLObj.getRowNo(GlobalDistObj);+ X: i# w9 _: G' A: a
if Row = -1 then -- since 70
9 e7 F! s* x& A4 u# L' M/ s& F U if lan=1 then
# T- r. T9 {/ Y) s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. [+ H5 s1 s% J5 _- V' H8 O to_str("in der Andockstation: \"",?.~.name,"\""));
_5 D# d, x& y- [ else
# U# ` F7 G; y+ B0 x! L. v# m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) a/ f0 ]: z" I. R/ ~4 x
to_str("in docking station: \"",?.~.name,"\""));
7 q( K* o/ v9 q O* L! o0 a7 H- L end;
' K. f/ _6 u- y else
4 [0 Y& ?6 T" F- P7 P @.Destination := assignLObj[1,row];
+ B* B, @; k" N1 |* \4 c( }3 J end;
' w Q |2 w# I0 M: p; x0 w. F newDirection(@);
; {4 |6 y: j; h7 y( `9 C; Z @.HasOrder := true;
5 @. n+ X, p" Z, l' a) @8 s9 S end;
# V) ~8 U, r8 U- U* T% @ end;
9 `' C6 b# `8 C. \* P" hend; -- of the method
2 q1 u9 x5 p4 k( m; R7 T |