/* called by: entrance ctrl of the object 'track'
# Q8 o6 ^$ v3 ?*/: Q* s. n+ c) f. p0 ]- X$ l
is
6 a, I$ N& E2 z0 T, p" a( E8 ~ O part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 ?/ g2 |6 @, }' x2 W" y* L) xdo
" t% W4 q9 l, u% J. y* R Lan := rootfolder.Internal.Tools.AOLlanguage;
0 ~$ S* c8 e& r0 _ if current = @.Destination -- else return
4 t3 `* y9 Q- O4 s; ?0 j then4 t& x2 B: P" M9 ~6 M& `
@.Destination := void;1 o" i% G: F: s9 x; ~5 V% c
if @.occupied then
M4 ^* N- r. q9 o6 c$ T5 G part := @.cont;7 g- p' @: { q+ j5 A
@.transpOrder := void;
3 |# @' y$ ^! v+ N7 N. F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* D4 h2 u$ I( k" B8 v @,root.eventcontroller.simTime);% u y* s) E8 Z
@.HasOrder := false;; u8 S& Y9 \0 N+ t! F$ g& I
@.DrivingHome := true;
# V0 N" F+ v6 ^* b' J) _0 g rgManager.tryToStartTransOrder;( l* {: ?! ]3 `3 G. W# @ s: v
if @.Destination = void
' q8 |1 \5 ]8 o) D0 f; { then -- no transport order for vehicle @
0 D [) _1 {1 i* p @.Destination :=# x4 Z0 k3 y/ p; Z, _" A& Q) w# D5 n
rgManager.nearestFreeStation(@,track.~);
* H$ D$ J4 `+ W- B. P' G newDirection(@); 0 \6 T6 q6 z5 \5 K/ S
if @.Destination /= void then
% w5 W& H% ~/ D6 S* P/ J& D @.Destination.NumReservation :=
: f r8 T$ }$ ^7 B7 g @.Destination.NumReservation + 1;
1 @: K2 m0 k5 i end;
/ I, I1 Y# m5 G+ \' M" c @.CurrIcon := "drivingHome";
; h [" a6 F, P( W: r2 H4 j5 J9 X @.DrivingHome := true;5 c. X" j7 f& J5 Z5 }1 c% q3 O
end;
7 S% n, |) q$ p( x5 Y5 g+ Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. I. }# h* y/ q& G9 Y( ] part := @.transpOrder;
! @( _3 r' t/ ~& A part.move(@);-- load part
7 S! v; w2 d' u- r: _4 v3 N @.CurrIcon := "load";
$ p6 c6 t6 W" e6 E$ Y) T GlobalDistObj := part.globDestination;
9 w* c" |6 j/ B: |$ O assignLObj := rgmanager.rgAssignL;
& t+ d" R7 f0 {7 {9 f0 b3 e- V5 n, W% F row := assignLObj.getRowNo(GlobalDistObj);9 ]( J: ~3 O# k, W/ ?. f* P
if Row = -1 then -- since 703 p. d. Z; I: T3 X# u- U
if lan=1 then
# p( \, `. c% ?- z- h& K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( D% m, y7 H0 i1 I' j/ l( @# F
to_str("in der Andockstation: \"",?.~.name,"\""));9 V: \- U! c7 [7 N: i
else" K# |; x, b1 ?: s& o# L( y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* k4 Q, P5 O k* F to_str("in docking station: \"",?.~.name,"\"")); 6 J. t3 e, G0 e; @4 {
end;
$ |. z0 f) L# k+ v else7 \2 Z" r, e/ j+ ?5 r
@.Destination := assignLObj[1,row];
r( E- E& c( ~0 |* {1 ?* ~& p+ ~ end;
0 G; p; ]3 D2 `; l$ y9 F3 x. K newDirection(@);. _1 m- L' ~+ n$ `% T2 c
@.HasOrder := true;5 I5 u+ r ^6 @0 H8 k: u: c1 E- j
end;* @4 ]9 i% M2 `+ k
end; K! X: d2 p; g. k% t2 G
end; -- of the method2 c# ?- _+ N P) C+ ^
|