/* called by: entrance ctrl of the object 'track'- i5 C4 w! t6 g0 J4 @# n
*/8 D2 U" G+ q9 d' V! e
is7 I$ L+ K+ l& R5 I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. T8 A |& \, P( o5 N9 Bdo
6 u: Z5 P2 F3 F8 {8 X0 ` Lan := rootfolder.Internal.Tools.AOLlanguage;( x/ Q7 R% u7 b: t' n
if current = @.Destination -- else return
4 T# Y) g& b9 Y) H4 e& t p3 e" s8 w then. e4 M( t$ L4 u6 J" S3 A& ?
@.Destination := void;
7 f; x" A$ ~( z if @.occupied then
' |, B k& ^2 X- [1 v part := @.cont;
* l! F2 e( O5 Y N @.transpOrder := void;
1 x: T+ h, H' l/ _ I% [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 N3 d1 ]# d. G6 X( e# Z& `$ ?
@,root.eventcontroller.simTime); g# W9 q! z' y5 c& U% X( c# U5 R% x! n
@.HasOrder := false;$ \- o3 P4 k8 \, p2 c6 A( S
@.DrivingHome := true;
5 c9 {1 k1 g7 N- D rgManager.tryToStartTransOrder;# l8 M Z& j( n. s. t
if @.Destination = void% l* J0 i$ f/ n! g# j2 e* i0 C
then -- no transport order for vehicle @
- Z+ O4 C9 c3 p- q8 T4 @ @.Destination :=
: @) l$ z8 d* \! b1 |+ `6 g rgManager.nearestFreeStation(@,track.~);/ O% r+ E2 t ]0 P7 H, L% l
newDirection(@); 8 q# a9 n$ |6 A' Y( A- [
if @.Destination /= void then
+ t! @& _" D2 y @.Destination.NumReservation :=; l, L# U- a2 a1 n
@.Destination.NumReservation + 1;
- J& ^: z8 [) G5 d) e; C; f end;1 ~+ ~. o u( C
@.CurrIcon := "drivingHome";
: e$ x H( G4 T% w @.DrivingHome := true;$ ~7 s; ]6 ?4 c, ^# q, o7 C
end;3 }* V, Y _. E6 u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 ]2 e( B! h* l; I part := @.transpOrder;) S- J( T/ X- j
part.move(@);-- load part
: \6 C. m j% F L( l6 ~ @.CurrIcon := "load";
Q% j3 K, ~2 a+ G, Q: b7 x GlobalDistObj := part.globDestination;
% M" u; L4 @+ p9 y assignLObj := rgmanager.rgAssignL;$ H2 v6 j, F& C# `# w' g
row := assignLObj.getRowNo(GlobalDistObj);
7 [ n+ S2 L, k4 V7 G+ Y: r, q if Row = -1 then -- since 70
& E0 V" p. G& p if lan=1 then* t* r8 G) {) n; U, p7 H9 Y1 n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," n. {/ Z8 Y- ], k2 v
to_str("in der Andockstation: \"",?.~.name,"\""));- z" r6 s$ @- I& G; M/ w
else, ]" ?( B) {- f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 F0 i9 C [9 {) Y to_str("in docking station: \"",?.~.name,"\"")); ' N7 W7 J- q; m. ^. ]
end;' b4 A l) x% ]
else) y& T8 E0 n1 Z
@.Destination := assignLObj[1,row];
a7 X4 G3 Q6 E" I end; ( a: o. T; F- C0 u8 L
newDirection(@);, T+ c4 r; H R3 s- J
@.HasOrder := true;
! ?! Q; S8 Q& c: x E. Y end;4 v% u) A( M3 N7 T" c
end;
( p+ l$ t8 |4 }9 K, |end; -- of the method
# F/ ]2 R* q/ R9 c( ]# K) F |