/* called by: entrance ctrl of the object 'track'* t7 e9 o! i) Z7 F6 M& s1 ~4 ?
*/# t$ d- h: M, G4 f& o9 ?
is
9 P$ [- N2 m8 n/ Z4 s part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 a# m! R0 k' C' X" ?do5 Y( t1 B6 S$ p9 E
Lan := rootfolder.Internal.Tools.AOLlanguage;/ Q: u$ Z! y y
if current = @.Destination -- else return4 W. \; e: d* e L3 H
then
+ \. f/ O8 {" |8 ]7 R @.Destination := void;$ f# _: r4 x0 [5 b) V" w
if @.occupied then8 j9 J1 t" b3 F: B- V+ k0 {
part := @.cont;
0 _ E& I9 J: m @.transpOrder := void;
& o6 h4 H( m( P( |) |" y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 ~- L, [+ {( {- Y, p0 J) d
@,root.eventcontroller.simTime);. R' K0 r2 r+ E+ [
@.HasOrder := false;
1 [ j1 @/ q. S; c @.DrivingHome := true;
! k) {$ f# R6 _9 c* T0 L. f rgManager.tryToStartTransOrder;
2 `, a( @" \6 q# |1 w1 C if @.Destination = void
5 J& a l1 c$ K0 C then -- no transport order for vehicle @. ^7 t/ f" i W# r
@.Destination :=
! m3 p0 d9 Q, x, f/ H, d rgManager.nearestFreeStation(@,track.~);
+ L3 w" ?/ @. B; e% N newDirection(@);
`( t+ J* F" b! ]5 R if @.Destination /= void then" q2 g& n6 B; j/ M. T$ r- M
@.Destination.NumReservation :=
% M U; m( ^0 N+ ^5 ~ @.Destination.NumReservation + 1;6 ?0 [* m) O0 u7 i
end;4 U+ n6 U. o. V- P$ W1 X, p6 m
@.CurrIcon := "drivingHome";: Q9 I- \% g/ k2 j8 ^& x. d4 g
@.DrivingHome := true;' ? R$ H6 K8 z& q/ ?, ?
end;
! ^4 F0 N, y. `! g! d else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ Y3 }) R9 q8 D! _$ v part := @.transpOrder;
5 x! J) q5 g+ a, I4 L: T# A part.move(@);-- load part
* y0 a) Q( Y( A+ n0 V! H. X @.CurrIcon := "load";+ n/ [$ K# k% J8 o: g0 U$ \5 _
GlobalDistObj := part.globDestination;+ K( P; x* J; s2 N7 L, ]; u% f. R) C
assignLObj := rgmanager.rgAssignL;: e' Z2 l& j- [, W0 v m! v P3 c
row := assignLObj.getRowNo(GlobalDistObj);* l/ N4 F$ l! N0 J6 ~
if Row = -1 then -- since 700 R' J1 B" Z! R) [
if lan=1 then
6 o( x, k. a, b, X- g8 K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 }) p( H3 b# U' Q7 G' Z& n
to_str("in der Andockstation: \"",?.~.name,"\""));; }% H9 z+ Y# ^& E* K5 W& f2 \
else
+ S- h' w0 Q# ?6 S6 i& ?( ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 U8 c; l# ^2 w' @ to_str("in docking station: \"",?.~.name,"\""));
" @* L c. h: y& _. z) L end;
2 T! r1 N) j! V/ b0 z) A1 Y/ Y else
6 s* ^/ u7 k, Q- @/ s0 j% S @.Destination := assignLObj[1,row];
! N& [/ X6 N5 x _3 n8 v" y end; $ l5 v1 J2 P+ z; c8 g
newDirection(@);9 U$ [1 x" d7 V2 K- J$ Z. C0 i
@.HasOrder := true;
V3 }3 y% H+ [. Q! ^ end;
( H7 c: [1 J a4 u3 n end;
9 R7 V+ e: P1 o5 M% r* Send; -- of the method% ~- ^6 U+ W% e7 b( Y
|