/* called by: entrance ctrl of the object 'track'2 R7 l- @9 @# H8 V9 R0 z9 }/ Z
*/% g1 H) F' b' c2 W
is
9 X% s* L( V7 `) d$ d2 Z' G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 D( N) b$ [: I; F9 ], J0 ?do
3 n, S9 m! `2 S" x. Y Lan := rootfolder.Internal.Tools.AOLlanguage;
( D" [1 M) j$ M$ I if current = @.Destination -- else return
7 s) V/ V) X/ r d/ |5 S7 W' g then: V4 ?7 z; O! L% N
@.Destination := void;
- U* j( }" s' C' S' i+ U if @.occupied then' M( w$ q& S: m7 L2 y( ]* _
part := @.cont;0 J8 a! i6 }8 Q. J
@.transpOrder := void; y: W4 u% }* m* f0 I; Y Q5 ?6 M, T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) Z: j) j* m% C1 A8 B @,root.eventcontroller.simTime);! _0 A! [" d8 G! S" x
@.HasOrder := false;. Q2 B% x5 r- ^0 ~+ a
@.DrivingHome := true;
9 I, j4 y/ t2 b, \/ D0 T: r rgManager.tryToStartTransOrder; |: V- X V$ v" n; C8 }
if @.Destination = void
2 J( a# L, S. X* F then -- no transport order for vehicle @
1 L1 C8 s5 k$ {/ @- F# {6 D0 [ @.Destination :=
! `; W! _6 p4 X rgManager.nearestFreeStation(@,track.~);
3 D5 E5 J/ t; E8 F* \; y newDirection(@);
O9 P7 H$ W+ j5 c9 t if @.Destination /= void then+ `. L' Q. D$ X
@.Destination.NumReservation :=6 ?3 Y8 R0 K* z6 L
@.Destination.NumReservation + 1;
7 `) y# S# m0 p& B end;! w1 P1 G2 }1 N( D. p: B
@.CurrIcon := "drivingHome";
4 U2 C* @" W$ m$ J% } @.DrivingHome := true;
$ f$ q! _( a: C# Y end;
! Y9 U% a4 B3 J else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ a4 f* y- ^" h part := @.transpOrder;
) g/ c: s, J, k# }: o/ Q part.move(@);-- load part
F1 F# e, ]7 t$ ? @.CurrIcon := "load";! f. Q9 x" L/ P( z& o) {4 v& ]
GlobalDistObj := part.globDestination;
% |/ [9 F4 b" j! A5 f assignLObj := rgmanager.rgAssignL;- d! N5 L$ ^! x! C c- i6 c0 j R
row := assignLObj.getRowNo(GlobalDistObj);
. O' Y7 T- v, z8 N if Row = -1 then -- since 702 D1 T4 S% B; @/ w
if lan=1 then
& @0 H+ m. g" y6 b4 |4 ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 @6 J/ y4 O7 f% g9 a
to_str("in der Andockstation: \"",?.~.name,"\""));
7 m! a# p$ f& O L else
6 l! [0 q, G5 I# q: @; Q. k* s c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 l' P/ o8 f5 B
to_str("in docking station: \"",?.~.name,"\""));
2 X; q2 o# C5 J9 L" c end;* T. L/ s6 C) M5 n1 ], c. f1 f+ \
else
3 X3 Y, R; {' I% n9 O9 g' y$ m @.Destination := assignLObj[1,row];& A# u1 f3 B2 k, G
end;
3 F& y- i: }" D9 k4 d! l7 b9 R5 a newDirection(@);5 K4 C' y% V3 }" U: m( c" v( m0 R
@.HasOrder := true;6 C+ c: o: p/ Q5 Y8 x
end;: L; \4 s T2 f9 Z$ ~# q/ b
end;8 P# D+ t* Q3 V" N4 |4 s7 d
end; -- of the method1 M' B4 r# P U
|