/* called by: entrance ctrl of the object 'track'7 Q9 S/ N; O7 u6 K+ O6 |6 d1 S. R7 m3 I
*/
& E; @* y/ }# H( C* h; v# Sis- _+ i# \3 j& l, N1 N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ W( h! F9 C% T2 g+ n
do
; d5 @, D8 y4 I0 L5 I0 h Lan := rootfolder.Internal.Tools.AOLlanguage;! N/ q& ?9 k4 I6 y1 ]
if current = @.Destination -- else return
$ H# E0 N; B W then
5 O+ |9 a% ~0 k! \0 ~/ y& O @.Destination := void;
7 N2 Z4 g8 A# y8 I/ z* B if @.occupied then2 E0 H+ Z9 G8 D8 H, C, J" ?
part := @.cont;/ u/ ?; g9 \( h5 Y* K
@.transpOrder := void;1 q, t$ N/ _4 A. c7 ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; q) D2 b' z9 K- F; g# V6 W @,root.eventcontroller.simTime);
, m5 s$ h: a( A9 X7 m( g @.HasOrder := false;
( k! b4 a3 e. M; E% l2 d @.DrivingHome := true;& }! D. {( q& I' k! K, _
rgManager.tryToStartTransOrder;
' y% }( ^$ J9 L( j: L if @.Destination = void1 V6 A5 Z+ D! [8 G% P
then -- no transport order for vehicle @: Y" {0 T' Y3 J+ v5 r( ?' x
@.Destination :=
* `# L( C9 _. R+ w rgManager.nearestFreeStation(@,track.~);7 f9 ?- b' q3 g0 [( t2 M
newDirection(@);
% ^9 i9 p$ ^& a3 J if @.Destination /= void then
" B9 s' ?3 U! ^ @.Destination.NumReservation :=# B- {3 {5 h! ^0 K( A
@.Destination.NumReservation + 1;
( W6 @& f, j. n3 k$ N; r) y, {0 r T, ] end;8 t( F4 h% s$ S1 O7 |: g% X
@.CurrIcon := "drivingHome";
; T8 L' @, R ?: c1 X, ` @.DrivingHome := true;2 r: [4 P2 ^! x" Y z/ b
end;
1 V. h. s' I9 Q* V else -- the vehicle @ is empty, both vehicle and part are in the same dock station _- M0 `- o, U& V3 D. Z6 j& v
part := @.transpOrder;
1 Z; S; z0 K' X4 b part.move(@);-- load part
4 `% J. I! ]1 R @.CurrIcon := "load";% ^* r: C1 V+ p
GlobalDistObj := part.globDestination;
3 x L D1 `2 {' s, x; v- e4 R: e/ R assignLObj := rgmanager.rgAssignL;
/ f4 C' E" j- g( \7 ]8 t$ @ row := assignLObj.getRowNo(GlobalDistObj);
/ `2 _0 Z5 X4 ] [" v+ t if Row = -1 then -- since 70+ h% \- H7 N0 C" b
if lan=1 then
& t/ i, r1 B1 z5 V% y5 U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 r& q3 [6 a; M% r( l/ U7 z+ ^/ a to_str("in der Andockstation: \"",?.~.name,"\""));- F% N9 r4 G. O9 G# q
else4 ?1 n' Q, g1 x& j6 {4 D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 S- y4 i& r* \% y" w1 h
to_str("in docking station: \"",?.~.name,"\"")); 3 @) k7 c( _5 j7 g& P
end;
: B5 X$ ~9 @3 q- W$ I else0 v8 h0 j3 z- L( t0 j
@.Destination := assignLObj[1,row];
/ w2 ~* e; l5 i7 x& w' N% Y9 M end; 8 f4 a: X# g; K$ f) K) k5 I
newDirection(@);
1 O( z" X% z' m- Y$ ]& Z; O& h, t8 D @.HasOrder := true;
# E& j; |# } T, H1 y end;
# F6 a8 W/ M$ L# C0 P7 @ end;
; |$ f$ K- o1 o- @end; -- of the method
' M, Y0 z& r' u/ W: e |