/* called by: entrance ctrl of the object 'track'
$ B. ?! E8 \8 @: q, g*/
7 A( q6 Y2 w* o0 J; R' v3 C8 v9 his# K( N, b: ^# {+ N3 D& i* k% L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 d' u$ o6 `2 n, Ndo
9 w* l, b" y! J% L% j Lan := rootfolder.Internal.Tools.AOLlanguage;5 o$ [0 D( G. Q0 c3 p
if current = @.Destination -- else return
% g1 y4 N0 U. ^* ~ then
- F, |9 f# r8 F# v: r @.Destination := void;# w/ ], {$ h7 \7 J2 _; s& |
if @.occupied then# f7 e& N' v$ L
part := @.cont;1 ` \3 z' p6 g7 U
@.transpOrder := void;/ ~: {0 Q8 ?3 g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: |6 U$ j6 e: B @,root.eventcontroller.simTime);4 ^9 K; f, q) ^. I. i; e9 z
@.HasOrder := false;
" b! s$ |4 z1 E) }1 U* i9 X @.DrivingHome := true;
) @$ I# E" d x2 S rgManager.tryToStartTransOrder;9 r( [- N. {" a; ~) G
if @.Destination = void
8 J' Q4 g7 f! v/ e% u then -- no transport order for vehicle @& Q2 \" T. X/ Q! C6 y
@.Destination :=
6 C7 o( Q+ c) ^ rgManager.nearestFreeStation(@,track.~);7 x1 C$ V9 R9 i) a( T% m a' j) Y; x$ @
newDirection(@);
9 y7 l4 d9 t! _) F( a9 m if @.Destination /= void then
/ U* m6 }) J0 x) G7 m: o @.Destination.NumReservation :=5 _! m. ]6 K. {* {& W1 w. i4 X
@.Destination.NumReservation + 1;
2 y5 J! p7 |5 v1 h5 [- A, z end;
z) ]. u2 b/ e @.CurrIcon := "drivingHome";5 i D C; H* o( t( c5 E
@.DrivingHome := true;/ o- w( D: w/ Z7 k$ o$ O. R9 w
end;4 s0 d1 q( M) C% k6 f
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) [' [+ |( l9 P6 I5 |
part := @.transpOrder;: c i/ f* s; ]
part.move(@);-- load part! Q7 y9 v: T9 \ F1 j+ }, A6 u! ^
@.CurrIcon := "load";
1 M# u% Q3 z( ] GlobalDistObj := part.globDestination;
1 g; v! L% F4 B5 S! _ assignLObj := rgmanager.rgAssignL;- s. r; ?# n+ F" H0 |/ O
row := assignLObj.getRowNo(GlobalDistObj);0 H* b; }1 a# l8 o1 ^2 u
if Row = -1 then -- since 706 {- G8 q! o0 c
if lan=1 then
$ v7 d) z2 T4 G$ L" n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ S1 M4 ~) t7 K4 F
to_str("in der Andockstation: \"",?.~.name,"\""));
4 Q y2 h& a+ l: d4 r else8 ^4 D4 q% U. P0 f9 ^( y# X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& M e& P$ ~" S1 J to_str("in docking station: \"",?.~.name,"\""));
! a' Y4 f8 |* V. }% U- I8 p end;
# b7 c; ?6 r: i( m& Y/ E else; F' ^! H) M: ~" X; [- A0 r$ J7 g
@.Destination := assignLObj[1,row];
4 l9 U/ v- W7 G+ W7 z l. T end; p* F) e' h* S% [0 q( m% s
newDirection(@);6 {# a9 h" x& _7 E
@.HasOrder := true;
% r$ e/ s9 o" O1 ~ end;
+ {3 U. d" I0 N end;9 ?' Q7 D' Z. [( V2 h0 }6 l
end; -- of the method% F) l6 X5 `, a3 T; s* o( e6 k
|