/* called by: entrance ctrl of the object 'track'' R7 e. F2 L( z X1 w) |1 B
*/
" [& {$ I4 E3 p& T/ Sis
9 E1 {1 Y; u, A3 B. g part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 C* \. I+ P) z4 ~
do3 T; M. I4 c2 m- s/ b: u
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ O6 f3 z7 R/ U4 c- I" e if current = @.Destination -- else return1 B$ Y" g: }6 k' f3 j, R3 P: X
then
0 |% ~, x+ Y- ~ @.Destination := void;4 q6 _: ]* T8 U, e7 D
if @.occupied then
* N" F8 }( V0 q3 l part := @.cont;
( P1 k2 V' J {, H$ d, e @.transpOrder := void;! j) ~) Z% b1 a8 d+ Y, a# ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 ^* @ _$ u' j% J7 S8 f @,root.eventcontroller.simTime);2 [" m/ [ {7 V2 M( Z
@.HasOrder := false;7 {9 D. i' T; Y/ E, }
@.DrivingHome := true;
# w4 h7 g9 z! o' y$ J' x/ v% w" Y rgManager.tryToStartTransOrder;
. I6 j7 H- X9 h' X! E: [* Z/ \/ m5 ~ if @.Destination = void
# e- a" @0 k8 E+ t$ G! \ then -- no transport order for vehicle @4 X2 Z4 @8 A7 D; M- ~* F' B2 k
@.Destination :=+ d Y1 z! n4 A9 X
rgManager.nearestFreeStation(@,track.~);
8 t, w7 v' ]1 `9 J newDirection(@); # b! R0 s z2 N5 g
if @.Destination /= void then5 a |" r2 L t' q0 l
@.Destination.NumReservation :=7 V' N) X( y" M
@.Destination.NumReservation + 1;
3 }' {, m6 J' N8 _$ P end;
Y4 z8 |% T# G" B @.CurrIcon := "drivingHome";9 k9 c( i% k Z* w5 c* B4 K
@.DrivingHome := true;7 l3 {' _" c, A2 w& ?% i
end;- {1 `# l3 t* S: E. f8 Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. [5 o) E. m9 p5 y. _; b1 S part := @.transpOrder;
/ |) [- g# ^& W p" m1 _/ z! g part.move(@);-- load part* y" v& F. t% r! y9 Z0 z
@.CurrIcon := "load";5 a# U( Q4 g8 |- q% T
GlobalDistObj := part.globDestination;
/ ]& r% X1 {) Q. A assignLObj := rgmanager.rgAssignL;4 w+ W# y, ]( G
row := assignLObj.getRowNo(GlobalDistObj);
9 |+ d$ u9 Y# ~& v if Row = -1 then -- since 708 r) M' j7 E: w: c# q- E1 m
if lan=1 then
' i+ r& \4 r) R4 _0 I( H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 ^9 P* u2 e6 ]) R/ ~5 X to_str("in der Andockstation: \"",?.~.name,"\""));
9 t: g0 m! R" ]0 S/ D# A% U else N9 l6 ~7 \+ w& h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* z1 ?1 w/ g6 n7 p* O! E* g! e
to_str("in docking station: \"",?.~.name,"\"")); 9 U& ]# v9 d. E
end;
6 d* z- T$ M: {, e! C7 ^ else
# @0 B, V2 _- f# _! f7 v' ^5 ` @.Destination := assignLObj[1,row];
, {0 ~# \8 f, |; z* B( Q! u end; 7 i7 h" n) [2 Q4 [* _7 ^" d
newDirection(@);, e( h2 B& e6 x* k
@.HasOrder := true;6 f4 b ?9 |+ Y; P
end;/ C+ l; O% k0 M( v; E: z* S" M
end;
( P! O+ b; S! O; lend; -- of the method
& l1 z8 |& z- b; ]4 p- l8 z |