/* called by: entrance ctrl of the object 'track'
# @- z8 |/ X. W) z*/
1 s0 F: \$ E. \' C$ @ j# r vis
x& h H n& i- T) K part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! [7 g" W5 }$ v& M# n0 r- A) ydo& c" u2 W' ]) R" h n* ?* V
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 Q& B6 A" H$ O6 b if current = @.Destination -- else return
& g9 ]+ Q0 H" @9 f then
, r" K/ b( [; X) q6 Q6 s3 k$ l3 F" r @.Destination := void;- n @$ A8 t7 Y, o+ Y
if @.occupied then
- j4 X4 X% d1 h% X6 H. W3 e7 `0 {0 P part := @.cont;! y" J* ] g+ C7 Y( L' E
@.transpOrder := void;1 Q# s' {6 A# c m1 O: Y; Y4 D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; @" F3 u( h1 ] q: f @,root.eventcontroller.simTime);1 m4 ]. W( [$ C9 V
@.HasOrder := false;% o+ h1 _. n9 @4 {' r; t3 ^
@.DrivingHome := true;
" b6 N, j1 V/ m* H: o' L$ ~$ x6 l: C rgManager.tryToStartTransOrder;
/ n5 z2 l+ j: \: v3 K# C0 }8 w9 ?) P if @.Destination = void
0 Z* G$ n" O5 Y; @7 [5 i! _ then -- no transport order for vehicle @
" G7 j2 W+ V& i2 M* u: L( n @.Destination :=
& i' S' j( \% k/ z3 y8 b6 S; Z' s! O rgManager.nearestFreeStation(@,track.~);
, [3 n& |% n3 D) G, u4 v newDirection(@); 2 z' o' W4 o3 X6 r
if @.Destination /= void then5 X0 ^' @+ i, j& f; ]
@.Destination.NumReservation :=
9 h7 r1 u' j- l0 t @.Destination.NumReservation + 1;7 ^; x4 L6 x4 n2 B: B
end;& X& b3 E4 M$ u; C/ s
@.CurrIcon := "drivingHome"; x% T% B) u4 m
@.DrivingHome := true;
k4 b* Z Y& _" { end;
7 O; ]+ ]" x9 n* u* ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station
u) c A4 B2 V9 b, Z3 t: x part := @.transpOrder;" K; Q, t$ u6 j8 t$ _) b0 H. g- n
part.move(@);-- load part
0 T) j" L; s1 J/ B @.CurrIcon := "load";0 X i/ ^4 L+ ~) ^: Z! B
GlobalDistObj := part.globDestination;
5 H$ j9 Y& [# G4 m. h5 M ? assignLObj := rgmanager.rgAssignL;0 x' M5 F% V: i: i
row := assignLObj.getRowNo(GlobalDistObj);: a8 B2 j y, L8 N+ X, I' F% B
if Row = -1 then -- since 709 t4 Y5 I6 R- P9 G. w
if lan=1 then
7 L- j8 H7 t/ {) N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( C! G- X! ^4 m A4 H% h+ v; G5 { to_str("in der Andockstation: \"",?.~.name,"\""));
( R( ^ M2 F4 W7 Z% l else
. d3 I7 \# u, Q9 G7 f$ J& G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," d, j% D- ]' h( X6 ?
to_str("in docking station: \"",?.~.name,"\"")); 2 r+ ]# }$ t8 J, s; L/ E( i. H3 R r
end;
; K5 y$ s) F8 ?9 d else) H6 h3 N) Y: b8 b' T7 R' s
@.Destination := assignLObj[1,row];! z" }% Y# A* ]: s9 z; ^. B
end; 4 i/ B" w$ g# s5 N
newDirection(@);
% X* Y5 E, Q5 @% v8 v @.HasOrder := true;2 z$ X8 r6 q3 i# z E* i; m
end;
! m' u+ ]8 l. q7 l! i end;
1 b7 z% H) c w; F, Y5 G- S, mend; -- of the method8 Z$ I! g6 X. j
|