/* called by: entrance ctrl of the object 'track'6 }4 M& d* G; l8 t( b4 F( B
*/
2 X6 q, N- J3 C. p1 `6 }is6 L; y+ f8 ^( l" O* L/ m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 x8 z u2 I5 _& d
do
7 l- X& i9 W+ \0 K E3 C Lan := rootfolder.Internal.Tools.AOLlanguage;4 v+ z- s0 P3 l: B6 d" y" C9 [4 N
if current = @.Destination -- else return
0 B3 l6 |7 V7 U1 S, c then9 v; E6 [' Z: z8 L5 N
@.Destination := void;* k* K! ^7 ^" I, H/ r- c! }9 c4 Y
if @.occupied then
& y( D+ B# P- U W part := @.cont;
; i9 L& e0 f9 D @.transpOrder := void;% G5 {( n0 v7 @# r9 x; S2 Y; r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' X) C$ \. u5 D& ?5 w5 t
@,root.eventcontroller.simTime); F$ I9 i/ t, F. D* M
@.HasOrder := false;
% t6 b) k+ r' s: S6 r/ A @.DrivingHome := true;
1 H& x. b+ V8 ?! ^ ?9 h rgManager.tryToStartTransOrder;
* S; t5 v5 H# F, O) _7 B* Y if @.Destination = void
) D# b, [6 Y/ i) j6 O then -- no transport order for vehicle @! s2 I- s$ g" j9 b3 |0 f
@.Destination :=! L, H% L5 F- J3 H* { k; O' r, n( N
rgManager.nearestFreeStation(@,track.~);
% R) N- @$ r5 n. |0 B newDirection(@); * u0 I, R/ ]" O# P9 P
if @.Destination /= void then
- t6 J7 l- a5 }: l D @.Destination.NumReservation :=( i9 A/ ~/ E6 X& J6 D. _+ S
@.Destination.NumReservation + 1;
" o5 K# O% o" R: G, l% R. m end;
8 F* l$ W% r! X" p @.CurrIcon := "drivingHome";
: t f' y3 e$ {, ~! P @.DrivingHome := true;4 ?- i" L7 o9 i' T7 ~$ B
end;) q. `9 i4 t! ]1 |* V- X9 y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( X" g* D6 k0 a1 C, I' [
part := @.transpOrder;# L5 ^2 a, v X8 L8 j4 H3 h
part.move(@);-- load part
9 g$ W' P, B8 M$ ? @.CurrIcon := "load";( o7 p) |- x0 x5 A! M
GlobalDistObj := part.globDestination;9 Y* _8 x5 \/ F! k; s: I
assignLObj := rgmanager.rgAssignL;
$ X2 h f! G! ^, W: I; C) G/ D row := assignLObj.getRowNo(GlobalDistObj);3 j/ _* [- }7 J7 [) ]/ Z
if Row = -1 then -- since 70
3 U3 o7 c/ d) F6 k$ I if lan=1 then
" k7 G& G M; Q1 k6 {# z c3 j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), x4 J" {5 @/ z* X
to_str("in der Andockstation: \"",?.~.name,"\""));. K1 s3 f: n8 k
else
+ v) x5 U) d$ y; f! ?& b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! r; C/ s/ g# Q4 E7 [
to_str("in docking station: \"",?.~.name,"\"")); 4 U! |6 P' e6 e2 d
end;: p, h) t. @+ \1 X; Q
else
. ~; S/ e1 t1 Y; s m Z) Q7 k @.Destination := assignLObj[1,row];
. S7 X: D5 s$ D6 s' ^) M3 @( T N end;
- l: ~0 [0 y- }2 v$ z; ~- @: X) q: R newDirection(@);
3 b5 n' L* O9 R6 v V @.HasOrder := true;0 R7 h& G# A A, ~4 D, y: k/ P" k+ v
end;
- N2 {% x/ [8 [/ ~& L' U9 I0 F+ J7 H end;
8 {, W: u3 u& p5 M" send; -- of the method# s2 J( E# i% V- b. N4 X4 T+ [; J* \3 C
|