/* called by: entrance ctrl of the object 'track'! Y% p$ Z- u/ E$ C2 R1 R
*/
9 [ Q- G3 N9 J8 O' ~is
* k& w" c' J i, ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 r5 L2 Q6 r. l$ Q
do( V, W- G z; X0 m% E
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 D& a+ \" C$ \' z! ~( [2 V if current = @.Destination -- else return
* V7 c4 `$ C% K then: C1 s5 @" b& a% r) {
@.Destination := void;
: |/ E3 T6 ~8 e, F3 C4 g if @.occupied then* G' q' t; H I, P& d. Q
part := @.cont;
6 l" b, N- I6 o( C, N0 N @.transpOrder := void;
4 p/ [9 J4 q8 a1 y6 L4 e2 j. c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& b* ?" ^3 `8 S9 B- ]3 Q7 Y @,root.eventcontroller.simTime); o7 w+ U, z- Y3 {) W
@.HasOrder := false;- `0 \/ x0 L2 `- q
@.DrivingHome := true;2 C' A% o5 r+ E/ f* N, K9 I6 [
rgManager.tryToStartTransOrder;
* ], I% \# N7 x) y3 g, T# R* R if @.Destination = void; I6 w1 D5 f9 Z+ O
then -- no transport order for vehicle @' ~4 ~# V" }9 b$ n
@.Destination :=
. C( ]0 T! R$ w: a+ w7 `3 k; B0 ]' L rgManager.nearestFreeStation(@,track.~);
2 H+ ?9 R. | \+ n& D4 \9 A: P) H* Z5 _ newDirection(@); 2 M; ^# Y0 I; r/ C4 S7 L( _, s
if @.Destination /= void then
}. W( v# p6 Y' A @.Destination.NumReservation :=+ H. y3 l, C) L0 n( K) D
@.Destination.NumReservation + 1;
! Y# m. w @6 }7 e end;% o5 B8 Q0 `% m, O6 h& d! ^
@.CurrIcon := "drivingHome";
( @4 a1 Z& `! ^8 f @.DrivingHome := true;4 p) |! ~/ t1 C+ ^" A6 @* ]
end;7 H( O: K% o8 e( G* g; }7 b5 s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; j, \; J5 W* O# a8 h+ I5 n
part := @.transpOrder;) a/ n& W: z3 d5 y
part.move(@);-- load part9 e' Q! O8 y3 E _9 C
@.CurrIcon := "load";
. H! N5 x- n9 K7 p4 B" F GlobalDistObj := part.globDestination;' J9 x, o9 ]& j3 {
assignLObj := rgmanager.rgAssignL;
7 O7 D3 L0 W$ l/ n6 @ row := assignLObj.getRowNo(GlobalDistObj);
# |+ |/ _- Q! H& p if Row = -1 then -- since 70
+ {0 e" ? V4 M( @* u if lan=1 then9 n4 i4 D2 t, ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 C0 K( A d& z' c% Y9 Z/ p to_str("in der Andockstation: \"",?.~.name,"\""));
0 b9 c3 P3 N0 [) X" G else& W8 d: G' Y+ Y2 d6 n$ l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 h2 O* e' b" H' |: P7 R5 N
to_str("in docking station: \"",?.~.name,"\""));
* Y9 X) K, e1 h, o5 G* F end;$ F; f* H A7 [0 `( c0 ?% K# x
else
0 i. r' y0 x [! ` @.Destination := assignLObj[1,row];
& P, O) I6 T1 Z, g) Y, e end; . v7 \$ a0 s+ ^+ }+ I( Z7 b8 g
newDirection(@);
2 G* A3 ~8 T# X3 ?& N @.HasOrder := true;
' } }. J( o/ a0 m8 f! D8 o6 T end;$ D( z' W$ e6 q' j/ z
end;
/ ^" B% X' H y3 Qend; -- of the method9 k8 N: x$ ^2 ^1 y/ h+ G3 Q
|