/* called by: entrance ctrl of the object 'track'8 g: k& ^) x2 C5 Y4 H1 r
*/* Q" S& E, u1 O( M6 S
is) C1 p/ E) R( [! @/ X2 `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% |9 _1 F$ S1 S* H: S/ @
do
5 t8 X" h- f- Z# k0 r# W% t) b* m Lan := rootfolder.Internal.Tools.AOLlanguage;
~" f' U. c2 [* b( L- r+ I if current = @.Destination -- else return
9 L: [& {' n. w$ w. p then: ~; R' ^1 S# [- U2 E
@.Destination := void;
" O1 {* z/ ^+ ]- x7 B3 n if @.occupied then( k. @* ?5 b. l- u Y
part := @.cont;5 z% o; ~/ @( A$ j- d+ A% {0 [5 r
@.transpOrder := void;, Z1 A% E9 b. p2 B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; s0 Y; ]2 S7 N" ~' d X$ ^% y% f A @,root.eventcontroller.simTime);
' N+ o& i* P8 a @.HasOrder := false;( @* D: N+ W+ f
@.DrivingHome := true;
. w- H1 P8 q' S9 u rgManager.tryToStartTransOrder;
$ e7 W1 y0 `8 i7 @+ Z if @.Destination = void
& H" z( L) ?+ Y1 A0 \# E* U: ~8 }/ v, u then -- no transport order for vehicle @
+ X+ \! H8 M6 y4 i' A# I @.Destination :=0 _- E* \" {( R. o
rgManager.nearestFreeStation(@,track.~);: T0 g, F, c8 B8 w
newDirection(@);
" w f# S0 G" `) }! @ if @.Destination /= void then
* f# s2 T) |7 S* _& V6 P4 G, x, Q2 v6 L @.Destination.NumReservation :=& p+ z) G- J) `$ E0 u1 v( f! ^
@.Destination.NumReservation + 1;; M, [( T: k {+ H. d
end;
) U7 e, P0 x4 ~ @.CurrIcon := "drivingHome";
- W& \& y( x" I. g @.DrivingHome := true;- j8 _ @9 g- X2 y
end;
, e+ R0 f" o. a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 u k! }* M/ I part := @.transpOrder;7 A" F; F8 M1 v. k5 g
part.move(@);-- load part" l3 U" W, }" x' s* a
@.CurrIcon := "load";
6 Y& }2 J5 o3 M! k GlobalDistObj := part.globDestination;* O" r/ _: n L% g& M7 r! D
assignLObj := rgmanager.rgAssignL;; G: x, o5 j5 D2 u- ~: m/ \" j( W
row := assignLObj.getRowNo(GlobalDistObj);' t/ f$ ]; L3 l
if Row = -1 then -- since 70
! F' x4 I, y: e2 a3 A$ Q6 B if lan=1 then, } Y: c: N% C7 A" @% ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; j' B7 g/ R( _& \' ]& R* i
to_str("in der Andockstation: \"",?.~.name,"\""));/ H3 s/ M; J% `( Z+ p7 Y
else* K3 f4 d5 |7 r2 [+ ]* X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ o3 z8 P6 K0 `- G5 R$ G
to_str("in docking station: \"",?.~.name,"\""));
3 R: _ y0 i! z8 a9 X! S+ H end;6 O% r* ?$ L+ P) q6 J1 O$ Y& R
else' X. d( F) \" N! B" J
@.Destination := assignLObj[1,row];
: W* ~/ B0 {" _ end; ) O8 j8 B: B( t% K% k: n l
newDirection(@);2 g; \. B% l2 ^
@.HasOrder := true;
% p4 N" o! H- V end;
$ C' G1 M2 i; k( X( P end; Z* G/ e; Z* _9 q
end; -- of the method R0 I* ?# Z- ?1 g* G; h
|