/* called by: entrance ctrl of the object 'track'+ K! M" B, [7 ~: Z2 i1 F& t, I
*/, Z5 t% y9 [; E
is
( A: }5 L% m0 l9 p9 e9 L part, GlobalDistObj, assignLObj:object;row,Lan:integer;; S# p# i* A( G8 ~
do
: E+ C2 {" G+ W6 Z) { x9 ~4 [8 \ Lan := rootfolder.Internal.Tools.AOLlanguage;
8 L! z' n4 C' @) ^/ k8 f! Y if current = @.Destination -- else return0 X' @* d' K4 T1 O; E
then
. R# F; v U ` @.Destination := void;+ b5 s! `0 F. j/ t3 |" m
if @.occupied then4 _3 i- s& S- V
part := @.cont;
% U2 i8 c2 s' g6 {6 v& X8 f( B @.transpOrder := void;
* d' Q2 q7 g2 Z' f; o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* n. A7 A1 h$ g- ] @,root.eventcontroller.simTime);$ n! o* |2 B8 E" h& M
@.HasOrder := false;3 G' C3 H0 Q9 h
@.DrivingHome := true;6 {1 S2 I1 J; ^# I& B+ u
rgManager.tryToStartTransOrder;
- B) x. Y$ @. t& ] if @.Destination = void
" b, y8 [/ |0 ^) [. W( e5 [# h then -- no transport order for vehicle @( W% O7 c L q: I$ @+ C
@.Destination :=8 r9 l m: D7 d; f/ A! G/ ~, n
rgManager.nearestFreeStation(@,track.~);8 f. K* |+ ?+ b% a
newDirection(@); 6 r( [2 E+ S- Q0 X
if @.Destination /= void then
" h% R) K- o/ Z1 o, V+ R* { @.Destination.NumReservation :=5 a9 k2 G; W- I+ ~; [# H
@.Destination.NumReservation + 1;
. B: R1 `2 i6 T2 R7 k* v end;
Y2 y" g0 G- W4 v- j @.CurrIcon := "drivingHome";
3 O( y- C! `/ c, y5 j" N @.DrivingHome := true;
5 U' ]1 s7 }% `; m" Q1 ? end;
8 O0 l2 N1 m5 |! ]& ~2 t+ d/ Q! p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 y8 [7 g: \& o9 w# \0 Z0 `% ? part := @.transpOrder;
8 \( T* e/ |/ i2 C/ c1 f$ p part.move(@);-- load part# x% U7 \* |8 F: V7 U7 X
@.CurrIcon := "load";) U1 @' ^: C4 t& n: I& u" _) f
GlobalDistObj := part.globDestination;9 R' l& l; O# y- z' X$ C3 a; P
assignLObj := rgmanager.rgAssignL;
. U. C3 {# l; b) f4 z' x) ` row := assignLObj.getRowNo(GlobalDistObj);, s/ r' E! I# R' G8 s; W
if Row = -1 then -- since 70
, n+ i9 e1 w. z2 l3 w if lan=1 then
U7 q1 U% H) S9 }/ l/ i) [8 N3 i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 E4 O' C" Q8 T' v! I# n8 W6 h
to_str("in der Andockstation: \"",?.~.name,"\""));
. V: s& B' L. b0 n" H8 s8 T else
4 k7 J: S% i" R* _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% ?$ }; f4 v3 J, M9 D9 P1 r to_str("in docking station: \"",?.~.name,"\"")); A" c1 P; o. K
end;
( K: J& s8 T, R* G2 ~& v. S; j3 X; e3 i else
. ]- v# D: }! W4 u @.Destination := assignLObj[1,row];
' ^# D: J5 y/ N5 l J end;
- W! b( m2 v( E# S6 L, q newDirection(@);+ ^2 c9 H6 f/ H2 |9 w
@.HasOrder := true;
0 o- W$ l$ ~ d. Q end;
7 W& W, T/ _( F* {, n" h end;
9 H) t0 q) W7 fend; -- of the method
1 v/ N* X9 Z# E- ]/ Y1 n. `* X' O7 y |