/* called by: entrance ctrl of the object 'track'5 Q. [8 s. g7 O$ v2 X) S$ y
*/" c2 j4 D$ j, }/ u
is c. U" F; l5 I" U" m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 i. Q1 n" l* h V6 U Ddo- c+ Q! Y8 w' {# x8 H
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 n% Z; O# z, a* P. e) }3 x if current = @.Destination -- else return
9 R0 M" e: R+ W' {. a then
! m: K5 ~) ?8 Z+ { @.Destination := void;
: m+ d4 \ n" \( a5 n# v) i if @.occupied then* C. f0 C0 a/ ~8 u
part := @.cont;
4 Z! e7 V4 I, R @.transpOrder := void;$ Z9 l7 M( }+ g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" n" X- \& p! R( L @,root.eventcontroller.simTime);
7 S8 ]5 [* M& n! h- w4 `, I @ @.HasOrder := false;3 @' }6 R+ Q: M6 v6 ^1 x
@.DrivingHome := true;' Z0 F+ |, ]6 a4 t+ ]0 {3 ^
rgManager.tryToStartTransOrder;
3 L; M! s% E2 T, W+ O if @.Destination = void
2 v& i% A# P: v4 o' P6 \ then -- no transport order for vehicle @$ A% D6 S& t: }2 n# w2 F1 ]4 x
@.Destination :=/ K, P8 j; u( Y& p
rgManager.nearestFreeStation(@,track.~);3 \ a! |9 v$ O
newDirection(@);
( ~6 o. O, ^0 I; c8 {, J! O3 ] A: ~! ^ if @.Destination /= void then
9 O2 O9 p J, {" q7 b& t- | @.Destination.NumReservation :=
, t2 Z# g" a; N. P. H4 O) s9 U @.Destination.NumReservation + 1;. y) G: O: H$ a
end;- h# n" q/ x2 z/ }0 n U
@.CurrIcon := "drivingHome";/ N& C: I8 } q# Z' W7 D
@.DrivingHome := true;
m( c T7 e+ j% |$ ?6 H/ L end;
% K6 x; i# Z8 X3 K Y8 W else -- the vehicle @ is empty, both vehicle and part are in the same dock station# m7 y8 o5 \/ A7 Z7 c
part := @.transpOrder;
$ q% y- k/ F4 X part.move(@);-- load part! H" N( y% r5 q& X- U) o
@.CurrIcon := "load";
6 w2 Q) W5 o5 i' O3 Z2 s GlobalDistObj := part.globDestination;! q5 k$ J3 d3 K' u
assignLObj := rgmanager.rgAssignL;' i6 @& x9 J& j/ V% o
row := assignLObj.getRowNo(GlobalDistObj);; |6 ?) ~. L$ W$ k6 g
if Row = -1 then -- since 70
7 f9 @9 H [0 {1 | if lan=1 then
2 X& s* w3 B2 s5 I8 x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 v; u3 h0 s n) `' k$ L( s$ e( p
to_str("in der Andockstation: \"",?.~.name,"\""));; C8 Z, E9 q! @- `: y
else
, G( n4 C% d: o. a) I& K2 B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& R# o x$ ?* l( e6 m+ x+ r to_str("in docking station: \"",?.~.name,"\"")); : G; T- j9 S6 N" M2 Z. x
end;/ G f# k0 v# {/ g
else7 {. Q" g! n- a; Z: n) m
@.Destination := assignLObj[1,row];
9 D5 G9 S: O, m* f end;
6 I& K$ m* ]' B' ^' D newDirection(@);
9 v1 J4 H( s2 Q# z7 |) H) c% B& P @.HasOrder := true;
' _( [# U; i( e/ ? end; d* ~+ Z# |0 m: N9 W& v: O( x3 }* r
end;7 a n7 L) V) l) M
end; -- of the method" j4 U6 G. P" e+ W1 z3 y6 ~
|