/* called by: entrance ctrl of the object 'track'
4 [; S6 M7 H0 c8 S& Q/ ?* \0 H*/
+ o" o# k! ~; b5 A) yis( Q( u' e( ~# U! e: ^ ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! B5 O' o* @* O& W7 X6 R1 [7 O
do
/ `* r: q5 \. y( s) l) U, r Lan := rootfolder.Internal.Tools.AOLlanguage;7 H9 Z3 }/ P( ?0 K
if current = @.Destination -- else return! w7 |- t* L4 X. L; I6 K7 W
then9 ^( M( E: x+ ?
@.Destination := void;6 a1 i5 b x% p+ g" n
if @.occupied then
& b* {) q, X- f9 ~: T1 m2 A part := @.cont;
* \4 y1 o; e$ t; x% h; s+ J+ F @.transpOrder := void;
' f" n5 C3 b3 D* E3 y" X0 D; [7 l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" q1 f/ s2 v c! j @,root.eventcontroller.simTime);
) c3 U+ o$ y& X9 M4 b; O2 F @.HasOrder := false;9 G& h. I9 z5 U3 U: [2 a$ J% ?) ]
@.DrivingHome := true;9 |* a. N6 ~) H. \* A
rgManager.tryToStartTransOrder;
0 J* @; Z4 P3 v- Y if @.Destination = void# ?9 O7 Q& w" b: Q3 B
then -- no transport order for vehicle @& T' z* q1 o7 h+ t6 H- Z- o9 R
@.Destination :=
% J/ ^* Z8 r# C9 J rgManager.nearestFreeStation(@,track.~);2 |' R+ \' E5 ^! f
newDirection(@);
' a$ L: @+ l9 h% ~* K2 j if @.Destination /= void then; R" @+ L5 M1 A" k- o2 ^! `
@.Destination.NumReservation :=7 Q3 A* F/ t2 t
@.Destination.NumReservation + 1;
4 z! {; X9 C+ b! @- ]9 G end;
0 l, o! [( I- N2 b0 _' b2 x9 R: o @.CurrIcon := "drivingHome";: Z( a- z) M" W' N% U6 Z* z
@.DrivingHome := true;' N& n- i9 m' T& @. S
end;: T! ~' g; F7 o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ X7 C+ W# y" |4 A part := @.transpOrder;
4 c. _5 N1 ~* T3 H- M9 {% R part.move(@);-- load part
* v9 i& {! ]7 b' B0 A! L- s- D, i @.CurrIcon := "load";
# n" z3 u5 c: }/ Q. b8 y2 s GlobalDistObj := part.globDestination;
1 J! N. p, P1 K& \7 Z" k assignLObj := rgmanager.rgAssignL;
5 }; _9 x, V8 ?( T; x$ { row := assignLObj.getRowNo(GlobalDistObj);, g6 C9 K, G: Y, i- d
if Row = -1 then -- since 70
8 Z8 Z. J) Y7 C1 i+ x$ T) C" \% k if lan=1 then
9 r; s! h, {) c$ ]- U4 {; F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- K) u- F; X4 t# H! H3 z% E
to_str("in der Andockstation: \"",?.~.name,"\""));5 D. Q- t. a# f6 X5 e6 N! \/ d+ t
else3 [1 K6 u: f/ O! Q+ M$ X$ X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% {) t4 T, l3 j) {9 b% P to_str("in docking station: \"",?.~.name,"\"")); j% \, z; N" Y9 p' e
end;
7 p8 X* N7 \8 q else
: _; d; ]& n, L, {! ~) g @.Destination := assignLObj[1,row];
* t9 M7 g4 T! G( y2 p end;
6 k: @ {! o" o$ C0 H9 i newDirection(@);
5 l x) q: T' d3 D# Q6 A @.HasOrder := true;! U% x4 n) q5 u: }3 I- j. }2 I
end;
1 k# R! n1 [: I& f! B# k/ g end;1 a1 t1 p3 \/ M; S' H* n% [
end; -- of the method6 c8 R4 I' a5 C/ W
|