/* called by: entrance ctrl of the object 'track'# g) J* y+ I) S
*/
6 K3 C5 X9 {% G! H9 D8 cis
) N2 W# i0 D7 E. u& E% R9 } part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 f F9 B. Q, u
do
' b" f9 O! @* y7 ~' G1 v d3 \0 s9 T Lan := rootfolder.Internal.Tools.AOLlanguage;
, I1 r( r* l3 i# q if current = @.Destination -- else return0 @; q: U2 |, k2 Z& ?6 r5 e
then
9 d% w8 _: A4 H0 Q! C4 h+ \ @.Destination := void;9 n% P! l. `( s5 _4 I3 W' Q% ~
if @.occupied then
% ?& W, J0 Z5 n" J# [! d part := @.cont;, [2 j3 m5 ]3 y( G2 [( A8 q
@.transpOrder := void;2 M& q* x# v$ A: z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' e3 q. H, S, ~8 f5 S @,root.eventcontroller.simTime);& ~7 X* E1 M& p
@.HasOrder := false;
4 a9 I: B/ A" G- V6 X/ [, J @.DrivingHome := true; J* `6 K& ?2 w8 t3 a1 H5 y( E
rgManager.tryToStartTransOrder;
, l' i9 n c0 n Z+ [* m if @.Destination = void
6 f/ o! t* y( z5 j+ h) U6 ] then -- no transport order for vehicle @ h7 ]% v, I1 C3 c) \9 T3 @/ Y
@.Destination :=
- z7 D5 H4 f1 q0 I2 ]7 a) } rgManager.nearestFreeStation(@,track.~);. o& i! e2 P2 B. q# D) r, F' l" T. z, w
newDirection(@); * c, A5 c3 w' r: h# U
if @.Destination /= void then
) M9 E1 M/ _1 I @.Destination.NumReservation :=1 D" E7 [: o4 Z6 b0 L. ^5 S
@.Destination.NumReservation + 1;
, Y5 t) r% v% w6 U+ o: Q end;+ w% K) u- q' P& D
@.CurrIcon := "drivingHome";: M% u" x. m3 Q' d
@.DrivingHome := true;: G2 I3 q/ Q* Y/ O+ m" n
end;
{7 B+ [. D0 P2 M/ k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ \# v% c6 l' t, G part := @.transpOrder;
/ N) k6 n( Y9 k! H; N part.move(@);-- load part; M0 D; l/ E% v/ q
@.CurrIcon := "load";; ~8 [ ?" f4 ~/ i2 Y
GlobalDistObj := part.globDestination;( R0 W% P, N3 _/ j7 s
assignLObj := rgmanager.rgAssignL;
& h3 @& e" {+ D8 W4 L row := assignLObj.getRowNo(GlobalDistObj);
) B- N1 h$ K l; H6 R R if Row = -1 then -- since 70. }4 M8 r0 v' Q' I2 ^
if lan=1 then
! B. {6 N- D8 S+ B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 Y4 l# \9 g) w! I [
to_str("in der Andockstation: \"",?.~.name,"\""));4 W2 D: [4 w1 O Q" h
else, Q8 B5 \8 k. H8 \7 ?/ i; ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 Z6 }' J1 V% C4 [! Q/ K to_str("in docking station: \"",?.~.name,"\""));
' M+ k% g( o2 B& Q0 s) E# ^ end;3 C* F$ J: N- s9 w
else, C+ A: H g8 m, T/ U" G- V
@.Destination := assignLObj[1,row];
" N7 p# Q. q1 ?* r3 [$ j5 ]5 A end;
6 \1 u/ ~8 C4 V* Q newDirection(@);0 V! `) W C, e+ M" F
@.HasOrder := true;+ d0 f3 S7 k9 l
end;2 L/ u+ U5 _ K% U8 b3 n
end;
% M" G3 g4 o: @4 [1 Aend; -- of the method$ }6 x7 ?% w5 I- Z$ F$ p" n) G
|