/* called by: entrance ctrl of the object 'track'
* g: [/ o( A5 K. C( w*/
) J3 f. Y" w& X" Q8 ^# N6 `is
' ~9 M& H+ R& e z2 O% _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: |; X+ ^" C6 ldo
' {& j) K+ y$ j$ c1 l/ ?0 m! G Lan := rootfolder.Internal.Tools.AOLlanguage;
6 `& n( T. E& d, u: t" Q if current = @.Destination -- else return
5 A Y1 l4 N, C% J+ \' H0 N9 x then
% y" @: G) K* Y# u( A1 s" o7 Q0 V @.Destination := void;8 `! |1 T! @, K( m8 s8 A
if @.occupied then8 p( S% s- m/ E# x9 Y- q
part := @.cont;
* b# z/ @4 e+ P! U. |3 P8 f @.transpOrder := void;
8 ^8 a! x4 K/ X4 {) | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 Q" d% w; b# }: H1 H
@,root.eventcontroller.simTime);) J& \8 j& k# J L
@.HasOrder := false;
0 Z. |* B- q) s @.DrivingHome := true;+ I2 N# {+ C! A, j1 G9 E
rgManager.tryToStartTransOrder;
5 f, M9 d, ?7 m& c if @.Destination = void
% o- ]( L) W2 @$ ], K6 p8 K, O9 ?! C! I then -- no transport order for vehicle @
8 {1 B" v1 d7 x5 E, } @.Destination :=9 T. b1 f0 ^5 l' }! b; H% z. H
rgManager.nearestFreeStation(@,track.~);
6 b/ L; p! m7 v" ]4 B$ U9 }( g newDirection(@); 0 ~- L* c) s$ N, {6 M. B: \
if @.Destination /= void then$ K3 l; t0 v& l5 c% U0 `$ P0 q
@.Destination.NumReservation :=
4 `1 Q: ?: q& }3 i9 b$ P5 n @.Destination.NumReservation + 1;
$ j; f9 n% W8 r; y1 M end;
, J, {/ B( E$ N. @5 V @.CurrIcon := "drivingHome";2 B- W/ P# t* U7 W4 Y% }+ p" E" K
@.DrivingHome := true;
( }4 \$ b/ K1 a end;
; p% N/ U7 [$ ~, i6 o2 w( Q# u' Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# j) D0 r( C" ?8 F7 n0 r part := @.transpOrder;, O* _( P) E3 ^# F0 O, {9 a
part.move(@);-- load part
, t" K0 x0 e2 T d- A @.CurrIcon := "load";
* E/ q1 |/ }# T3 x* f; r' N GlobalDistObj := part.globDestination;2 q; X r( V. l/ |7 O4 z
assignLObj := rgmanager.rgAssignL;2 ^+ J. Q" B/ z1 k
row := assignLObj.getRowNo(GlobalDistObj);9 [' y$ y4 [/ X; U
if Row = -1 then -- since 70
6 c% k- l) [: ^1 z# q1 ~3 z, ~) n if lan=1 then
0 E) j. N; Y ~. D' @+ e, g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( y& K% R/ Y- w0 s: I# V7 A to_str("in der Andockstation: \"",?.~.name,"\""));- f M$ ~% _- }- s6 l7 I+ p
else& I2 H7 C' o: H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% q# B" M# D2 S0 Q: z/ u+ `% m& K8 `
to_str("in docking station: \"",?.~.name,"\"")); 0 |5 ^8 i- ?$ a, T$ U ^
end;& J5 D; w5 a+ n+ Y7 P* \
else- c' t% Q1 |* d) R; Z
@.Destination := assignLObj[1,row];
# [0 ?3 Q- z& t6 r9 X- T end;
1 s/ u& |" Y* ~ newDirection(@);
; b& o3 ]1 D! @% D* \, F; m, O @.HasOrder := true;
P# V( L5 n! R5 i* Y end;* X$ s2 E/ v& p$ a0 [
end;+ w8 H. i! C1 P5 J+ |" o% G
end; -- of the method' ]$ j! q, h. I. G0 y2 S
|