/* called by: entrance ctrl of the object 'track'
6 |$ c. X/ q. C3 ?- h*/
+ n9 C5 U1 B$ q- q& O6 tis& ]/ r' g3 w8 v( y b( J! d& l9 [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& F4 ?. T; ]& c% A) r1 k6 f
do
9 D1 l3 H& ^2 f. z Lan := rootfolder.Internal.Tools.AOLlanguage;
9 ~+ n5 V4 E8 C' q5 | if current = @.Destination -- else return, |! B( m* n! Z9 U
then$ {' q, Y0 V# q U2 e
@.Destination := void;: M$ x/ m2 Q! j
if @.occupied then. K$ c" N. F' i
part := @.cont;
( k1 n9 j# e1 g7 p @.transpOrder := void;
3 J1 Z2 w: L$ w5 ^) r8 n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' Y0 L) X: G9 R* h0 F! [
@,root.eventcontroller.simTime);
; [, [! e9 k/ p/ C# d2 `1 X @.HasOrder := false;
% ?1 v! Z- w. u: s" M- A7 G3 K" {4 E @.DrivingHome := true;, d4 I* \. y4 ^3 |( \9 H
rgManager.tryToStartTransOrder; ?* x+ e$ f; R% J) X' }5 d
if @.Destination = void; Y. `1 c1 V/ R" A. l; W
then -- no transport order for vehicle @3 }6 _* I/ g. A* m o) V/ ?
@.Destination :=
1 I" P: m& y8 D5 U- U; R rgManager.nearestFreeStation(@,track.~);
7 T3 p9 r- h5 w; J# s newDirection(@); . ~" n+ M. t' V; c) |& v
if @.Destination /= void then
3 n1 {: W4 J6 W @.Destination.NumReservation :=
, P& ~2 k8 e/ q# J, X @.Destination.NumReservation + 1;
8 }; o0 s9 L# W2 |3 ^" M end;8 w, w/ T- k* l4 g) a
@.CurrIcon := "drivingHome";3 ^# a4 X, D: i! e* I7 |
@.DrivingHome := true;: A$ v- R: i- |0 A2 y; `
end;
# i/ ]6 J) h! t7 H else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" E1 V9 F# l) o2 O6 A8 e/ U part := @.transpOrder;
& @5 N% Y- w7 e, z part.move(@);-- load part! o) y% s( r; o3 o( G
@.CurrIcon := "load";
" v5 ?: b; ^* _% t1 d, T GlobalDistObj := part.globDestination;
$ b! m' l+ H( i9 v6 ~, |, _. ]# { assignLObj := rgmanager.rgAssignL;2 L" E: W! i. Z
row := assignLObj.getRowNo(GlobalDistObj);
3 C; A3 P( U! {, j# {5 a/ p! U6 H if Row = -1 then -- since 70) u- i) a$ E, G- o B2 |: a
if lan=1 then
4 E. O3 o5 U, m9 [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% @6 }; O& z) ^/ r3 ] to_str("in der Andockstation: \"",?.~.name,"\""));5 z! [2 l! Y+ f6 x. O. K' l( H
else
6 u! P& P- T" Q4 K9 W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% x6 |7 [4 y5 \
to_str("in docking station: \"",?.~.name,"\""));
. T5 |7 V* ^; L! O end;* G# Q# [" a6 z# o9 }
else
/ N/ G! S) U8 B @.Destination := assignLObj[1,row];2 e. w/ z5 v( q+ T/ M* h) n
end;
, ^, t3 @9 ]8 x; G newDirection(@);( [1 W+ b, z }5 n) e. V
@.HasOrder := true;# @: W% z/ r! L1 L. r4 D2 r* Q0 [
end;
: \# m! U% Y0 f# }; R8 I( r end;
6 y7 `% W$ `1 pend; -- of the method
* ~. B: \9 ~' e |