/* called by: entrance ctrl of the object 'track'
0 n& K3 j$ x; a& F4 v/ _*/
' \2 i v1 u6 _9 k" u. jis
% m6 L9 }; F& h. A) a5 s part, GlobalDistObj, assignLObj:object;row,Lan:integer;" A9 \: Q5 j2 W' O( g
do
" n: R+ F3 E9 j2 H( |/ y' [ Lan := rootfolder.Internal.Tools.AOLlanguage;& X( B+ }: W0 D2 x
if current = @.Destination -- else return# V) \& F/ X7 `4 j$ D; T8 n2 h8 t
then
0 E1 z+ `- r: W7 { @.Destination := void;
" |( p; B5 K2 j9 w! L% b5 _) `1 m if @.occupied then4 _0 w$ _+ w9 n5 J
part := @.cont;
: d6 o P& h$ G5 M' u/ F& q2 T @.transpOrder := void;( v, X3 i# m- j' H7 c% k; n9 L+ h0 s
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ v* z. J% H$ z$ |2 C( T, L @,root.eventcontroller.simTime);$ J* \- Q/ `- o: S
@.HasOrder := false;
7 n0 S1 g4 M" Z" g/ {! N6 f @.DrivingHome := true;# `: j0 k( Y9 O- O3 D2 p4 V
rgManager.tryToStartTransOrder;4 o& K6 z, q* E
if @.Destination = void5 d: \$ C! c- ?2 g
then -- no transport order for vehicle @
' U9 f$ `+ A8 ]! D8 ?! V/ ~$ Z; ~$ L @.Destination :=
0 ]2 r) M/ |* d7 n0 `- S' @( n K9 q rgManager.nearestFreeStation(@,track.~);8 L7 p5 [% W. D: @- y
newDirection(@); * t* A6 m* I4 j. G
if @.Destination /= void then3 x5 W9 j4 K5 v& b9 f
@.Destination.NumReservation :=) u6 e& Z. U+ v- O; }! j
@.Destination.NumReservation + 1;
$ u9 L2 t0 i( o7 P, \8 a# X- B end;
1 ] _6 { K) I0 v. ~1 Z @.CurrIcon := "drivingHome";
7 k' Z, l' _/ b+ I. r f' k @.DrivingHome := true;& a1 J0 r, R* E
end;
' P5 @6 Q4 Z! I9 @# J; ^! { else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 i- X$ V/ Q. ^+ d1 s
part := @.transpOrder;( Y5 w$ |# N) x7 f: D% O
part.move(@);-- load part$ ^) ~7 M2 f) v& d" W) c1 Z$ Z- f1 E
@.CurrIcon := "load";
! ]3 d$ S4 Q( Z" p+ N GlobalDistObj := part.globDestination;
X: H: n' e% b+ M assignLObj := rgmanager.rgAssignL;$ c: C* t' q0 z& o. v& q
row := assignLObj.getRowNo(GlobalDistObj);
. ^$ |0 C6 M1 b1 P/ h if Row = -1 then -- since 70% _! ~6 F4 G9 N
if lan=1 then
9 H5 h' `2 j/ Q# C+ J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 I) i4 g8 D7 S6 ]* T& u1 d
to_str("in der Andockstation: \"",?.~.name,"\""));1 u$ J* Z Q% A; k5 G) P
else# |% g; |: D- e: {. T' i* U" G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- ~ d" j' h' p0 B! \- f6 K5 s* I
to_str("in docking station: \"",?.~.name,"\""));
" g( R0 E5 h+ Y& P' h3 _ end;( O: o5 k/ P2 q4 `
else. e8 X& A: c5 [/ o$ ~/ ?
@.Destination := assignLObj[1,row];: B% O9 m: u {0 E7 z
end; / R: J' s) K) [2 @! s: H
newDirection(@);9 n* e& G3 j! V, T
@.HasOrder := true;9 m8 t, o) N3 z; J
end;' F6 G: }" B& a7 D, Q/ L
end;% L/ A, ~3 |. c, r3 `3 T5 [
end; -- of the method7 N" E- o( j$ W
|