/* called by: entrance ctrl of the object 'track'
0 Y$ D6 Z; }' j5 I t' f*/: |' x, I2 B/ v5 X, g9 x8 G
is
) G$ F3 }; L3 ^) W5 Q: T# U part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. C" w; z A7 h1 V- Y {do
6 {! V, B! t4 E! y8 L Lan := rootfolder.Internal.Tools.AOLlanguage;
) W" K7 D) W' {6 N1 a. Y if current = @.Destination -- else return
2 Z1 O( [+ C {) |. W6 R$ `0 m then# C' c& A& O+ I a
@.Destination := void;
/ V' `0 L5 q7 ~7 {$ | if @.occupied then* R* Q+ c6 y+ |7 i& Z( q5 R
part := @.cont;
$ d% O" L( {, |' `/ V @.transpOrder := void;
4 N5 T" F& l2 U; E$ H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- K$ G6 Z1 n5 ?& x @,root.eventcontroller.simTime);
- g, a2 Q% R: T: N# d/ Y: J @.HasOrder := false;
% K9 m2 S4 d& P. X0 C: g @.DrivingHome := true;
% ~1 W( ~4 K5 Y) f$ E rgManager.tryToStartTransOrder;
& ]$ C, A" V' S if @.Destination = void, N r1 B2 _0 z, `( Z# s/ S
then -- no transport order for vehicle @
2 [+ t9 ~- r7 i% Q$ | @.Destination :=' c4 e' g) X4 W- h3 S
rgManager.nearestFreeStation(@,track.~);/ [5 | `& `. [( U9 r
newDirection(@);
- m2 b# @4 s# D( n- A if @.Destination /= void then
4 V# T; ?0 O4 n. h: y; u5 }$ i @.Destination.NumReservation :=9 q- t% |* h' n
@.Destination.NumReservation + 1;; ]: V+ }' N, Z/ m% v2 L7 R$ D
end;$ f2 f' @. ^; U" b* ?
@.CurrIcon := "drivingHome";
( m1 z0 j: C* R @.DrivingHome := true;
7 Z3 {! o9 z( D" W; w6 O0 l8 Y end;
l t- S2 g/ G: K, I1 T else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 |9 C7 [9 X+ e! v Z& T# a$ w
part := @.transpOrder;! q% Q y" `( N6 g& `& k( b {
part.move(@);-- load part: F/ b2 m& C( J3 x
@.CurrIcon := "load";1 i' ~, I! [! g* q7 w7 w" R
GlobalDistObj := part.globDestination;/ G! s* S: T1 B
assignLObj := rgmanager.rgAssignL;
+ c( G* P$ r* ~& [# Z5 Y row := assignLObj.getRowNo(GlobalDistObj);
; b0 S" s$ z; E* ^ if Row = -1 then -- since 70) t: i" ^4 N" ?# V7 d
if lan=1 then
a7 N/ x u# m& p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) n/ K8 l4 G3 s+ K to_str("in der Andockstation: \"",?.~.name,"\""));( L, m3 E, z; o: {5 }
else! Y9 g3 ~2 L' ^* B# X+ m- Q4 g/ j# K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" B$ t$ `# U+ x2 X to_str("in docking station: \"",?.~.name,"\""));
% G7 j- m5 N( u end;- i: [- u2 W* h% o$ w* Z
else$ i6 c; @6 ?3 M" o; g6 i
@.Destination := assignLObj[1,row];( `9 ?+ _% T7 d1 J4 o2 }) S, X- r' ~
end; $ Q3 z( F/ b! ]4 L- ?5 s% t
newDirection(@);
' j5 A" v/ l5 Y! I! q3 X @.HasOrder := true;! i& }& P8 }# ~; u
end;
: Z: R: \" ]8 s" k% z8 J$ ? end;
5 O; Q& ~) }& K; n1 zend; -- of the method
: Y# q' T- g1 z% v |