/* called by: entrance ctrl of the object 'track'
! P; A8 l v6 n4 }* N* Z*/( f- @ c, t1 M7 Z8 x2 m6 S* D
is
6 ] x$ L: I2 v9 p) G9 s part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 N4 C' h d7 m! W& o+ O; g6 c2 A
do$ n& G% Y$ z- b8 F# c
Lan := rootfolder.Internal.Tools.AOLlanguage;* M0 [) ^* U3 w6 n
if current = @.Destination -- else return% X" O# a9 e0 h/ I5 L
then
4 X' p. x6 |6 T0 [+ S1 U @.Destination := void;7 M# g2 y7 L1 m; ~: x
if @.occupied then
- v- J: [7 K, S1 Q part := @.cont;
+ W% @+ K; p+ P @.transpOrder := void;, C; {& e" ^& h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& [0 f4 z8 |0 O3 [% W6 O- Y" |
@,root.eventcontroller.simTime);
" g! t# R0 w1 ]5 Q0 V @.HasOrder := false;
2 v6 ^) y M7 v" x% Q7 W; } @.DrivingHome := true;; e [; T; n; z( \+ t* R- W6 D
rgManager.tryToStartTransOrder;
, F& I/ A7 x5 a9 |8 i if @.Destination = void0 Z' C$ x# u' b
then -- no transport order for vehicle @4 ?& T( o- ?2 `& F. U, w
@.Destination :=
2 E- s" G# D3 D3 ? rgManager.nearestFreeStation(@,track.~);
% _0 \: Z( n+ F- H1 r% l newDirection(@);
4 {; c; r$ F. r2 J if @.Destination /= void then
0 h# o: P5 I: V6 P0 h7 w @.Destination.NumReservation :=7 _! b7 ?. p- e* }. }
@.Destination.NumReservation + 1;
- r" S* J$ b; q X4 t end;/ e# e; X2 ?6 B" T7 B r
@.CurrIcon := "drivingHome";
; ~( G' N% w/ \ O @.DrivingHome := true;! Z* X, o% e; \, b) {
end;, b$ W5 g* d# {! o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- p! e0 g% F+ d. u
part := @.transpOrder;/ U- }: A) t3 G. Y) ]$ F6 |8 V
part.move(@);-- load part' E2 A5 A) a6 M
@.CurrIcon := "load";
) |6 L* b1 A' f N" L GlobalDistObj := part.globDestination;
% }7 _: j: m' s; N$ l& `$ Z5 d8 K1 V assignLObj := rgmanager.rgAssignL;# N) a+ m5 e* M& i
row := assignLObj.getRowNo(GlobalDistObj);. E; @9 p0 R& l+ z% B& r: e! V
if Row = -1 then -- since 70
! I1 z4 M) o* k3 Q7 @ if lan=1 then+ g- N" s, s! |- e; H5 p& h. [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 t* g. h: [, k4 u
to_str("in der Andockstation: \"",?.~.name,"\""));
. `) b3 N; y% q# v else
5 k4 {: H1 Q Z y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' n& @) {. y/ c s to_str("in docking station: \"",?.~.name,"\"")); 5 z0 d9 c" F0 u# B
end;" H* h4 @9 W. J: D4 v8 s
else$ h- D7 W. h3 ~' ^( n2 I
@.Destination := assignLObj[1,row];3 a: W1 q9 ]& `
end;
* y i% ~. j; U+ I" a* l! J9 w newDirection(@);( S0 s( c! o* p$ M0 q
@.HasOrder := true;
\" e9 m* F4 T" J* l( ~9 @0 ~ end; @! d7 Q- \; a8 f; f1 y
end;
& P0 h0 \2 e" i+ h0 T' D1 A r7 g9 Eend; -- of the method+ x0 \' o6 `7 Y- c& W
|