/* called by: entrance ctrl of the object 'track'7 r$ c$ [4 E# S y
*/1 h. c4 H8 }4 N4 d9 L' p
is
: y. Y4 m% _: T- Y$ H part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ F* N, d. N" {% E: Mdo; W& U1 T1 j& a
Lan := rootfolder.Internal.Tools.AOLlanguage;2 \9 J- o3 n- Z I) Z
if current = @.Destination -- else return* d o; i4 n! C5 t
then
' H( n0 x6 I% [0 X @.Destination := void;8 A9 w& L8 A, S( U& N
if @.occupied then
% k+ l5 K( z6 a: b" ] part := @.cont;
! x: J9 U. X1 X$ ~& R2 F0 ~ @.transpOrder := void;( K% f0 j. d- n2 x+ X! c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 l4 ]" h6 j- R$ X1 t
@,root.eventcontroller.simTime);8 W1 L, M2 |& s7 | o. Q) p" E
@.HasOrder := false;: |3 m% E; U; ^
@.DrivingHome := true;$ G0 x+ Q% m# ~' B
rgManager.tryToStartTransOrder;' f" i$ ]! R& j: C$ m/ g+ Q; q9 t
if @.Destination = void
6 w' N/ R3 W$ f2 I0 I4 c, z then -- no transport order for vehicle @
7 `4 ?7 M/ s0 ?$ {1 t* p0 d @.Destination :=
; ]0 c1 q( @# [7 ^/ @" }# a# n4 W0 S* w rgManager.nearestFreeStation(@,track.~);
; s5 X3 p" i' t; A9 Y' f4 J4 C8 O newDirection(@);
" ^0 z, O- g+ \9 J if @.Destination /= void then
1 L* I9 H# v8 P @.Destination.NumReservation :=) n- I5 ^ D+ V2 `
@.Destination.NumReservation + 1;* V9 G" d8 o8 n7 Z. _6 x
end;* p8 ~9 M$ c* {+ t- l
@.CurrIcon := "drivingHome";
5 z, g7 w N h) ?2 ?9 B4 g) y @.DrivingHome := true;& o/ q" e( q" C% v. d) m
end;
2 a, v+ l% P) Q( V- Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station, |% {" l0 w6 V6 E! j
part := @.transpOrder;
) a4 S. P( N; G9 |. c/ j2 n part.move(@);-- load part
$ c# o j: @3 G: B& @0 W @.CurrIcon := "load";
+ i- i6 W; F* [ GlobalDistObj := part.globDestination;9 @$ s& X; j) g1 W$ M8 `
assignLObj := rgmanager.rgAssignL;/ s" k/ c9 `/ R& f: \: [9 x% t- r" {
row := assignLObj.getRowNo(GlobalDistObj);
% \: d1 g& t9 _$ e' X* K if Row = -1 then -- since 701 |( t" V$ p5 S" b% u- x; E
if lan=1 then
; r* X1 `% f& O4 T6 z% ?/ C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( r" {9 {( Z2 }! ~ to_str("in der Andockstation: \"",?.~.name,"\""));
! @ s6 G' [% s2 O6 k$ l else% }* y$ C5 o* d H- h5 U, T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 s5 h% f. K# m
to_str("in docking station: \"",?.~.name,"\"")); ; {) f9 D2 C4 V4 s4 P2 t7 g
end;
7 Z# g* n n( q& z* ~! Z else3 B( j6 q4 b! D4 { o
@.Destination := assignLObj[1,row];* O: ^* _) G% y& i3 U/ H' j
end; 6 l7 n& g7 [: x2 P/ S
newDirection(@);
0 Z& g9 J3 a" f6 M @.HasOrder := true; |9 |( K5 S; \+ g5 s
end;; R/ A" Q7 q, Q2 x9 ~
end;9 L0 h, [- q, m9 }, n w/ D
end; -- of the method4 Y4 E3 [8 P8 [, I, N3 z
|