/* called by: entrance ctrl of the object 'track'
$ m. t$ C, z, R5 x*/
( `1 J# Q( q9 n. j" B: ^, W3 Iis, Z! m' F( ?: r" F( F* q: P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 @) f. {8 Z$ r8 F8 E0 ?
do( Y! y2 s. J1 `9 {
Lan := rootfolder.Internal.Tools.AOLlanguage;( k. M0 z- K1 \8 V
if current = @.Destination -- else return' I' N0 G I% y5 i
then( N0 E6 W+ n8 h' V* O2 ~$ [) o( }) ^
@.Destination := void;% p* C( \; a3 {
if @.occupied then
4 ]: O$ t5 z6 w# _+ w g2 P part := @.cont;# g& o) t" \" V
@.transpOrder := void;
; v5 p( `5 E. T+ { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 M8 A% I n+ W; c3 t" m @,root.eventcontroller.simTime);0 V0 g# w/ A0 A1 o
@.HasOrder := false;
$ _) ?6 h" h2 M6 @ @.DrivingHome := true;
$ Z! t6 H: J( o7 g5 Y: O( F% t rgManager.tryToStartTransOrder;0 g( A2 d V/ n9 ]8 t, ]1 y
if @.Destination = void
- g' k, G! J: y5 g0 U ~9 Y' i1 | then -- no transport order for vehicle @0 n1 k1 r% W; ~, U; d- l
@.Destination :=
" L. a% s9 ^. w$ {8 D' T4 x rgManager.nearestFreeStation(@,track.~);" k4 e& Z0 `8 b, I7 N1 n$ e
newDirection(@);
" y# x% W7 | A, u. Z, f if @.Destination /= void then
4 I9 }: E+ l: L& l8 ] @.Destination.NumReservation :=
9 y# ]5 F! G9 n$ s5 S @.Destination.NumReservation + 1;# W. q; u# J4 ^* n/ @- K# f2 Q7 G) P$ N
end;
$ u& I' j( }4 U9 | @.CurrIcon := "drivingHome";
) ~+ g8 d4 C' J1 f @.DrivingHome := true;0 v, T1 K$ J0 w! J
end;4 S. E. P: c8 f" G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' ^6 Z6 _1 d! _+ Z
part := @.transpOrder;
, c* A2 w( m6 t" X* \) ?' c* I part.move(@);-- load part
$ t% S3 E% {7 L& F& w @.CurrIcon := "load";
8 R2 o' M0 U! p. ~: r GlobalDistObj := part.globDestination;
! x' ?9 E% A5 Q! s assignLObj := rgmanager.rgAssignL;
& Y9 w2 _1 Z" } row := assignLObj.getRowNo(GlobalDistObj);8 L: ^7 e! d7 r/ Z1 F' n$ ?& z, p
if Row = -1 then -- since 70+ h: a# o) Q& M+ ?3 f; e% J% ^1 p
if lan=1 then ]" a" Y G) G. B5 h# c) v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( }+ t: p6 A7 @/ J& [& ]1 S
to_str("in der Andockstation: \"",?.~.name,"\""));
( x8 s# Q: ~3 t! ]4 a# N, u else( S" f; S( P- Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, |4 w* F9 V( s/ o1 Q- u2 Z0 q to_str("in docking station: \"",?.~.name,"\"")); 3 z$ ^) D8 ]: I% t' K# X1 {+ m
end;& K* V9 M& A5 C/ d) ~
else; M' ?2 u9 w) w, M- `% G
@.Destination := assignLObj[1,row];
9 x! D% v' F' W1 } end;
- w# @0 @6 h4 G Y newDirection(@);
" j0 s7 O% a* p# N @.HasOrder := true;
" H% R0 h' [8 a4 \3 _ end;
* s- q% m. A# M, P end;% n O- q0 r2 p4 C
end; -- of the method( g6 S' F1 n2 d+ y
|