/* called by: entrance ctrl of the object 'track'' X$ I9 `4 ^5 y4 [+ q# w1 ^
*/
! H1 L3 L) m! B& y4 Dis
; P) n8 H' l# S9 ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;* j0 g+ d3 p* u* |( o
do
9 f, I2 t$ U8 ^" u9 f$ B Lan := rootfolder.Internal.Tools.AOLlanguage;
6 c* }8 @0 M- A if current = @.Destination -- else return
3 s$ f4 q3 {" v: S( c( v/ Z' `* y then
) F7 J' I6 W; o" K+ z @.Destination := void;: G" U. Q5 a6 P6 V' z+ j: O
if @.occupied then
1 N- _ J4 \5 r part := @.cont;9 I, D6 b) A* C+ A' N+ u3 c% u
@.transpOrder := void;
" X4 f: z' }/ s$ X1 o; k5 E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: M8 H0 e7 T# b) E
@,root.eventcontroller.simTime);
# b8 \2 w0 F) f H @.HasOrder := false;
! A! w7 P) }- n) ~/ @0 D @.DrivingHome := true;' W) i3 L* X' S( U
rgManager.tryToStartTransOrder;
. h, ~+ E8 s3 \7 T if @.Destination = void: W$ @6 b( p0 k
then -- no transport order for vehicle @
" R% n$ S& O9 E6 j1 e. H! }7 t @.Destination :=8 M" i; q1 Z g# n
rgManager.nearestFreeStation(@,track.~);
" _- M# m6 g. E+ h1 J5 m newDirection(@);
% w. R g6 _) a+ W$ I if @.Destination /= void then
/ l) i6 [* Y/ v r, u! P @.Destination.NumReservation :=6 d9 e2 A9 [/ |3 E1 ~) g3 m" d9 ]
@.Destination.NumReservation + 1;
: {! U; ]' h3 N7 M& \ end;' \' |6 |$ [3 }
@.CurrIcon := "drivingHome";% ?& r4 g& e8 a+ d# n! B! h; d
@.DrivingHome := true;
8 D# v6 d0 Q- A end;
* K' U) e; l; Q. i: p+ o else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 A' n7 m* [# n! [1 L4 _; k part := @.transpOrder;* I; M% e. ^: n3 J
part.move(@);-- load part
8 `) y; ^$ C. A" r @.CurrIcon := "load";
# j* _) a0 q: p: K+ U& ] GlobalDistObj := part.globDestination;
' C/ F' `9 p3 X7 V; [0 y7 q" _, L g1 r assignLObj := rgmanager.rgAssignL;
% \, ^. C$ q5 ]1 u: d& G' e5 V" { row := assignLObj.getRowNo(GlobalDistObj);/ U' b1 k/ i' h0 |4 l
if Row = -1 then -- since 70
/ T8 R9 }' [0 _ if lan=1 then
; G, `" g7 y* G! J' j3 m* Z4 W3 ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# s- C3 A P! i( ~) U+ \9 J
to_str("in der Andockstation: \"",?.~.name,"\""));* z) _' @" J1 c% c" A2 p
else
. U! C( a# }1 c& N7 `7 X; S7 U/ b* X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* @, d3 z$ d. I/ b* y to_str("in docking station: \"",?.~.name,"\""));
/ v7 j3 d, t) C0 q5 T7 I# s' ` end;
" S1 Z9 ~( y3 @3 \/ l6 M else
/ ]$ [2 j# n- g, s0 o; ` @.Destination := assignLObj[1,row];
/ C% T' ^$ l* r! J end;
7 [/ f1 D8 `9 Q8 j2 E! ?; ~ newDirection(@);( x- B2 D% i+ w8 u9 ]( |
@.HasOrder := true;
9 |3 i. @+ Z1 ?2 I end;8 ^+ Q; e3 I$ N; y5 _' o$ N
end;/ Z x& M% o3 x" Y2 Z2 i3 o
end; -- of the method4 r2 v' O& Q$ L* n) a
|