/* called by: entrance ctrl of the object 'track'
- k5 i; D$ v" A5 q0 @9 Z*/
& |& X0 O0 B+ p' ?& h: p) Y6 a6 I2 D, ois% L' D. Q, @% k4 _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 f+ v# b$ N hdo
7 R c1 |( s) r$ s }+ A Lan := rootfolder.Internal.Tools.AOLlanguage;2 y8 O: G j; F' N7 s1 Z0 ?
if current = @.Destination -- else return* R D# M; T5 m9 Q! ^ g) p
then
. {; c$ J; U" b$ b$ B1 ^ @.Destination := void;
" {! t: T. E8 }. v4 f; F3 y if @.occupied then
$ l$ _8 C1 ]9 o0 y2 x part := @.cont;
0 k) \: A" Y7 c1 m; D! E @.transpOrder := void;" {7 B+ U% t0 \; W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! \( j2 v# e$ P7 E( _9 L2 E# J
@,root.eventcontroller.simTime);
( w, U8 I9 V$ x2 R @.HasOrder := false;
/ l6 I( F. L' O6 @ t* Q9 N5 d @.DrivingHome := true;
: g/ r5 m P" Q7 f: K4 Y5 \ rgManager.tryToStartTransOrder;
) }9 w' s: ~2 ?3 S" c2 g if @.Destination = void
' O* _% m$ y |3 w! n( d1 K) y then -- no transport order for vehicle @
* D" h! h9 y9 i7 ? @.Destination :=# ?9 ?3 P' o* D" T, r
rgManager.nearestFreeStation(@,track.~);5 e* \! T, u6 ]1 ?7 R% X8 k+ ^
newDirection(@);
. _2 n3 ?/ C6 r5 x3 S$ t% T1 p$ f if @.Destination /= void then( Y8 j9 I/ X; a% y" N2 U0 t: B
@.Destination.NumReservation :=$ j" W( S" p" T" j8 Y4 c
@.Destination.NumReservation + 1;) W& h' X( ?1 X9 v" N/ f
end;
6 | o* R6 p) l9 d @.CurrIcon := "drivingHome";
! |- L( O! @/ @( Y3 J @.DrivingHome := true;
5 |) T: I+ ]; L* x7 { end;
, t7 |, D/ i' |9 |4 b3 U else -- the vehicle @ is empty, both vehicle and part are in the same dock station
W+ C! Q/ b( D part := @.transpOrder;
; w( s' h7 t2 l* S part.move(@);-- load part) J1 W2 e: y/ a6 l) A; n
@.CurrIcon := "load";* e( c, w) K& N8 ~" g
GlobalDistObj := part.globDestination;* e. c& X9 z8 k
assignLObj := rgmanager.rgAssignL;: ]5 U$ Q, }6 z4 S* Q7 D
row := assignLObj.getRowNo(GlobalDistObj);
: j S I. X) t if Row = -1 then -- since 708 q- Y; L, p: a/ j9 N1 r _2 K
if lan=1 then( a: @5 S* ~/ t$ O5 z; o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 q ?+ w6 b/ I8 g to_str("in der Andockstation: \"",?.~.name,"\""));# p1 m) y u }. f, }
else0 j) g% o0 {& g- p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: f8 _* o$ T: B, @
to_str("in docking station: \"",?.~.name,"\""));
2 {! ^3 J) ]# {8 C" S+ Z end;
* J3 R7 H( f6 I* i. w% } else
% K# k" B5 X0 E+ P @.Destination := assignLObj[1,row];. T+ H) m2 P7 V" Q3 n' k! c
end; 3 p0 M1 ~2 V9 K; p
newDirection(@);3 D. Y" q% K/ s1 H/ x
@.HasOrder := true;
" |1 |1 S- }- m/ q8 k: J2 q9 i7 } end;) x( F- ?; x6 X* b2 B/ B" f) O% O
end;
3 b, h) [1 t4 w* p/ yend; -- of the method B# i( a% G" X5 Y
|