/* called by: entrance ctrl of the object 'track'
6 f! E, P0 n I f*/$ g/ r; M/ D" s. w/ g9 ]# w* @
is
- g0 t. t2 r! r4 [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;) R6 ~& _+ x' n1 [1 d/ U
do
1 I% b2 v9 n, B6 Z k Lan := rootfolder.Internal.Tools.AOLlanguage;
0 n1 o! s. z J3 J& o: ]* n if current = @.Destination -- else return) B \, h R6 g. a( ~% y
then
6 Z2 J# ?( U! V, c9 q @.Destination := void;
; F: E6 ^. O$ B if @.occupied then6 L+ p) _- R$ _ \4 G6 z' p, o
part := @.cont;
: k/ h. g. _4 {" d; F# B @.transpOrder := void;
# ]+ S8 L4 j- _: v, T' \ Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 j) A* H5 m c7 n9 Q4 e5 @ @,root.eventcontroller.simTime);& v& Z+ W' r4 Z. _9 _
@.HasOrder := false;
" j& d+ b1 R- }5 s/ N& J @.DrivingHome := true;
/ _! _. F9 m2 K& m* O rgManager.tryToStartTransOrder;+ u$ J( a- s2 I: n# O' t
if @.Destination = void. _$ N m/ d; ^$ [1 [
then -- no transport order for vehicle @
: I& P* S6 W& U4 ` @.Destination :=
0 C/ y4 G) h* N1 J* m rgManager.nearestFreeStation(@,track.~);
) @% Y* a, `$ P& e' I6 e1 Z7 w1 U8 ?, v. y newDirection(@);
- H5 a& y+ Y" A5 Z, |' ?8 H if @.Destination /= void then
' K, U0 M0 q& e3 v* z @.Destination.NumReservation :=
( q: Y. ] k' A, m5 O& n) u8 v @.Destination.NumReservation + 1;4 M; _) x, l( V; Q
end;
" \8 b8 u+ x+ @2 i: { @.CurrIcon := "drivingHome";
# A# r: X O* \# s/ E0 R: L @.DrivingHome := true;
1 P) i# ^) V& i# |1 \9 | end;
3 e3 `6 ~/ L; D G k3 X else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 u) G& K( ^9 a) U/ s8 f# y
part := @.transpOrder;
+ a# X/ p4 C% g7 o! o part.move(@);-- load part
4 R ]$ j1 n2 T \8 ]0 _/ R @.CurrIcon := "load";) q8 {) m4 v2 U5 ^8 `1 ^; r \
GlobalDistObj := part.globDestination;/ V. Y) P+ N- G) R0 y8 P0 V' p$ p
assignLObj := rgmanager.rgAssignL;
1 K3 P1 ~, r6 e' V row := assignLObj.getRowNo(GlobalDistObj);# m* J4 Z8 ]* l$ n6 w2 z
if Row = -1 then -- since 70
2 V1 r8 {' Q- S if lan=1 then' y1 C+ w: V5 G! |! [2 l
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 X. a5 K# H1 E3 D$ O
to_str("in der Andockstation: \"",?.~.name,"\""));5 V& c V- m! J9 B! I
else
% o' B7 ]5 P5 V) v( B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), Q# N; C% q8 P& F, [/ s
to_str("in docking station: \"",?.~.name,"\"")); " |2 ?, D0 F6 `4 \3 y8 K- U
end;& H& e9 r* f$ H) P1 D9 `- V: ?& T0 w, `7 A
else+ c! G3 f% A4 Z, w b
@.Destination := assignLObj[1,row];% V$ b' o& C' x! i
end; 8 u( G# h9 R4 ~- t8 \; j$ A# N6 z
newDirection(@);
' h. f0 X+ w. a2 B2 [ @.HasOrder := true;
# u5 ^7 S, _6 } end;/ J9 _; D0 o1 @0 i! K1 s0 x
end;
- l! m+ W) D7 J$ W/ j$ Yend; -- of the method. Y% A5 t* n, e1 E
|