/* called by: entrance ctrl of the object 'track'
( y$ h$ x, }, K* p4 S*/( A, u' _! B, X
is) t* v2 z9 M7 `! ]6 c1 D
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# b' Z! m2 e4 z4 jdo
; s1 b+ [% Q6 q3 U! A' h Lan := rootfolder.Internal.Tools.AOLlanguage;. _/ O" z/ A" B y ~
if current = @.Destination -- else return) y! L4 q; B9 P2 G2 ]2 q
then' r& ]! f7 I1 I& z" x: y0 L
@.Destination := void;6 G9 b6 z* R9 _. x! ]- E
if @.occupied then* p+ `) H$ |9 s/ w5 T2 i
part := @.cont;
0 D. _* N$ n H6 T' w) Z @.transpOrder := void;* r/ n n; i& m+ _# q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- t* Y% L# h5 d: ^' n- A% w& n @,root.eventcontroller.simTime);% e0 K3 w: x! b# }
@.HasOrder := false;
$ H' j k+ f1 j/ V/ j @.DrivingHome := true;
9 [6 U$ W. O4 d/ k. k7 C rgManager.tryToStartTransOrder;4 W1 A5 }/ l* m' I2 t
if @.Destination = void5 l. g3 H- ~/ l" [& w4 _1 i
then -- no transport order for vehicle @
" C1 N" t- ~( C3 G: s7 e T @.Destination :=
0 o! I# O D" ~$ o; t+ W& o0 O rgManager.nearestFreeStation(@,track.~);
- [9 T# D: z# \0 r newDirection(@);
# Z9 w8 c0 r9 `# G$ G K if @.Destination /= void then: R) e% G |3 w1 d* U
@.Destination.NumReservation :=
+ X" [4 a6 H; X/ p% ? @.Destination.NumReservation + 1;# s1 p% T3 _- ^5 o4 J
end;
4 k3 M: J5 ?8 T {* G+ W @.CurrIcon := "drivingHome";6 W' N/ S- f8 E/ Q& I+ K
@.DrivingHome := true;) r$ R4 G( D/ I: a* ]
end;( f. W6 T$ L) Z6 F- M, d% }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' ~: B, H( `; j: b2 x: O! D
part := @.transpOrder;) r$ T- b( T- ~4 I; v' G$ h5 n
part.move(@);-- load part3 w }9 `: }+ D
@.CurrIcon := "load";
; V6 E3 I' D& n+ K( P* P GlobalDistObj := part.globDestination;
k6 c$ v+ r0 ^6 Q' t# Q" T! q% c assignLObj := rgmanager.rgAssignL;9 }4 ]- O3 Z" ?4 m1 v9 J
row := assignLObj.getRowNo(GlobalDistObj);6 ~6 O5 Y8 \3 `' H m) A
if Row = -1 then -- since 70
7 h4 B: }4 f3 A$ ~6 | if lan=1 then" p* G$ Y/ U/ z; R( b4 k6 M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' [% |8 o5 N% ]
to_str("in der Andockstation: \"",?.~.name,"\""));9 Q0 s0 v# n1 j- D6 k
else
$ J# n; J* [# z! f& U2 t4 e3 ]5 T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 x4 K4 E9 n5 B0 A. f/ ] to_str("in docking station: \"",?.~.name,"\""));
6 a b4 C( Q7 T& p! f! k+ [" ?# C end;
, n4 T1 L% v. v" n else
/ z8 I; q; I$ }5 `; H( S, v& n0 u" s @.Destination := assignLObj[1,row];
k; t0 `1 D: K2 c% b/ w2 i r+ \ end; $ K- d% f( t8 @: d% [4 \
newDirection(@);2 K5 C1 S" \2 @6 N9 K5 E& n
@.HasOrder := true;0 g, [! k, b$ e) C
end;
( ~2 n, E$ s' x2 S' a end;
?8 w' a; H7 p+ ^1 ?; Kend; -- of the method$ \+ ^" {8 j; c4 @2 t
|