/* called by: entrance ctrl of the object 'track'" X9 I$ r8 i2 D
*/8 v; W4 k1 U2 T7 u8 B. L v
is- v/ [# D( K! Q6 w \
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ M$ n; f0 N9 F% H3 ]9 ^& L+ kdo
7 `! h, L9 f1 G/ ^0 C' q1 J f Lan := rootfolder.Internal.Tools.AOLlanguage;9 }1 J3 d- M. J7 D) Y
if current = @.Destination -- else return
9 T) G, s, ? _, s7 a then
) \* W6 F& m3 c @.Destination := void;* G8 h6 ^$ }9 H1 u3 F D
if @.occupied then
3 o% `0 w M. p part := @.cont;
; H# @" M, ?" K9 l. d9 ~$ g @.transpOrder := void;7 t& R, d+ e3 t% j% R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- B; l; O S: O3 u2 }8 p8 n
@,root.eventcontroller.simTime);
8 G9 I# f" T: b+ _& P0 M' J$ ]4 a @.HasOrder := false;
0 U' `! ^' y S" O$ k' t @.DrivingHome := true;
0 f( X% E4 b% K+ W3 O rgManager.tryToStartTransOrder;2 X3 P. L: ]/ }2 y a/ J
if @.Destination = void
" @/ x/ o) |9 h' P8 D then -- no transport order for vehicle @
# \' {+ X2 B; B, Z( V- @+ V- } @.Destination :=: _% v8 t8 e. E9 w+ a) h7 i
rgManager.nearestFreeStation(@,track.~);5 T8 l! M! K* n* x4 J" c% F- ~
newDirection(@); % f l9 H, B& ?& q$ T; v; K! E. l
if @.Destination /= void then/ @7 [% e3 H" @/ H! f- `0 m" ]
@.Destination.NumReservation :=
1 ?. l) ]; Y' V* q4 x8 Y @.Destination.NumReservation + 1;
1 h6 V0 k1 x! P1 L) b4 q1 U/ m* B end;
7 A2 W0 @/ I! Q$ i0 f, ~" { @.CurrIcon := "drivingHome";( i4 i6 v! n4 v6 L& v
@.DrivingHome := true;4 f# i. j7 m( D6 C9 J4 Z6 Q! x4 J
end;
! I7 L7 x7 ?2 Q& n( F; P; k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 k6 |) k. `% o; z* v1 @4 M part := @.transpOrder;
1 a {5 y6 b; K6 [! V9 c part.move(@);-- load part
# E/ v$ G0 S; m U' }2 w @.CurrIcon := "load";
6 k. y/ n: \+ j GlobalDistObj := part.globDestination;, |3 l7 Z& R7 w* T ^
assignLObj := rgmanager.rgAssignL;5 k9 t9 f$ x% J0 d
row := assignLObj.getRowNo(GlobalDistObj); {* N* {; X. O) z/ @
if Row = -1 then -- since 70
' z; F# T' I% B2 P7 U5 { if lan=1 then/ P0 I' d! v9 \- Y1 H5 \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 N* V9 I; m3 a4 `6 f/ ~/ ^
to_str("in der Andockstation: \"",?.~.name,"\"")); V) s7 I; x% f1 A7 ?$ v& Y, m% J
else6 N0 g3 `( x& z l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, b- S( b4 f, y
to_str("in docking station: \"",?.~.name,"\"")); $ K7 j) {* C/ O* g% r" f- o
end;
7 J0 H& }# M3 N* g else7 Y# ~1 w" P1 n' D
@.Destination := assignLObj[1,row];
" d- i5 L( v( w4 f end;
+ J6 {: i) i' ~ newDirection(@);" o0 K9 F& I$ n4 E' i# ^9 V4 s" H0 ~
@.HasOrder := true;/ y" u" Y5 \+ P0 j z; M. ]
end;3 _) I7 F( v/ U
end;' d6 s8 T$ [# o# L
end; -- of the method
* ?. j7 z4 r6 [, \. a1 l1 _ |