/* called by: entrance ctrl of the object 'track'- z5 X: |0 Z: h% e4 \( I% W) J
*// n7 F2 q4 e0 b0 J. H; L
is
( ~, z) @ Q$ L0 f+ |* P o part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 k: Z- r# c- @: A7 a6 _% cdo+ f* E8 s5 w# e4 x
Lan := rootfolder.Internal.Tools.AOLlanguage;3 L5 W2 y/ D( [2 X! ^" m
if current = @.Destination -- else return, }- o9 J9 Y' c9 Q) U7 D$ l' r
then
7 G# R+ A; g- j0 w! [ @.Destination := void;% W7 P- o! f) y/ O
if @.occupied then
0 |* W7 \% a l) K" g; D part := @.cont;! S" X6 K: W& A/ g. I* l7 J$ ?- z: w
@.transpOrder := void;- D7 B" Y: r- p; h9 l) B% D1 G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ V2 \$ c5 M, S* N
@,root.eventcontroller.simTime);9 ? [0 B; N1 _
@.HasOrder := false;
6 l& v3 c% h0 N @.DrivingHome := true;
1 i" x( H: k; w' F1 Q6 T2 i' h! V rgManager.tryToStartTransOrder;) s' [( R! w0 B! ^
if @.Destination = void
4 d! R/ {4 `0 S- r) h2 [ then -- no transport order for vehicle @
) S1 Z9 L# Y- a; J" k2 Z D @.Destination :=
; y- @3 S' ]* x# g. L" J rgManager.nearestFreeStation(@,track.~);. ^3 H. O7 u. f, p
newDirection(@);
. q' @; L0 J0 t1 P6 V. p4 _ if @.Destination /= void then
9 b0 U/ x3 t( d" I _8 j0 x @.Destination.NumReservation :=
$ r! _7 y: T' d8 m( \ @.Destination.NumReservation + 1;
# T; v: ~6 _8 k( h7 r end;4 D, q8 p' c5 Y2 j; C, v, o
@.CurrIcon := "drivingHome";
- ]4 ]1 ]: V2 M- c! k+ [- m @.DrivingHome := true;) n' d/ m- Q5 ^
end;
/ C2 w. {# y3 b8 d else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) U; c8 A7 z2 b# o; C part := @.transpOrder;+ Q8 U6 {+ Y# n; o
part.move(@);-- load part; C5 ~9 h2 E+ Q
@.CurrIcon := "load";6 W$ |" i4 _# r u4 w
GlobalDistObj := part.globDestination;
. C, j2 c! G" ]5 f9 ]. M. L assignLObj := rgmanager.rgAssignL;
+ l9 q2 G! m. f; ? row := assignLObj.getRowNo(GlobalDistObj);, `9 g- u6 F4 J# j1 ^8 r
if Row = -1 then -- since 70
( k# J2 q" I3 _3 L! X; J* f, y* S if lan=1 then
! E7 ~& q! x% V" `0 @. s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* ~9 ?, ~% Q6 |$ |+ D7 f
to_str("in der Andockstation: \"",?.~.name,"\""));
7 n) N; K! U1 [% V! N4 B0 R# o else4 z8 H+ ]: h3 S2 k) l7 |* n Z8 x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 z/ J: @- C; A6 F; d
to_str("in docking station: \"",?.~.name,"\""));
" r+ i+ ^, ^1 R& X* P, I1 I end;" P) I3 M1 z- m! [. E3 Z
else# U: S3 g1 L( E }
@.Destination := assignLObj[1,row];
: |! p$ T. ?9 \8 K end;
9 L. w' j x. G8 Y* t7 C: M# P8 ]0 a newDirection(@);4 A% u F) f- e; }. ?
@.HasOrder := true;3 A9 _5 ~1 ~' k% }. ?1 S
end;: H8 k6 B* l, J
end;
+ j. e9 o/ F ]1 r `. [end; -- of the method
+ I# ]+ u! _2 [8 D! ]( g |