/* called by: entrance ctrl of the object 'track' d* X' L$ k* U/ g7 ]
*/
5 P5 X) F Q: y! Q. z6 U8 h- [+ ?4 Mis" M9 H1 h0 U6 M( b/ {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 W. P$ W. s0 ]7 M/ g0 o
do3 k' `6 h& A4 l8 L/ ]4 x8 d% b
Lan := rootfolder.Internal.Tools.AOLlanguage;! U% E& p1 K" }1 `' U
if current = @.Destination -- else return, h% s4 C% }* e1 \$ o S
then
2 r2 a- h* [0 \9 K8 j1 j9 m; _0 R @.Destination := void;, A0 r/ h0 V3 b, t8 q& c
if @.occupied then+ m: h2 I4 m" T* {! T9 j
part := @.cont;* a% q U2 r/ M1 }7 t/ M: \
@.transpOrder := void;; W3 O$ A* G3 @3 q' G. N2 {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 [3 v: [2 i, s5 |+ g/ A @,root.eventcontroller.simTime);
p/ c O, i' ~4 |! C @.HasOrder := false;
: n1 G/ ?3 i" M; V. E& Q @.DrivingHome := true;' i* R) W! M" {' B/ _/ l0 ?
rgManager.tryToStartTransOrder;
3 l& q) I$ j; y4 \ if @.Destination = void4 K4 B& m7 A8 c6 F4 E+ E' l
then -- no transport order for vehicle @0 v+ `: T6 p0 U0 `! A& H3 C
@.Destination :=
' }" E) o# O! D! n+ d+ \ q, U rgManager.nearestFreeStation(@,track.~); o, N* R* b3 Z% M
newDirection(@); 4 F! `% a/ C$ r9 \
if @.Destination /= void then
" n* |& S" l+ L z' } @.Destination.NumReservation :=2 L' j4 L' _8 I: E) m4 s
@.Destination.NumReservation + 1;
% }* {/ i; g) M& U# c end;
. k. X+ |+ Q" @4 b' E9 V, D: ? @.CurrIcon := "drivingHome";
1 J& F, |1 A* l# p! @ c; y @.DrivingHome := true;6 p: |; c1 _' R# o
end;+ u" N0 U% l1 c& M$ n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 W3 \4 V9 F! B/ G1 i5 `* z @
part := @.transpOrder;( }2 v6 F+ g) b8 S* \ \
part.move(@);-- load part
2 U! }. D0 r9 M3 R& W @.CurrIcon := "load";
# b' p+ ^8 F( @' D GlobalDistObj := part.globDestination;
3 a( \- v8 N1 P, \5 T# f assignLObj := rgmanager.rgAssignL;
3 A# T' {/ t# l1 f0 k* e2 c8 E+ Q row := assignLObj.getRowNo(GlobalDistObj);$ [3 e5 f' P9 Q
if Row = -1 then -- since 70* @$ L: u/ E1 {0 k+ F3 E
if lan=1 then
C7 h% ^$ E& W4 @$ o8 t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 ~" _; f$ d- ~4 B0 V- R2 W6 d
to_str("in der Andockstation: \"",?.~.name,"\""));+ a/ R$ D4 l, { {1 U3 h3 Z
else
. O# l }* i& D, A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: s. y% j1 w; P to_str("in docking station: \"",?.~.name,"\"")); 0 N! b) [) I8 f& H
end;
& G6 S7 B9 \& H2 z/ Y else
8 r. T/ C0 s4 p% L1 s# L @.Destination := assignLObj[1,row];
1 u: e9 B: f8 w end; . O6 c8 a1 A& p. p
newDirection(@);8 J: f1 j. A. o4 ?! h0 X) ~6 o
@.HasOrder := true;* ]' |& d) e2 u g6 x) V/ V# \' N
end;. R' v4 I- R' I
end;
0 [# o* P7 K6 N+ bend; -- of the method
" D! A! m% l H4 C" Q9 f |