/* called by: entrance ctrl of the object 'track'
5 }2 Y0 w( k( ~1 J*/
( L: b( C* i9 His4 V7 a2 p* v; j: d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. s( o- ]3 B+ `/ I$ H
do
, U" G3 a7 n5 ~ L+ Y9 j2 T Lan := rootfolder.Internal.Tools.AOLlanguage;
5 s1 Y( b5 F Y. _9 _# A7 S if current = @.Destination -- else return( N/ |) y. o* v; y0 r3 p
then. a X) B1 i0 r% b1 k
@.Destination := void;+ d: R3 X+ ]& r/ F% X
if @.occupied then
3 Z( V8 Z3 i3 w) ~/ g8 \ part := @.cont;
2 [* X5 m' _8 ^. }9 `1 r @.transpOrder := void;+ H5 A+ a- S; Y3 s
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," n! b' ?$ C0 _4 `. R& U
@,root.eventcontroller.simTime);
4 q' ^, Z; j1 t9 A, I I @.HasOrder := false;
) `2 k8 r7 g$ E3 w2 c7 i @.DrivingHome := true;) J/ V! p. V( U% [/ F
rgManager.tryToStartTransOrder;
, N. i- ~. [ z' @" D2 e if @.Destination = void/ Q5 Q9 a, M4 B8 `# \( X5 `
then -- no transport order for vehicle @
4 ~) w: [% ^* P, U @.Destination :=4 P5 d# r- j& @. ]4 F3 ]( L
rgManager.nearestFreeStation(@,track.~);! B3 F, q( p& V7 s& a: g( K: z: X
newDirection(@);
/ y' r+ j# B& Q: ^& Q, c+ i if @.Destination /= void then
" ? s0 x' \, p; F( V9 d9 W- e: W$ P: Z @.Destination.NumReservation :=
( y* f, `3 D* }" x @.Destination.NumReservation + 1;; t8 M6 D5 y: L8 X2 C( J% A
end;
I3 E) ~1 Q5 P8 t; h7 { k1 q; ~ @.CurrIcon := "drivingHome";$ L P3 P. P- ?/ U% O9 E
@.DrivingHome := true;8 C3 ~4 Z0 n/ A/ u/ |
end;
7 ~$ n2 x ]0 ~1 T( }3 S# h$ V& N else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! A3 X0 ~ A% ?1 P% S. x I# Y" y part := @.transpOrder;
. ^- c6 p% a# K1 y2 B part.move(@);-- load part
4 {: Y7 i3 ]4 ` @.CurrIcon := "load";. Z$ _) p% I1 j1 L0 g& x
GlobalDistObj := part.globDestination;
+ i7 P& a% ?0 V" ? assignLObj := rgmanager.rgAssignL;
% _! ^* h) C1 o0 a row := assignLObj.getRowNo(GlobalDistObj);3 _$ j2 a# K3 T2 h: s& J& I
if Row = -1 then -- since 704 \3 \& z: s; W& ~5 s
if lan=1 then
. {$ u3 w5 C6 P5 Z0 Y: ?- x( t5 v( d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; S5 e# S, u6 p& t
to_str("in der Andockstation: \"",?.~.name,"\"")); X* `& t- X0 o5 B; Q5 @
else
; D' o0 x0 y$ o* q* M' g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* j2 k. G h9 w+ H l
to_str("in docking station: \"",?.~.name,"\"")); % {% C1 Y2 H- C1 e( o) q
end;
" u N; f1 R0 H" E else& |0 S+ T4 Y/ f/ d, b9 E# c3 Z6 L# ?
@.Destination := assignLObj[1,row];* z+ Q/ x2 h1 ~( I9 K" B3 T
end;
* G# ]- B( T) C* G newDirection(@);
4 w6 e0 [; \" @6 ?0 ?; J* T6 P @.HasOrder := true;& S% s/ u6 L! H
end;
9 c& b1 Y" ^6 E" }5 M end;
# F0 v: t% u! ^$ q8 g! H0 xend; -- of the method" S O1 [3 ?; k5 u; Q5 G" {. ]9 _
|