/* called by: entrance ctrl of the object 'track'! l0 s7 f; W, O2 W0 P
*/' x; J, z {/ d3 N4 E0 o1 C- [( U7 e6 c
is
0 y% m- b$ o$ c+ {; W1 f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! k+ D f* K) U' {" F/ p- gdo
/ j( {. y; {+ j Lan := rootfolder.Internal.Tools.AOLlanguage;0 l2 }, K- u9 {7 A K& k9 N! O
if current = @.Destination -- else return
8 E+ N2 ^' d' I: k- M then3 r: L( I4 m3 P5 ^! M" C
@.Destination := void;
% N% N4 z6 c; ] if @.occupied then4 Y7 f1 U; K" g; c5 o8 L, W1 X
part := @.cont;8 N/ Y' z6 P. }+ S. f' |# Z: q
@.transpOrder := void;; N$ }- Q' _& K" D C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ q4 g4 K5 @% V! l# X. o
@,root.eventcontroller.simTime);" c7 _) F1 ?# Y& C1 @
@.HasOrder := false;
. U; s( [/ c* q3 p" `% i7 z" e6 U! p+ t @.DrivingHome := true;
" G9 @4 a! b8 t/ `! ~# G rgManager.tryToStartTransOrder;" s k* N }6 V
if @.Destination = void2 e# @) X5 A. V: Z* S: z9 u
then -- no transport order for vehicle @, L% w8 r: {5 L( z/ A$ O+ `# ^" g
@.Destination :=9 R' v# K7 l2 @3 Z+ F( [
rgManager.nearestFreeStation(@,track.~);
f A+ q3 |8 o- u1 P newDirection(@);
) L _% L" h6 ^0 |( W( r* k if @.Destination /= void then+ J0 f1 Q' B# u5 A* X. I
@.Destination.NumReservation :=2 V* N) E. }+ d& c9 K
@.Destination.NumReservation + 1;
% X" \! I! z' q* B- S end;9 B) F7 G' q" } r6 A+ h- S
@.CurrIcon := "drivingHome";
2 j* |( k6 M$ R, C7 e4 | v0 w* b @.DrivingHome := true;
( P9 }, G6 D6 @- T; P end;
& q% C2 Y8 Y+ y+ W' } else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! L; ] q1 z) F+ S; Z part := @.transpOrder;# q% I. {9 F; c) S3 `# m$ H G
part.move(@);-- load part* z5 ], l* W( A+ z( _* N7 B' ]
@.CurrIcon := "load"; j. x2 P) ?7 X/ s, J
GlobalDistObj := part.globDestination;9 x0 ^8 i7 W) `7 k0 z+ I
assignLObj := rgmanager.rgAssignL;
7 g1 E% Z7 ?8 \1 x row := assignLObj.getRowNo(GlobalDistObj);4 R/ D& ]# a! y5 ]& _
if Row = -1 then -- since 70: w& o7 B/ g) M; W8 b
if lan=1 then+ J3 w; h2 `9 @1 f* [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 u1 @* |& O2 t# k2 X: w, T+ [6 Y E
to_str("in der Andockstation: \"",?.~.name,"\""));3 L5 j) R9 M1 x
else9 p( M/ a! R u7 _! o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: G% o0 I. g( M/ e, {
to_str("in docking station: \"",?.~.name,"\"")); , i8 V3 N5 _7 Q) G0 U8 d
end;
, \8 E0 F( D4 c( x else
4 d; \8 s/ u7 R @.Destination := assignLObj[1,row];! G' e, b1 b6 ]0 ~! w) o
end;
2 O7 a' M& e8 b9 d# j newDirection(@);4 ?( t7 m) | K0 f+ `0 B
@.HasOrder := true;6 M- H+ ^; Y! p. J) m' x
end;; G `; P1 h) ]! t9 |3 V; _
end;! V# F' D, L2 Z; M$ [" H
end; -- of the method7 v0 x6 r* _. O* j) ^5 u% H$ [$ h% B
|