/* called by: entrance ctrl of the object 'track'
0 s' d6 z" z' `( b*/
# s6 \: \7 d; N7 |) gis
% X' J* s x/ T- e. ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' c5 L- c: H' u, O1 Ydo
{3 ]# `; U* {6 `+ P+ M0 W4 @. \ Lan := rootfolder.Internal.Tools.AOLlanguage;
% }% n+ X, H- V9 H if current = @.Destination -- else return
# W% b0 V% E6 v then
/ d) u7 v3 C' u, T @.Destination := void;
( Q$ Z& F5 S; t2 z. h0 C0 [ if @.occupied then
8 B8 y5 r" H7 m: _: i part := @.cont;; q$ H5 s3 O {, l- f
@.transpOrder := void;7 \: Z7 d0 Y% B) `7 F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 m1 G- J9 L4 g2 r" Y @,root.eventcontroller.simTime);, _7 a+ M' q9 F( C. a- [6 R) H( g
@.HasOrder := false;, n! f( c2 u+ k5 J
@.DrivingHome := true;
2 u" D1 z" R2 U2 f$ N) [, h$ N' h rgManager.tryToStartTransOrder;7 F9 }: C3 F2 u) J# a' }: [4 j
if @.Destination = void
4 \/ h; Z8 M% Q( p then -- no transport order for vehicle @
7 W, j) O$ k1 |1 q( Q9 l' }8 A @.Destination :=, c3 B" I& t0 q8 q3 @
rgManager.nearestFreeStation(@,track.~);
! o9 L9 e6 E7 T, t7 {+ P# L newDirection(@); - d$ s4 d F7 x2 Y Z1 J
if @.Destination /= void then
3 L* L1 g: g$ \+ L @.Destination.NumReservation :=
) I; y5 H, q" ?" _0 ?& ~ @.Destination.NumReservation + 1;
p+ T8 F i8 y# _, t( @4 J+ Q end;
; p( B+ u" F; ]7 v) O6 h, X) Q @.CurrIcon := "drivingHome";
# k0 X. @" w o: D4 l) w3 G @.DrivingHome := true;
4 [( B; K# D. J. R, H w end;
. i2 `7 q0 t1 N6 F else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 U- z! ^ F6 ~: W
part := @.transpOrder;9 x/ Q) C! N4 M+ j* `
part.move(@);-- load part1 A/ B" \* u o( i6 ]" G
@.CurrIcon := "load";
$ f' t( V" D, A6 a7 m( c' z9 E; w GlobalDistObj := part.globDestination;2 `( g: z: T v
assignLObj := rgmanager.rgAssignL;
; k- d2 T4 a3 R1 G. n row := assignLObj.getRowNo(GlobalDistObj);
6 x( s- T9 s' \& f8 {9 Z; u# J- z if Row = -1 then -- since 70
. q$ u' Z. [. ?+ n if lan=1 then
" K' M, g$ S2 ?7 v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& A Z# }5 P) r9 B* U6 _ to_str("in der Andockstation: \"",?.~.name,"\""));
& \- y$ X& O' J* I* N' I else! n6 }; F: w7 |' X4 c0 J9 C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), o3 o; R, O! a1 L w; b3 ?
to_str("in docking station: \"",?.~.name,"\""));
3 ~6 i. X2 }/ _ end;
. l; e6 a3 j! e% k$ g l1 X- G else- c M. @! {" [5 N8 M3 D9 c
@.Destination := assignLObj[1,row];
) \, w* M9 V# y3 D% I end; : z }5 v' G+ m
newDirection(@);
( p4 ~9 K$ p. _2 |9 G @.HasOrder := true;
. q: m! B: r+ H* u: J end;
3 c. Q! j- e: \& P( _& r) K3 [ end;
5 R; f) j/ k: e* t* d+ l8 iend; -- of the method, Z% S# v/ l5 r/ y5 F8 ^, |
|