/* called by: entrance ctrl of the object 'track'
) }( G- H: {- Z$ j*/
/ y6 y# y# f/ {0 v: n( F) zis
. B7 X9 d1 A' t! g0 _) N0 q+ d part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 V0 N4 F. x5 P4 B
do) }1 S% F9 O! M( t4 r
Lan := rootfolder.Internal.Tools.AOLlanguage;
( h) [( W3 S. R+ Y if current = @.Destination -- else return e( f. o8 U/ X( W1 S& i
then
3 _' `) x4 Z& y- A5 K) P @.Destination := void;
6 I* V% N" N, X$ t if @.occupied then
0 g, x4 O. ]7 b8 J# c part := @.cont;
) o1 p+ I- z" O @.transpOrder := void;
7 W% Z, B1 y( d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% e( t$ ?/ K8 i. ^; T0 p @,root.eventcontroller.simTime);% E: [& M: O7 o6 D. K: M
@.HasOrder := false;2 m8 B0 V# p% t2 B- B7 N$ {
@.DrivingHome := true;% k1 b/ H9 d# E
rgManager.tryToStartTransOrder;! X& h/ G* c& j k( {7 a N
if @.Destination = void* Z4 A {% N! C( ?/ l
then -- no transport order for vehicle @
- K- [6 h1 a; I( E7 z& Y/ } O! ` @.Destination :=0 P& j6 l, v: ]( ^) Q- L* Q
rgManager.nearestFreeStation(@,track.~);
( Y9 ]" y: @! H9 V n0 _ newDirection(@);
8 W, M* f; D7 }2 \8 C! G if @.Destination /= void then
! \- _/ U: _0 w9 Z2 ?$ d @.Destination.NumReservation :=
7 _0 q+ S4 j- f/ C8 m @.Destination.NumReservation + 1;
, N9 ]! ?, a. N, T& v1 K end;
8 Z# s- e! ~4 y' l @.CurrIcon := "drivingHome";' M) K6 _2 S. _! H# `1 A
@.DrivingHome := true;
* c/ I" v/ Y7 q8 [0 r; S+ m: D1 A( Q end;; k7 Z* s7 v7 W/ f; n+ m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( x+ F8 Q( W0 o! y
part := @.transpOrder;) ]0 d, M5 j: n9 C* H, J
part.move(@);-- load part
% O8 k) n0 L' }2 G" ? @.CurrIcon := "load";
* W( ~6 }9 h4 \ {. s GlobalDistObj := part.globDestination;
; I* W7 U( h9 ^$ F$ R0 J7 j assignLObj := rgmanager.rgAssignL; s1 \: R3 h2 F8 _( @: Q' \
row := assignLObj.getRowNo(GlobalDistObj);7 i/ S5 Q6 Z5 a- x/ L/ j
if Row = -1 then -- since 704 G& O$ ]/ |- h0 Z8 [9 H
if lan=1 then
5 d5 e7 l9 ^: j& B6 X" [$ K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# n( I7 a: A8 A: I8 o* s" O* x- O
to_str("in der Andockstation: \"",?.~.name,"\""));' e% f8 L2 E; x3 k
else+ G6 g7 Q7 s5 v6 V0 \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( x% [1 z( O) S( }
to_str("in docking station: \"",?.~.name,"\"")); 0 N, e2 b" a+ N
end;
4 a% y* d7 E# k8 C+ `# u else
0 I2 M7 D. q# Z* J @.Destination := assignLObj[1,row];
! g3 ^) d! y0 t( t end;
/ a1 ]/ t; q9 b9 ^7 Y+ [ newDirection(@);
7 l6 \% }6 o: t, k! q @.HasOrder := true;& g2 j* v2 ?5 s( K
end;( k# p5 k' R4 w
end;0 d- [ [0 y3 C7 J8 r3 A
end; -- of the method
+ b0 o- F5 K A: N6 b8 E' p. K |