/* called by: entrance ctrl of the object 'track'" a3 {, _. [. G# C' I
*/* y$ h4 |, p J" ^
is
. E& O+ o# h) ?$ q part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 P' \5 U5 H H$ E
do# ?0 x! M, r/ C, [1 Q4 `4 u
Lan := rootfolder.Internal.Tools.AOLlanguage;
! F; |; e. w( z; ]6 T if current = @.Destination -- else return# m; {" \' R( l
then, r1 }9 P8 v- g7 l6 f; l9 a9 z* y& `. v
@.Destination := void;; W, a a8 m2 H
if @.occupied then' B( x% |# U9 v5 c3 o
part := @.cont;
, U8 E8 r6 n! `+ Y6 ~% a @.transpOrder := void;$ v8 r4 ?9 \9 _3 z, L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% ]# J l+ k' @8 T3 A @,root.eventcontroller.simTime); H/ ^9 c$ N& d7 m2 b
@.HasOrder := false;# A a [1 i: |+ {" J
@.DrivingHome := true;
% h* `: H4 Y w) @5 X rgManager.tryToStartTransOrder;
! P& q% j$ q# { if @.Destination = void3 t0 y0 \2 K: i: `& c
then -- no transport order for vehicle @6 k0 c( F2 C* e- b r& Z5 Q# m0 [) e
@.Destination :=
/ p7 P) s/ Z+ S- v$ M, F rgManager.nearestFreeStation(@,track.~);
# e( ^, [- O) M# L2 m% j- T! Y newDirection(@);
, f. J4 I: j2 h" x8 W$ ` if @.Destination /= void then1 S+ w& G$ J: ^+ k9 s
@.Destination.NumReservation :=9 G: i. N A# o3 K( q5 @
@.Destination.NumReservation + 1;" G# X/ w& t6 x2 x- k7 y" x& _
end;+ I8 }8 E( N% Y( R, g$ A9 t1 p
@.CurrIcon := "drivingHome";
5 a6 b& B1 ]5 X7 w/ o: U% M @.DrivingHome := true;" q) E1 g6 a, p) p: s p
end;
+ _- N1 E& c+ f3 b0 d8 p else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ D0 o) F5 [; `; `$ s6 R# L
part := @.transpOrder;
$ W# q" K# d( {$ b# y2 Q part.move(@);-- load part
' L: E, N; S; Z$ `& s- s2 | @.CurrIcon := "load";
: L' Y+ ~% W" \$ o8 n. n# E, U GlobalDistObj := part.globDestination;
2 O% z' Z( U* F1 H+ n, K assignLObj := rgmanager.rgAssignL;: H8 A: B% h5 d: X
row := assignLObj.getRowNo(GlobalDistObj);" m( Y) Z5 Q: s
if Row = -1 then -- since 704 i& n" `% z' [/ i9 L5 p, w
if lan=1 then
; }" l6 u; z# d: w* g8 O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 g: S3 ^4 J0 `3 D to_str("in der Andockstation: \"",?.~.name,"\""));% x. K/ f" U7 I& _& F# B
else7 O7 e }' D0 K& X. o( w4 M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& e" {1 ^" |1 R, H: n% Z' Z5 } to_str("in docking station: \"",?.~.name,"\""));
$ f( y. n# b6 G7 y( J; v+ J9 \ end;
7 U* \5 y& ] b5 \, { else
0 [8 T: v* D" l1 ?2 S7 b @.Destination := assignLObj[1,row];' F+ `9 Q2 v9 q5 b8 { ~
end;
/ ~9 o# ~' B: a2 ]6 d newDirection(@);
% u6 }3 k* a" q/ ` @.HasOrder := true;* V5 z4 X$ O2 z& J7 }3 ?, X
end;
7 m, {: J5 F5 |7 y( O' k! Q end;7 R, z+ S+ y' R Q. F |
end; -- of the method6 g! l F7 `+ j% r
|