/* called by: entrance ctrl of the object 'track'
& _+ a% Z, `' b6 o*/
4 r- J w* P; B* L: x6 m; Y; E1 Jis
6 F7 W( F8 G y% r part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) `, Z$ Q- @. |5 x6 [7 ?2 Wdo
, N4 l5 V8 H0 c: F Lan := rootfolder.Internal.Tools.AOLlanguage;
& R4 X& k. T2 W& y% z: i if current = @.Destination -- else return, R% ?: a" T1 z8 e) P& t I
then" v; j" v1 m: V" x7 j. B1 v1 Q% a
@.Destination := void;
6 Q' R$ [4 o B. m* t" S if @.occupied then
) m5 F! C( K# v" ^ part := @.cont;
9 e8 L5 Z, F$ r7 e; ^- I3 P) } @.transpOrder := void;' g/ s" {% z% L5 O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 e0 {/ e; u1 J, I
@,root.eventcontroller.simTime);
0 y) ]+ j% n: @8 a y8 X$ D @.HasOrder := false;
5 |4 q/ w. U. a. P3 E. t @.DrivingHome := true;
4 f! I1 L& y5 H9 B a+ e rgManager.tryToStartTransOrder;7 X2 C2 \: d; F2 k0 a' J- i. R
if @.Destination = void: P# W( ?9 a3 p- `) u
then -- no transport order for vehicle @4 }5 m6 z2 H) n$ U$ A
@.Destination :=
, k5 C" Q) ?" u; k) f4 W6 p rgManager.nearestFreeStation(@,track.~);
7 |& _% q* E% g7 O& M- u8 ` newDirection(@); & [* ]9 M) i# y# ~) v) {9 C$ G- e. D
if @.Destination /= void then
9 u2 h0 a' Z$ z$ V3 q! w" G @.Destination.NumReservation :=
! w: g, a5 G& y6 B: k2 ^ @.Destination.NumReservation + 1;4 d9 U+ Y" K& J* B
end;0 {5 }* A& F+ ]) c# L- [
@.CurrIcon := "drivingHome";, e$ o! N! P/ b" }- q! X
@.DrivingHome := true;
0 s/ S2 ]/ b2 ?' M; V/ p end;0 l2 W3 l4 D+ P! M; w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( G" \* c9 ]; x* \! D0 e9 {" N$ o0 o
part := @.transpOrder;
: s0 I* y& |2 ?0 [: z9 n6 L) T) P part.move(@);-- load part! v8 l6 ]! O7 h& S: j& f( d4 f
@.CurrIcon := "load";0 E j: N X0 N; l" E |& D- k3 V
GlobalDistObj := part.globDestination;/ \, z1 K9 _4 L# G" N
assignLObj := rgmanager.rgAssignL; S s% f5 k( Y' i- U$ l& g
row := assignLObj.getRowNo(GlobalDistObj);4 J' F3 ]# u, K' i4 W4 l
if Row = -1 then -- since 70
: c2 m0 l3 ~+ K; D/ l: K if lan=1 then
$ c+ ^$ O! a+ Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, F7 L" C* K6 l7 l" n" w% f. g0 Y
to_str("in der Andockstation: \"",?.~.name,"\""));
9 j/ B3 j+ U; D8 O. H+ a5 b else
" J5 I1 b3 Q- ^# R. U' q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& ~% u, X4 j* Y$ R9 J
to_str("in docking station: \"",?.~.name,"\""));
* G8 H' R5 A7 K+ Y end;
7 ]0 J& _' `* O$ b# [( ^ else
! ^. n( l, n2 I- _& D @.Destination := assignLObj[1,row];" y" V" m" u' I/ r7 U# s1 O# J
end; # }2 d. X8 |# w+ Y' b. y; C
newDirection(@);* T+ Z& i0 F, v- D
@.HasOrder := true;
; q8 U- ]0 A# B3 l+ W) Y2 g end;
8 u7 o: m+ x+ L |# l* [9 R end;* Q" n1 U% Z/ ]8 c8 u
end; -- of the method
: J* d5 [/ |$ X3 v9 J) k |