/* called by: entrance ctrl of the object 'track'
( }" Y1 [ n2 |3 q6 C*/
" e1 A# O: {2 r1 H& ?4 _is
% M1 X1 t$ ?9 T* y8 L7 o part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 Q* V1 j8 B2 ^do
& d- K2 ?3 z1 N" {1 W7 A" O* a9 W9 Y Lan := rootfolder.Internal.Tools.AOLlanguage;+ m! ?# ^) U3 y! C; k1 l4 O h
if current = @.Destination -- else return
( M8 Y* h [: _0 Q, [$ |& Z$ z then
9 b9 m# m1 P! n3 B5 f6 q3 h4 U @.Destination := void; Z+ v' j8 e% v+ M, g1 s# y
if @.occupied then6 a3 F+ a4 t) @9 u9 _; A1 N& Z
part := @.cont;
0 h8 ~$ T! C. Y/ N* o @.transpOrder := void;
- t4 C* `+ Y x1 Z8 Z5 d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& L ~, b# k+ ?# y' e* \ @,root.eventcontroller.simTime);
- k4 T' C0 k! h9 q$ e @.HasOrder := false;
+ V! b8 G4 [ T! r @.DrivingHome := true;3 ~+ l6 h! T9 G, H/ G+ A
rgManager.tryToStartTransOrder;# a T/ o8 U" `( e" s; }
if @.Destination = void) ^0 |' ~% o0 ]' e4 R0 c& u
then -- no transport order for vehicle @
$ Y$ C3 y" |2 b9 v+ z! \5 L" K @.Destination :=
5 e1 A8 T7 D$ m3 B8 A' Q; H- L. R rgManager.nearestFreeStation(@,track.~);4 K% J" o( d: W* ]8 f. p" h
newDirection(@);
8 Q0 E! \* w8 u6 p5 f$ _ if @.Destination /= void then- c2 `% \ U- u2 l) |1 m- {- D
@.Destination.NumReservation :=( H, Q* D& v7 | w; [+ O8 [
@.Destination.NumReservation + 1;
" L8 @" v8 Z8 |2 x end;
( j: w6 @1 {1 C @.CurrIcon := "drivingHome";6 c7 U9 G. R( v* v: C
@.DrivingHome := true;
* v& S7 B5 B4 a end;
8 w }8 E \0 T else -- the vehicle @ is empty, both vehicle and part are in the same dock station, a! C( l! Z: ]( z% _, v5 D4 p. S3 H
part := @.transpOrder;
. b1 S g7 v! q1 x; J" p part.move(@);-- load part
- D% P# R% B, N! j& z @.CurrIcon := "load";1 ?+ d! U! [' O& q6 X: I/ ]
GlobalDistObj := part.globDestination;
C4 H( F5 G6 N' J assignLObj := rgmanager.rgAssignL;
# h* d- w6 Q( J4 G# b( j* D' _: ` row := assignLObj.getRowNo(GlobalDistObj);, i1 W( W' F. ]# k- X* }
if Row = -1 then -- since 70
' c# U2 U b( R4 W8 R if lan=1 then, q {0 r$ {8 V; g1 M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& \9 ]2 z, w/ s% O; r2 @
to_str("in der Andockstation: \"",?.~.name,"\""));6 D3 C( \0 Q7 U. F3 n0 p$ {
else$ d; |4 s0 k+ G- p+ r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) c- P! r9 P) {4 g
to_str("in docking station: \"",?.~.name,"\"")); , b) L, p: t9 H
end;
: l/ \+ l9 S. c. a9 ? q2 k8 g else# Y/ ~* h h2 c+ S6 ~" e/ ]( B% e
@.Destination := assignLObj[1,row];+ O/ I; t- r" K4 C0 @7 I0 D; w
end; 8 I/ L5 O. n. o8 Q! l |& u
newDirection(@);
/ W4 R4 M+ q0 f, o& y. k @.HasOrder := true;
\. q5 I, k! d1 \ end;
3 h9 }- l3 i& O0 F+ l end;
% ?2 ~+ j$ S2 q' Q6 ~end; -- of the method' j) f; q: c- |9 L* I& b& F' R! _$ n0 K1 M
|