/* called by: entrance ctrl of the object 'track'' f4 @- T; H' K" X5 M- c2 ?! X
*/
3 }% Z8 o6 U P6 Z2 S# @is3 d+ F6 L7 o9 z/ g: @& v* X0 F! ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 J+ t' d# T1 edo3 N0 ~% F" ?3 Z7 ]6 v5 `
Lan := rootfolder.Internal.Tools.AOLlanguage;5 P; x& `( Y1 H+ G/ c
if current = @.Destination -- else return
' v2 {# [: H+ q$ x9 R3 V then
" @8 H% w! v0 e2 ? ? @.Destination := void;" r, i1 l& x. E l7 }: y1 ?
if @.occupied then
; [& h% F! H. A% p+ z part := @.cont;+ e" l3 x" r6 u9 }
@.transpOrder := void; s2 L2 c- T( o- H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 J/ L5 H o1 }& p' T @,root.eventcontroller.simTime);, |* w$ j3 [2 F# b1 O
@.HasOrder := false;) b7 T. \+ b& k6 S
@.DrivingHome := true; t& ?% K* I7 b
rgManager.tryToStartTransOrder;
. \5 \' T w6 K* @" ]# E if @.Destination = void
: Y) i3 m5 J" h2 \. f then -- no transport order for vehicle @
1 y9 P1 }8 t% G$ ?7 g @.Destination :=$ Q5 x: I2 A$ w" z8 i1 R c
rgManager.nearestFreeStation(@,track.~);
' C n" a! U* k2 Y2 r+ O m% {- R8 L newDirection(@);
3 ~6 \( J( R; t5 O/ U* c% g) I if @.Destination /= void then* H1 a/ ]- B1 z8 f j
@.Destination.NumReservation :=
; x X) S0 q) x Y$ ? @.Destination.NumReservation + 1;+ I& c+ Y. H2 p/ t- L8 m) K! p( N
end;
7 T& e9 i9 t( n6 N3 T6 z; x @.CurrIcon := "drivingHome";
* F I$ x1 f* L/ Z! p @.DrivingHome := true;; L+ p- ]: C# e4 ^
end;
) C$ b6 x/ _/ J& g6 A% b else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; P2 a$ Q7 \1 a part := @.transpOrder;( R/ y+ ?/ A3 ~$ \" q* p
part.move(@);-- load part) w) e( c5 L" n, f% E+ {) Q3 m
@.CurrIcon := "load";
7 L M0 R( G0 a. z& D: }+ a( e5 W# k- W GlobalDistObj := part.globDestination;' R# s, w6 Z; }# o+ o8 ?0 {
assignLObj := rgmanager.rgAssignL;4 j- }& |9 ~1 Y
row := assignLObj.getRowNo(GlobalDistObj);
* \: ^4 ~' t$ i2 l. W2 C U/ j3 }8 x if Row = -1 then -- since 709 {1 @& ^& u0 L! @; R$ n, I8 ]2 c
if lan=1 then0 n7 j; N0 b' n. @( T6 V. B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( _8 l, Q; Y/ F8 e# x to_str("in der Andockstation: \"",?.~.name,"\""));
7 W% Q. t/ @2 K7 o else
- V. M2 X! P1 T6 u6 P# B! [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; i# Q. m" D \* v. q
to_str("in docking station: \"",?.~.name,"\""));
# F; y8 H4 X( x& W& ` end;9 Y2 Q6 X! j/ B4 Q& w4 e+ \0 e- y
else$ H' w) `" U: g1 k2 J+ M% U2 U
@.Destination := assignLObj[1,row];$ P; N6 \4 a, i7 I
end;
* O/ L- Y! O3 ~# S newDirection(@);# h, Y0 Q2 u% q1 L. w" D# u3 W- o( l
@.HasOrder := true;6 ^' }: D' s% H( V, L
end;
. j' B* U# P! O1 T3 \% r+ O1 W0 j end;
# L7 D$ c9 K' k" N& p( wend; -- of the method
8 M8 `! V: w. K* l! z |