/* called by: entrance ctrl of the object 'track'
+ i1 |4 W- X( X, O*/) N5 B2 _! N& U# U' v
is
" P8 E1 b* j0 F part, GlobalDistObj, assignLObj:object;row,Lan:integer;; _! G& m' B) C9 W
do' k4 Z9 |7 \1 g& z- v& @
Lan := rootfolder.Internal.Tools.AOLlanguage;: M: c+ ^$ u; y2 S/ G* ]7 H
if current = @.Destination -- else return
% x) m. j- } Y2 S, l then o2 L2 U7 |2 U
@.Destination := void;
$ o8 Q' V# T, M" l( s if @.occupied then3 Y. _$ D8 E( F* m
part := @.cont;% i$ }4 Y9 `* ~$ B' U+ z
@.transpOrder := void;+ b1 G6 ?9 i- p& R& s+ l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! q( r- Y" C4 R' L u4 M
@,root.eventcontroller.simTime);
- l. T2 z9 Z, S @.HasOrder := false;! z. u! c+ Z- r
@.DrivingHome := true;5 e4 w6 e- n+ U, M. H* L
rgManager.tryToStartTransOrder;
' |( l1 H$ }2 {# Q4 q if @.Destination = void% }' k$ w s# ]& Q- R
then -- no transport order for vehicle @
( U' c r( {- q8 B2 D# }- z @.Destination :=
! s. i+ s& s9 m# {# R$ H& U% J rgManager.nearestFreeStation(@,track.~);! f, G! F$ @6 E0 |1 e! F
newDirection(@);
: D7 A- A/ Y- i: ]; T$ Y9 U9 W1 c if @.Destination /= void then+ a. o7 ?; }0 B' l/ m2 v2 w
@.Destination.NumReservation :=* h4 J/ j" o, e* m6 n
@.Destination.NumReservation + 1;, e( Q" O- a6 R
end;
) c {; X/ g) d. S- G7 W8 H' D4 t @.CurrIcon := "drivingHome";
/ M, J. |0 R8 U8 J @.DrivingHome := true; z4 h% V( ]$ b
end;7 J" t& }* l5 Z$ ]3 L# ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: [" m' o) d9 i8 `% \
part := @.transpOrder;
/ ], O* y' v$ I/ o* z3 u part.move(@);-- load part; p4 l! Q: d1 L- h/ P6 l
@.CurrIcon := "load";
* F7 k8 H( \8 ~ GlobalDistObj := part.globDestination;3 T- _9 g" o% b& [
assignLObj := rgmanager.rgAssignL;9 \ q6 Y0 v; P$ X
row := assignLObj.getRowNo(GlobalDistObj);7 r& y# C, f8 A, p+ p, }7 ~
if Row = -1 then -- since 70) Y' S" M5 A& P5 ^6 r* U. s
if lan=1 then
9 s5 `- h! U. ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! y, c2 y$ Y m, ?( Y3 _- e( i2 s to_str("in der Andockstation: \"",?.~.name,"\""));
- {; U( C( ~% b3 J9 b2 ]# u( a else
. L, W2 P$ r7 X( g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, B8 d! {' D3 x- s" Q: l) H
to_str("in docking station: \"",?.~.name,"\"")); / W; T5 E. J7 a& V- C( d' _; a
end; @3 S+ u! U. D. P7 P7 \9 Q, J% g
else
# X: L- h; G6 ?2 A4 B9 e/ ^ @.Destination := assignLObj[1,row];4 q' C6 `2 I$ x0 d
end;
1 b& o" \# U' k2 q& G newDirection(@);! k4 X0 Z- A& l& f
@.HasOrder := true;, E; _* g Y, j! E6 u
end;
1 `1 u+ |4 r: t' W+ H% C. `. f9 R6 l end;. M* r& W/ ` Y$ R0 o0 P
end; -- of the method/ W9 s- ]7 v- k& K
|