/* called by: entrance ctrl of the object 'track'
+ z3 ?8 u& l. a+ r) Q3 D1 |*/
- S0 q( `8 f5 wis1 D" A3 M. f5 ] j* o, b5 n
part, GlobalDistObj, assignLObj:object;row,Lan:integer; \, F* g0 g# O- U- K8 J6 H
do) ?, V8 r" @1 p
Lan := rootfolder.Internal.Tools.AOLlanguage;+ E4 D) ^2 q# I7 L
if current = @.Destination -- else return
* R- @- ^* w& z2 A then
. Y% y' a" K! p$ i" ~ @.Destination := void;
5 @0 O9 R5 }0 m5 L( [ if @.occupied then' I' W2 d; F) O5 k, _* V: _
part := @.cont; g* s) v2 ^' I0 S8 i
@.transpOrder := void;2 G f& p* b4 z1 O4 x9 | {( S' n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 l3 z [# T4 B/ A; u* s @,root.eventcontroller.simTime);
1 Q5 z+ J" t% e8 N+ I$ \ @.HasOrder := false;
/ O. |# J0 Y. Y m0 S! d# a' F3 r @.DrivingHome := true;
- x4 L% Y) K% K% l rgManager.tryToStartTransOrder;
6 Q7 _8 H G, p/ o1 K+ T if @.Destination = void
4 O% t, _5 I$ {6 y2 }/ w/ x/ z. B then -- no transport order for vehicle @* r' {' P u1 u$ ?7 O
@.Destination :=5 y/ a8 O' ~5 _& K; P
rgManager.nearestFreeStation(@,track.~);7 E$ I. S' T+ _4 C( x+ ^# E W0 V
newDirection(@);
9 X ]' _0 X8 k( Z: K5 S if @.Destination /= void then
$ O. ? j9 |' q! `) o9 S$ R9 I" v ~ @.Destination.NumReservation :=3 f; i1 Y8 R7 v1 l6 C5 F! @3 x
@.Destination.NumReservation + 1;( f9 C+ E- K+ i0 I+ n7 `0 L
end;9 q4 U% _6 O% v- [- P& a/ Z3 H( q
@.CurrIcon := "drivingHome";
1 h, M3 y5 S7 Y7 K" m @.DrivingHome := true;
; c T) r3 Z o" j end;
9 T( N2 h& e8 N, d$ ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station& h! O& Z! s: V! i0 J
part := @.transpOrder;
( t" ^7 a0 J6 f5 E6 e* ^9 F8 z part.move(@);-- load part
" a/ T# q# y$ h+ A9 L, w5 y @.CurrIcon := "load";
2 w" N4 a- |0 q7 x8 a GlobalDistObj := part.globDestination; Q5 X$ Z7 K) e, H) t8 d
assignLObj := rgmanager.rgAssignL;3 o z- M7 i* w! B
row := assignLObj.getRowNo(GlobalDistObj);
4 |) u& R" y9 n+ H* g1 r if Row = -1 then -- since 70/ D$ t" o5 j% Q% C/ y
if lan=1 then9 T; r4 e/ b$ u- g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: _4 g" g- @1 S( ?. r" Y; G to_str("in der Andockstation: \"",?.~.name,"\""));
6 ~+ f( w3 t& X. G" ~1 M1 O else
# U0 r2 v$ z4 F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 c( E4 d& \4 i( | to_str("in docking station: \"",?.~.name,"\""));
. F: b" U% V( a1 o3 u( j end;0 ]- v+ B+ r% l2 b8 }5 b+ B
else
6 O$ ]) V R( J# J @.Destination := assignLObj[1,row];# \+ f; Q; }* o ^) I- d
end; 2 {$ L8 m! z0 M5 x
newDirection(@);
! }2 i6 [7 r. w$ C6 [ @.HasOrder := true;
( p- e$ {5 ]& x' g& k5 @+ ^8 k end;1 @ ` J, h9 V5 W0 r4 q" v
end;9 |: d. J* \+ \5 T) I% D
end; -- of the method
( m( W- d& B9 M/ D" F! I: M |