/* called by: entrance ctrl of the object 'track'
1 \8 k6 \/ e D0 o& e6 B*/
( Y3 v9 J+ X" U8 V! G3 O* Z% Bis% I% p+ B4 E) g5 ]7 w* X$ o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 j* l3 {2 T4 h1 R
do [: d1 H# z% X# R1 t$ T9 x4 _
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 p+ s- p2 t/ y' A- h) X( Y- t if current = @.Destination -- else return
* b3 r' h# Z" r) n then; q/ ^& f* q# f
@.Destination := void;
& g5 B: b4 q' x1 [- B if @.occupied then* a7 l$ ~! J h8 i- R* d$ e: |
part := @.cont;
) A6 F6 Q- S4 F' A @.transpOrder := void;2 r( e+ P( N) z* n: u4 A B( E- P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. h9 |8 D0 T# j) a) S @,root.eventcontroller.simTime);% Q0 g; D. H: ]" D7 d
@.HasOrder := false;; s0 q6 d, K) O$ \- x# B
@.DrivingHome := true;( m3 Y) X* f( b' f2 `. i
rgManager.tryToStartTransOrder;
) e! f0 D; ^' g2 W- l& F5 m if @.Destination = void
( V3 N- I. p8 f, ^! }: r% x$ Q, V then -- no transport order for vehicle @
. U4 C+ i1 @. a U1 @2 d. l# A& t% A @.Destination :=2 P0 R1 T4 b% U' ]6 e" @
rgManager.nearestFreeStation(@,track.~);
/ c: a# q5 ~2 _, X0 x) H newDirection(@);
3 W0 m6 S0 c* G- j b! z) [. l9 r- P if @.Destination /= void then. U0 x9 D9 K; | ~; \5 X; I& Q
@.Destination.NumReservation :=. Z% b* {! a4 x/ D# w: k! h! }
@.Destination.NumReservation + 1;
% P% W3 j! C% N end;; ~$ O3 i! v& ?, F
@.CurrIcon := "drivingHome";
[' b& y5 O- c( m& Q @.DrivingHome := true;' A" q+ ^. X8 H' ?' ?( Q: L. H
end;# I- s M8 i+ r, F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ I4 Y4 p6 a4 Y( f$ j& c part := @.transpOrder;4 c8 D* s7 J) }& I! s5 S' l
part.move(@);-- load part" P6 L. u6 c+ N* n2 x
@.CurrIcon := "load";$ v5 x5 ?$ c+ z- B: i
GlobalDistObj := part.globDestination;% Q( C9 M8 x% K! N' G" u* x' C
assignLObj := rgmanager.rgAssignL;) E% B6 v H& E; H) e
row := assignLObj.getRowNo(GlobalDistObj);/ X1 ~% F. s+ m' N5 F
if Row = -1 then -- since 70
5 m1 c7 I! |6 V* l if lan=1 then3 b8 j* g0 v. V0 y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 A, a* M2 b+ P! y5 D7 F3 T" R to_str("in der Andockstation: \"",?.~.name,"\""));' o' [3 O8 k/ H2 f9 y- u" ] \: ~: {
else
: s, b: X; C I* H8 e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: d* K( s2 S x- G to_str("in docking station: \"",?.~.name,"\"")); ; [! @- g% {3 M1 _7 d% A
end;
4 H, x; G5 _' f) x2 J else
( K+ ^ J# {. I: ?0 ~ @.Destination := assignLObj[1,row];
# v. ^# ~& u1 G4 @6 q end; 8 E) o# _9 y y9 m
newDirection(@);9 _) d$ m* l- d" B+ j- q
@.HasOrder := true;
# F6 t8 w f s3 W) [ end;. g1 J. U0 C1 E& f
end;
' M1 S/ g, f$ p5 Aend; -- of the method8 @# j2 n$ `& O5 n" G7 S$ f
|