/* called by: entrance ctrl of the object 'track'
+ }& v l+ y+ ]*/4 ~. w0 `$ f0 { C
is
& n: C7 f$ N4 g+ G0 [# \! W part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 R% h% a+ o, i1 b1 v) T) A# @
do8 C6 [) ]5 [. s$ e
Lan := rootfolder.Internal.Tools.AOLlanguage;
% D* k0 C( Q9 L, m3 W if current = @.Destination -- else return( D& S( X& v! @" y! B; y! p
then1 u* p4 P% u6 P" z3 R, J: P
@.Destination := void;2 G2 F$ K$ ?$ a' a* P% t4 r- s
if @.occupied then
- f- q+ L0 L$ G- Y* m4 t% F2 Y% L part := @.cont;
f4 r) s6 B( G% | @.transpOrder := void;5 ^- i% I: y! j( C- o; d! q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 _4 b7 t# e; K6 T' z j3 \ @,root.eventcontroller.simTime);) P q0 _ p" @
@.HasOrder := false;' P/ a# X& }0 }8 S; M2 U+ G
@.DrivingHome := true;
3 `! A0 G( L+ | rgManager.tryToStartTransOrder;" Z, w' u$ [, b1 E( m3 }( s2 E2 k: e3 \9 h
if @.Destination = void- Z: u* e4 o; x& d
then -- no transport order for vehicle @
# ?% f' X8 S- Z- {$ S; Y @.Destination :=
( n3 h1 M) I" E- a# y/ q2 ^0 y0 N rgManager.nearestFreeStation(@,track.~);
: M7 ~7 A8 p+ H% h1 e, j1 _ newDirection(@);
3 i% N( w/ f9 X+ u if @.Destination /= void then6 x, v( [% m, c- A! y$ p9 e
@.Destination.NumReservation :=
. d9 f: }7 [% g) S2 p @.Destination.NumReservation + 1;+ G( o9 S$ ^. L. [
end;
2 w1 x4 J( y- c/ c @.CurrIcon := "drivingHome";
2 s/ w2 `" V0 ~ o+ { @.DrivingHome := true;6 \ c0 e$ ^# B! V
end;
- E5 f) n# N$ ]) M; I8 n! { else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 ]( f* Q+ h9 z" I: c0 m
part := @.transpOrder;
3 `) f, G4 |3 C part.move(@);-- load part
0 ?5 D. T7 n8 j/ x @.CurrIcon := "load";. `9 _1 E B4 {7 L$ ^
GlobalDistObj := part.globDestination;9 u$ {' {3 S* S6 W4 X
assignLObj := rgmanager.rgAssignL;( p2 h! m9 e3 q- @' i
row := assignLObj.getRowNo(GlobalDistObj);
' _3 _7 m- v* o( |7 p8 M) ~% P1 K if Row = -1 then -- since 707 U: @0 ]' z, v3 k. a7 o/ o
if lan=1 then+ m: c. ?" f* K( a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- x) {+ z# x* S; T& C to_str("in der Andockstation: \"",?.~.name,"\""));
" F) T8 |6 u/ n else# @& M9 S8 r/ {# A5 f. ?9 u ]' ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, l+ b( B2 g/ V* |$ n1 |& ~* L to_str("in docking station: \"",?.~.name,"\"")); & \2 w7 _4 P# }' ^/ C+ ]
end;& |3 a* I6 M$ ~0 b# I/ a5 |
else
8 I; @1 ]6 V! H @.Destination := assignLObj[1,row];
6 e) B; e1 e/ Z0 R4 |5 h' S: R end; 4 M$ w( q* J" k( x" S
newDirection(@);
0 s N+ k! g6 o+ N @.HasOrder := true;$ x1 L4 t8 b8 e% { N+ A+ O
end;6 t8 R0 x) b( k j& [3 }( {
end;
8 u' _1 T0 U6 A5 y1 Zend; -- of the method' u4 V! T; `& ^6 [. c9 M1 G8 Y
|