/* called by: entrance ctrl of the object 'track'2 W1 I- f2 ~$ L
*/
1 ^# A% X% o7 P4 @& j1 dis* [$ B4 l% t' y+ G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 Z) s8 [% r% F7 d) z6 jdo
, H l. _) I& V% i" E Lan := rootfolder.Internal.Tools.AOLlanguage;+ X% T) ^: p* Q; W* W4 u
if current = @.Destination -- else return
, d3 Q8 U3 P$ j9 T then* m1 @0 M, E( M% D9 d
@.Destination := void;$ N* x, E# q3 H- V; a0 B
if @.occupied then
+ D# O: b( t8 i! A. M part := @.cont;
$ [/ w' c, U7 i% h& J6 w k) } @.transpOrder := void;& g+ H) f$ f" ~4 m1 U5 F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 w5 x. K" h1 I1 x0 a; K& _ @,root.eventcontroller.simTime);
+ a7 m2 I: @1 d$ c) D3 m @.HasOrder := false;
& u9 H& q% [8 K$ {# r/ G& s) h @.DrivingHome := true;( q% T4 @8 J/ @9 n
rgManager.tryToStartTransOrder;
% y6 r! T* Y" L0 L; F if @.Destination = void9 e* E& b( B& i; @1 x! p j
then -- no transport order for vehicle @
+ I" s# k' J# e9 k @.Destination :=0 B6 i6 _7 q v/ y5 a% X9 H5 w
rgManager.nearestFreeStation(@,track.~);6 h, O! r& c4 _7 K* c- w
newDirection(@); : \5 N6 c @! a) R g9 d; D$ _1 P& j
if @.Destination /= void then# \% Z% C" h7 ?* L4 C' }3 O
@.Destination.NumReservation :=
' z9 `. I, F: D. F" E* Y ~1 k @.Destination.NumReservation + 1;
2 X) H# N( m( h end;3 ^( f4 Q# x! I
@.CurrIcon := "drivingHome";6 f8 T8 m5 G' q4 l
@.DrivingHome := true;+ _4 J2 S R( F0 e* o6 C% o
end;" b# i3 M0 x8 I$ F- F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 ~/ W8 ]2 i3 f+ n! m4 y part := @.transpOrder;
6 P8 n" F& l' C; x/ E part.move(@);-- load part
% G& d, g {% s! n V! S$ v @.CurrIcon := "load";
^( m/ l2 |! C3 y. T. M GlobalDistObj := part.globDestination;1 g# f% {4 O P9 p/ T" {
assignLObj := rgmanager.rgAssignL;
" `6 R' R _: g% J5 O% H. z row := assignLObj.getRowNo(GlobalDistObj);$ u7 f: o/ n& v
if Row = -1 then -- since 70
! b" y2 j3 S B& F3 w7 K if lan=1 then
0 \2 y+ A3 a& H4 r2 j- W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' M% G7 R6 Z- t% F! J+ _, \
to_str("in der Andockstation: \"",?.~.name,"\""));" y$ S$ g, w7 f) C# ^4 w& N$ Z! w+ B
else" G. t& r" [& R" ]4 a* P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& F" J( u/ W& H" T$ P
to_str("in docking station: \"",?.~.name,"\""));
% I4 I9 Y6 T) { end;! x- T6 }+ c) v
else
$ P/ b0 G n4 b @.Destination := assignLObj[1,row];
: d6 S% i1 |0 W! P7 D0 v end; + P- H3 H* `' v0 r& U; v
newDirection(@);8 \- Y8 w: E/ L5 Q# N9 Q5 V
@.HasOrder := true;
+ a2 q/ r3 [; m) K Z" Q end;
y! z" t) ~0 ^ end;5 u. s; `, r. s& J) z. {1 j! o: Y% R
end; -- of the method
1 k/ v2 \& v& w. g: J |