/* called by: entrance ctrl of the object 'track'2 z- Y) p6 _9 Q# ]
*/
$ c4 c/ W1 W, _ ris( e7 ~6 X6 J1 p4 X( B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, u! r, q* M! b: ~' G
do
; {& k$ ], U: @0 J( |' @; r5 B0 W8 J Lan := rootfolder.Internal.Tools.AOLlanguage; R" m$ m) H/ n: E2 ^5 _4 A T
if current = @.Destination -- else return% ~4 x3 L7 D$ b; t: b" Z
then
$ v* H, S X8 w( ]( a5 n o @.Destination := void;
1 H$ i- d. D2 C2 c. o if @.occupied then
9 D- G% F1 x* Q( Y8 H part := @.cont;
: ~/ t8 ]5 h) O3 S- @ @.transpOrder := void;$ d5 G# A1 O9 m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 t0 F! R3 \0 f) v
@,root.eventcontroller.simTime);
6 @% n2 f. K' U1 D @.HasOrder := false;; m% O1 E1 T+ p( g! M
@.DrivingHome := true;$ G. T( S& Z \: W+ | s
rgManager.tryToStartTransOrder;3 T! d3 Q. Z, w4 O
if @.Destination = void' v8 [( ^3 i+ K3 H% g2 I' W
then -- no transport order for vehicle @
' ]- Z) \! ]) ?1 G @.Destination :=; }+ T' o- L( v( E" X
rgManager.nearestFreeStation(@,track.~);
) v# F* X# A$ ]) F6 W* W( c1 P' e newDirection(@); 7 _! i2 t/ l/ T
if @.Destination /= void then! O3 Q8 `9 S% {2 F
@.Destination.NumReservation :=9 l# s0 _" F) M& y& V" A
@.Destination.NumReservation + 1;. F/ |% g3 ?1 U" y
end;& W8 T- e4 w3 ~& f. w* ?
@.CurrIcon := "drivingHome";3 \2 i" Y7 _; b/ q; k" F
@.DrivingHome := true;
) [- b, v3 ^, h0 `7 c end;
5 d0 n* l+ H5 k6 a* { else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- c6 j( @% t1 m& E W part := @.transpOrder;
4 f0 s N: \) i+ U part.move(@);-- load part
7 d: \% F! s$ b% f( S$ M% s @.CurrIcon := "load";
% R* l( g+ ~5 Z: u$ J GlobalDistObj := part.globDestination;
9 ?' y9 K; v3 q; E assignLObj := rgmanager.rgAssignL;0 Z b! D, ~( D% r4 T) H9 b! ~: j
row := assignLObj.getRowNo(GlobalDistObj);
1 L$ n) M0 ^. ]- f. d: { if Row = -1 then -- since 70; y4 E2 p/ t2 B8 v0 ?
if lan=1 then
) |; Z8 {9 w$ P) ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' R' Y& [- ~: q4 v5 C to_str("in der Andockstation: \"",?.~.name,"\""));
1 q, T* E8 Q( P$ p# b& \# ?. d else
K: l# ]! z' g* I2 O6 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 B! `3 }+ r+ n% s1 ]0 X to_str("in docking station: \"",?.~.name,"\"")); ; {8 D" J+ u' ?3 L: B% |
end;
0 P4 w* `9 X G' n else2 A: Q6 M( K9 H& A
@.Destination := assignLObj[1,row];
& i* i' g; g5 T, d6 R0 x) M end; ; H) t8 t1 }1 B
newDirection(@);
5 U d6 O: `+ m; m @.HasOrder := true;* X5 u" J7 ~* K/ d2 e
end;
1 G; R( V$ J N s) [! g2 p# n end;1 K5 U. g. j3 m% a3 n0 u4 t5 g
end; -- of the method) v" z. j' o7 h d: Q' a
|