/* called by: entrance ctrl of the object 'track'
/ s/ N" j& a4 [*/
/ x0 ?+ x0 f3 P) v! J4 G6 tis
7 n7 e8 i+ ^3 p8 i7 {) E! p" a+ F part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 c# X% t( ]' Y: H$ J% }& v
do
8 W1 d& k2 r" Z2 X! o Lan := rootfolder.Internal.Tools.AOLlanguage;
4 x. F) v+ {$ t- h5 v ^$ v7 m if current = @.Destination -- else return# D0 S- W+ V4 }. _
then7 \! h% g2 D& ~( d, H( J* {3 G
@.Destination := void;
z8 a& q1 Z. } if @.occupied then
# y- E. R- O- A7 a7 v% M+ O$ X( t part := @.cont; A$ u i Y0 d }5 d
@.transpOrder := void;5 ~9 W* p5 }' |' o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," _3 P/ ~* `4 h p# d a' C
@,root.eventcontroller.simTime);
5 Y8 ^( p- a0 k8 B$ K @.HasOrder := false;/ s' F2 s' F1 Z& y% _3 Y- F+ e
@.DrivingHome := true;8 _% {) K. W( [, M# j1 U
rgManager.tryToStartTransOrder;
" A) X! T2 m8 x% @9 q if @.Destination = void
8 v! i( i5 @) M then -- no transport order for vehicle @
5 t" f F6 p+ l @.Destination :=
_( }+ s. ^+ [ rgManager.nearestFreeStation(@,track.~);, |/ J$ n, E$ k0 u1 Q* {
newDirection(@);
/ W" Q# q8 b5 m: H. C3 V" ^ if @.Destination /= void then' m$ c- B8 j P* _8 z) f
@.Destination.NumReservation :=2 n# ]' _0 e) u8 b, b9 c5 [4 r
@.Destination.NumReservation + 1;
, a5 w+ y, M+ C5 o end;
2 r- p, r3 G: c5 R) H @.CurrIcon := "drivingHome";
6 w/ m5 W" h/ }5 X* G; z7 c @.DrivingHome := true;) O. ~1 X- p; {2 Z7 e) G' W/ u
end;: M) _+ x5 ]2 z- g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ ^$ k2 i" t: t9 P! W2 U7 \1 q4 r- M, Z
part := @.transpOrder;
. F4 c$ l1 R& y5 n' w [. j part.move(@);-- load part" C' t) v+ r) O3 b7 W) k+ ]5 y
@.CurrIcon := "load";
1 b( h! f$ E1 r7 O) `$ R0 i GlobalDistObj := part.globDestination;
" v% y3 u7 ~. V# K* X assignLObj := rgmanager.rgAssignL;& `! @) G8 k7 r# k3 E
row := assignLObj.getRowNo(GlobalDistObj);
8 q$ @! `5 C( E5 g* X( y$ t( X if Row = -1 then -- since 708 W* D# m% n) Q! E
if lan=1 then
: Z1 w" }- Y2 D( M+ _$ {; s X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 @' n/ d, n$ p6 K to_str("in der Andockstation: \"",?.~.name,"\""));
1 l2 H) ^% t" H0 Q else
0 F. ~& a* x( c2 X1 w3 f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* W; a. W: J1 R5 a) W
to_str("in docking station: \"",?.~.name,"\""));
, T2 q5 q% c6 c6 [ end;2 A& L' x; S3 `; M. T" J) X6 w$ C
else
& X4 s3 f$ b# d; C @.Destination := assignLObj[1,row];
7 P9 }+ d* @) ^ `. _ end; @5 \5 A8 u) U1 E m3 Q
newDirection(@);& w+ O! v& c* Y0 H. Z) C% q6 D
@.HasOrder := true;. Z3 m. D" w9 v7 Q
end;
% ? X) [7 @9 U end;; k a8 b6 B0 K" O$ {
end; -- of the method
& o+ d9 o4 b2 @- T8 M |