/* called by: entrance ctrl of the object 'track'7 u: Q6 `) [5 P! \& ]! j
*/
3 M/ b& k1 ]* ^8 t kis, g# e% K. t+ l/ P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ h5 P8 c/ d9 w0 H, Gdo
w0 ~: ?5 y- E$ E: i& M$ v Lan := rootfolder.Internal.Tools.AOLlanguage;4 I" p0 `$ \' f6 K
if current = @.Destination -- else return) o: L; `; C/ \5 ~3 \
then$ v+ z% H) K4 G5 X" Y N
@.Destination := void;
" m. `: ?) U9 a+ X1 p if @.occupied then
s4 A5 L- k% v n/ Q. v part := @.cont;
' G7 `0 a4 X, }2 j; D& h @.transpOrder := void;
% }# T+ f# ]* e. W9 S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% G3 Y. j: r- `& u' t# u' J' O @,root.eventcontroller.simTime);6 D; ^% L; U; m. ?9 S
@.HasOrder := false;! Z' s6 M. k7 H
@.DrivingHome := true;! p# g% \5 |. y
rgManager.tryToStartTransOrder;
5 t( e. o( P- l) z if @.Destination = void6 q( x0 F n# p
then -- no transport order for vehicle @
& Z' g) \7 z8 J5 {/ X( P( Q @.Destination :=
B: |8 e# s! Z/ m* w rgManager.nearestFreeStation(@,track.~);- E/ ~ b4 G! z$ ^. y
newDirection(@); / ^ _2 `5 V$ L$ r
if @.Destination /= void then; }" K6 i8 a6 o
@.Destination.NumReservation :=) @) Y* h$ I+ {0 k8 w' j
@.Destination.NumReservation + 1;5 w) T$ a% u; x, D. ~
end;
# S2 R5 e2 L4 n$ ]: c @.CurrIcon := "drivingHome";/ r6 K7 o+ O1 k; e. E" s' d
@.DrivingHome := true;
: }2 I: }( s! C8 A- K$ i end;
0 a/ D: p# S; _ Q( L, D else -- the vehicle @ is empty, both vehicle and part are in the same dock station, F' |9 `- b9 o7 m3 y( F- d0 w% E
part := @.transpOrder; e# j" E! _, r. J0 E
part.move(@);-- load part
8 Q8 W+ w" a' N# t @.CurrIcon := "load";
% ^8 f/ B$ i2 C GlobalDistObj := part.globDestination;
4 I1 g5 v0 F% X( Y% ]( V assignLObj := rgmanager.rgAssignL;7 ?. ^% y2 a( `, u5 o
row := assignLObj.getRowNo(GlobalDistObj);% X1 }0 }0 Y L5 a
if Row = -1 then -- since 70 b, w; {: Y3 ?7 N" `/ b+ D' v
if lan=1 then7 M% r1 K; o$ M+ M8 D8 u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), g) _: \- C0 g1 [' J
to_str("in der Andockstation: \"",?.~.name,"\"")); f- G: {. ]; {0 x
else
! k2 m/ ^' Y4 C4 G I6 Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 d) ?' y3 U( J) z x( _
to_str("in docking station: \"",?.~.name,"\"")); " Q0 `9 F' a7 w T( l' R8 \
end;9 H4 O+ U" `! S8 M$ a
else( R$ H& l$ B+ j2 p
@.Destination := assignLObj[1,row];' I2 [' v+ k- A' C6 S
end;
4 y# H( Z9 b4 Y' f/ l" H newDirection(@);
% f$ {0 R# J# A0 D8 D$ I @.HasOrder := true; ]5 f% g9 R' d" O
end;8 \& M7 [8 @2 g5 ]) _" l. g+ x' u
end;
+ m. r. w' q# ~end; -- of the method
$ K! z- m& r( t; @ |