/* called by: entrance ctrl of the object 'track'- x& N- x' `- X' B( [6 p
*/: d+ @# a) l# K1 [# c. f5 H
is
2 f6 F0 s6 G& A2 S- Y0 N part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: E( k( L5 b" rdo
, N$ k: M- p* Q Lan := rootfolder.Internal.Tools.AOLlanguage;# w6 O4 U+ ]: ?& W( [5 O
if current = @.Destination -- else return3 H; [; Q$ r: g6 m* `0 u0 G, N5 D
then$ k/ v8 B: C4 \4 K. Q
@.Destination := void;- e/ H! C+ @/ u5 t) t
if @.occupied then
0 c+ O) C5 P. `5 G part := @.cont;
' O) U3 u" e* r7 T% W$ F. f @.transpOrder := void;6 n( M# o3 P$ d9 Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 v. _( l2 K+ h0 s9 w7 r+ b. B9 Y
@,root.eventcontroller.simTime);) O9 |8 t h: J& e. H8 k( \
@.HasOrder := false;7 C) }4 a0 a( ?) G2 w
@.DrivingHome := true;
3 K! ]- t) J7 V2 a, R( {( t& ` rgManager.tryToStartTransOrder;) e5 M. R1 _2 u1 w3 G: a: ]
if @.Destination = void
9 }8 ]% Q! \ |4 F3 ` then -- no transport order for vehicle @
! D7 H8 t: I4 E' h2 _) \4 R @.Destination :=9 z3 l0 Z! ~( G( E8 Q0 X6 b
rgManager.nearestFreeStation(@,track.~);
9 f) }2 K7 W& Q" C6 C3 r% @) o newDirection(@);
3 Z$ E$ \# N, \- s if @.Destination /= void then/ A1 _# d7 i. g- L
@.Destination.NumReservation :=9 @% `4 \- u" o
@.Destination.NumReservation + 1;
4 d( ~+ ~5 v/ M! x end;! |, w& I1 A. } t5 T
@.CurrIcon := "drivingHome";. f+ D2 I1 y5 V$ b/ s y9 [* N
@.DrivingHome := true;
, o- j2 }" d3 d end;
* l6 S# F/ A- t a else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 \3 \; {% d6 C$ _
part := @.transpOrder;2 ~8 F5 x3 {! f: b7 R# b
part.move(@);-- load part; q' ]& M; w6 p% z/ [ K, Y5 b' C# h
@.CurrIcon := "load";
: H$ e2 h u% @ GlobalDistObj := part.globDestination;( P6 q- f+ f% Z1 g
assignLObj := rgmanager.rgAssignL;
% I( D5 P* A- j+ W+ R row := assignLObj.getRowNo(GlobalDistObj);5 b' a1 E" I& p% R5 z6 X* X, w- W
if Row = -1 then -- since 70
' S$ E/ N k/ R9 h* M5 C% Z8 D if lan=1 then9 b& t' p7 M% j& d) a2 @+ m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 N( D" x2 Z2 X. W
to_str("in der Andockstation: \"",?.~.name,"\""));1 f. z8 L& v6 w9 m/ W4 T
else
# c9 M# {. @4 s) `& ~: a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. |# f) y3 m' {
to_str("in docking station: \"",?.~.name,"\""));
, k" ~ T. s0 ~" I end;
3 g5 O7 Z! A$ U+ s8 ~ else# O7 [* c/ T& t( V, ~: I
@.Destination := assignLObj[1,row];9 {9 {$ s! i i& m* Y$ U
end;
' z: |# {; z- u' M4 q$ N# ^ newDirection(@);7 W; n0 U; a8 z9 V3 C9 Q
@.HasOrder := true;
1 K/ `6 C' {7 l$ i end;
t9 Z5 N" r8 U end;
- B" ]' y/ A- }+ \" W3 t- cend; -- of the method# P, S2 v; n. j+ Z" d. I
|