/* called by: entrance ctrl of the object 'track'' _9 ?" h" c; _2 q. r) H" j
*/- [6 L# _2 V- a. _" X1 n2 J
is( t( ]7 ^& b. }8 d. @8 ]; a
part, GlobalDistObj, assignLObj:object;row,Lan:integer; X; ?) R9 }- H* s8 o# d9 H3 }5 r
do
/ @, ^- J& `! I( H3 y Lan := rootfolder.Internal.Tools.AOLlanguage;
3 g5 z) {0 g& y1 b1 O if current = @.Destination -- else return
4 ]4 |& O9 }4 ^7 C then
1 T0 }$ z/ T' `+ s$ ?( |- M @.Destination := void;4 V4 O4 C/ ?: o' K; P5 H7 ^
if @.occupied then7 P0 r; g5 s+ D t- T
part := @.cont;, ]; `# a8 P: H' _
@.transpOrder := void;4 k3 i( ^, {- f! H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: d! b1 W2 T" z& V ?0 B @,root.eventcontroller.simTime);
( z, Q- O' ]* n3 y6 O @.HasOrder := false;3 ~( P$ |4 B7 r+ l1 \1 K; b
@.DrivingHome := true;+ `4 Y4 D; n6 ^) T8 {; f9 i* Y
rgManager.tryToStartTransOrder;
9 K; S7 m5 |1 O$ Z" S: c% D if @.Destination = void
+ ^/ o% Y6 V3 [0 v then -- no transport order for vehicle @
1 q- u5 ]; L) m& ^ @.Destination :=
. p) E# G: ^: _0 x% g$ H rgManager.nearestFreeStation(@,track.~);
* ~" \. G' M( ]' i$ r newDirection(@); , s* |" X5 ^" v; L$ J/ D& W( L( D
if @.Destination /= void then
t+ |! T& S, X) F @.Destination.NumReservation :=9 r' t6 _% T e g9 w8 E
@.Destination.NumReservation + 1;* f- ]6 ~+ s+ v x( \1 q1 Y& ]
end;
. D6 g4 t h/ z$ h& _3 w0 x0 G% i @.CurrIcon := "drivingHome";
! {+ S8 `2 X% n) _7 c6 T @.DrivingHome := true;' n8 p# w) b$ C- J f' X% S4 l
end;
0 I0 @4 D* O$ [# P! d else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 N2 C: F" u4 ?) [- M1 E& k6 e part := @.transpOrder;
0 L/ H& k, w3 {) C7 b9 Y6 B- r- f part.move(@);-- load part2 B/ |5 v, r# h' t. C- F
@.CurrIcon := "load";
7 }+ g: ^; k" I. M" s7 k GlobalDistObj := part.globDestination;) _! N" O0 @9 g8 f. h, Q
assignLObj := rgmanager.rgAssignL; q4 a3 [4 D. C% i- d
row := assignLObj.getRowNo(GlobalDistObj);
- ?9 Y/ c$ {! ]) X1 [% [ if Row = -1 then -- since 70
, P( d0 G* Z6 v4 k, L6 O1 K9 ] if lan=1 then
1 b7 ~; f2 x% I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ g, K0 e4 V5 ~; i& [ to_str("in der Andockstation: \"",?.~.name,"\""));* K8 k" z( w; _
else
# W' ?: u9 U! } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 U5 ^- j$ x1 z3 w1 c4 ?+ k
to_str("in docking station: \"",?.~.name,"\"")); 8 s8 M" F3 w3 y- N$ w V3 y
end;- d$ `. _+ e6 d6 V2 `3 v2 J
else
) [( b. j" v0 n' g @.Destination := assignLObj[1,row];
+ W. D' {5 I" H/ N, b end; 1 f R- W; w3 s q, [ E0 Q7 ^
newDirection(@);
! ^; L: i$ m; N/ } @.HasOrder := true;
, f4 b, [0 K5 y" O end; {9 v8 |8 E1 c$ Z: x! i5 b. x" C! A$ l
end;! X/ D$ q8 r" ?
end; -- of the method3 T! ~# q8 S% n# t" ~0 b7 P
|