/* called by: entrance ctrl of the object 'track'
0 n' G6 b, }3 x* S. c8 K*/
' k/ P1 p& \: u3 Q4 Tis
6 A7 t2 A) Y- [$ z$ ]) c7 O! j) d part, GlobalDistObj, assignLObj:object;row,Lan:integer;* R& u* Q; }1 H2 p! j
do0 P7 F- ? C- ^4 T7 s
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 p6 Q( i9 F' V$ C' T, m if current = @.Destination -- else return T# q. ], J& K( h7 q
then
8 h: |. a9 f7 b, G4 D4 l$ L @.Destination := void;
* J, y% E* a' J' G$ D2 a if @.occupied then
: ~3 k& t9 Q3 g2 N2 H, w part := @.cont;5 f* F4 c+ n6 ~( {* V; ?# L
@.transpOrder := void; Y) d- g, G7 D) U9 J7 A, E9 a& Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
?, n7 n4 Y$ T @,root.eventcontroller.simTime);2 u9 r7 t( q: b* w# ]8 |0 O
@.HasOrder := false;- m' Y7 l+ X& J" {; y: ~( u
@.DrivingHome := true;
3 g0 N; Q" `7 L1 ~; T/ v, r1 _" c rgManager.tryToStartTransOrder;
9 H. b& V$ b. h5 u* s7 U7 j if @.Destination = void
$ U% Y8 m. A: Z7 O" k then -- no transport order for vehicle @( A, ]- ?* T8 s- j }/ s
@.Destination :=% Z: q: y& v! g$ u$ l. Q) [' ~
rgManager.nearestFreeStation(@,track.~);
: \5 I2 K- F. H9 c+ \6 h newDirection(@);
# L6 i; R( [9 _5 `7 I* E if @.Destination /= void then
1 T' i6 n+ C' H: q9 b! Z* r @.Destination.NumReservation :=+ Q9 r. N, W& x1 P
@.Destination.NumReservation + 1;
4 Y' ?6 }1 z* ?! V0 A/ |# H end;: E4 D4 s% L$ A' w* o7 G
@.CurrIcon := "drivingHome";4 L9 M7 o, {2 z& P, B+ `% G5 _
@.DrivingHome := true;- E- Y0 q8 ]1 I
end;6 b! K, S# r6 X0 U7 H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) U/ W) h% P# @3 R/ e0 g
part := @.transpOrder;
+ p7 ~8 L5 K, F- Z part.move(@);-- load part. Y* L q9 V9 Q# y6 j
@.CurrIcon := "load";
1 v+ W% o6 v; r' B {% o5 a GlobalDistObj := part.globDestination;2 E. P7 s7 f, V6 S6 ?" H
assignLObj := rgmanager.rgAssignL;
' Q7 u6 H" Q4 R6 j. m( a row := assignLObj.getRowNo(GlobalDistObj);, i( g( P: P7 b, n9 f( G/ \
if Row = -1 then -- since 70; V/ F9 V* q! H
if lan=1 then- G+ c) m% i$ }& s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 s; y; u$ P2 L% Z; { to_str("in der Andockstation: \"",?.~.name,"\""));
# R5 U: X: k$ r5 m else
. N3 C$ q' o, C9 C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# z2 h, F3 \ s' r' t( e* _5 d+ X; H to_str("in docking station: \"",?.~.name,"\"")); 0 t, [ Q2 ]: E
end;8 E- W# H7 M" E/ l
else
; a8 k7 i) r4 i) M0 F) i7 ` @.Destination := assignLObj[1,row];
' V# E7 E9 W% z end;
5 f, V* e2 o7 i newDirection(@);
( a2 z6 q! A$ e! l @.HasOrder := true;
( o( E9 ?3 r, c, |0 g& z end;
. n% Z& [* o: e. K+ n* i end;4 U. c6 G+ z1 E+ Q: Y
end; -- of the method ~9 H6 h# [" S) q5 A5 P
|