/* called by: entrance ctrl of the object 'track'
& s8 h9 w+ U9 I4 k4 }; f*/" p6 Y5 R0 a v6 i
is
% T) o# f. }+ U3 L" |2 s, L! | part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 L/ a4 s2 C9 U- r6 g
do4 M- B: Y) @! V* m( v
Lan := rootfolder.Internal.Tools.AOLlanguage;
) J% i) e. \; p) i if current = @.Destination -- else return
( g, I$ S/ {9 H) X# m+ B then
7 [5 x# e5 M. H7 j$ r7 ^ @.Destination := void;* g a8 L# |% p( F- \& {
if @.occupied then
. O w c9 Z4 y9 s0 l6 C2 ` part := @.cont;
, w' Q% n/ s4 N# v3 F- K @.transpOrder := void;
" `: l! R) v; Z0 \7 H* k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ a$ X1 T; M7 e @,root.eventcontroller.simTime);' L) t. I( y4 H3 S! ~
@.HasOrder := false;
, f9 e$ {8 W3 q0 S2 ` @.DrivingHome := true;
5 W( e3 y& Z8 K9 V3 Y rgManager.tryToStartTransOrder;
" ^6 {2 R: t. m4 g7 k if @.Destination = void
6 A# C z/ N) }: M. Y then -- no transport order for vehicle @' \ f& G0 o. w, _
@.Destination :=$ v5 H% v6 @4 a- H- P: q
rgManager.nearestFreeStation(@,track.~);! d6 J, r. x: K* f% D- v: i
newDirection(@); 3 y2 f7 k& x! m- T
if @.Destination /= void then
O1 M# Q9 [; D1 r; r7 i @.Destination.NumReservation :=
b/ p+ ?3 F9 j' H# O$ q6 V @.Destination.NumReservation + 1;
# F1 ^, q Y i5 x4 d end;4 i& l9 g+ o/ B, D
@.CurrIcon := "drivingHome";5 H6 A% g' I, Q+ j
@.DrivingHome := true;% P- q3 O% X4 [4 u; Q( o/ `
end;3 I/ z3 o1 Q8 u7 H% t! m S; `# p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 u6 p F6 L# B3 ? part := @.transpOrder;) k. h0 g3 H0 u& S4 {( e" T( J
part.move(@);-- load part
# @0 d" l+ o; Z4 P% s) x q @.CurrIcon := "load";
0 l. u: b! [$ y6 s: R3 z: r4 x GlobalDistObj := part.globDestination;5 L$ D! [" J2 v% B+ j- ~# t" D
assignLObj := rgmanager.rgAssignL;
% S2 P; [: F" ^9 {5 ?/ b row := assignLObj.getRowNo(GlobalDistObj);
5 g* U# z/ f9 X8 D; I3 G1 F, a4 p if Row = -1 then -- since 708 X8 S2 p: d2 N( ?& ^0 O$ m
if lan=1 then
9 t j( c5 {2 m' N b4 ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: \ A+ H% w6 X: Z# [: f7 S+ L& |) c to_str("in der Andockstation: \"",?.~.name,"\""));
( o& Q% D; W# r2 F else8 T% s; h3 A3 _6 v" X7 g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 d7 @) P B) W4 n: v2 W: ^
to_str("in docking station: \"",?.~.name,"\""));
' ?& E& H& ^, L4 n0 a2 J! |2 N" T end;
" ^& M) }( s- ~& w( n else
9 I, K0 r$ @& a+ `: t @.Destination := assignLObj[1,row];" o6 T' t3 ?3 D1 s& H y) G
end;
: A- E' y3 P* U newDirection(@);4 Q7 h; ~4 m* Q1 J
@.HasOrder := true;
, x$ K2 M5 o2 a" d$ G! ?0 I! Z end;
$ H, B! Z% F4 M+ S end;1 l% s! `% k+ D6 n/ ? y4 \
end; -- of the method3 I; F4 C: C( T( O# K* F; M; s9 g
|