/* called by: entrance ctrl of the object 'track'% N' r$ K% ?* i3 n J6 h
*/
# H+ P4 W, ?4 G3 Jis/ E; k% a5 W2 G" n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( {1 R( z6 T5 o. p0 Qdo$ G6 ^9 M9 g6 h/ p1 x& G
Lan := rootfolder.Internal.Tools.AOLlanguage;, Q( c4 Q a) [- r/ K
if current = @.Destination -- else return0 k q+ T. M D4 o
then4 b; }+ ~7 f- H8 J5 K; |) t0 c
@.Destination := void;! r" `0 o0 B- z; g4 j! i1 |* H) [% e
if @.occupied then% M; ?5 G2 g1 n
part := @.cont;
; `/ v& {& \; _# U7 \ @.transpOrder := void;
7 O, `! i ]" g+ L: g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 F0 A( Y1 R4 ~- e; h, D: S
@,root.eventcontroller.simTime);0 O0 n; K4 J; U0 l g
@.HasOrder := false;
( b3 G7 o$ Y' @1 ]% `" h @.DrivingHome := true;3 g" Y. y6 x# k q+ v
rgManager.tryToStartTransOrder;' |, ]0 B5 g( c$ o
if @.Destination = void6 L- V# Z1 L* I
then -- no transport order for vehicle @
& `. J4 f* f( w* Z; N @.Destination :=" }' |4 D/ d4 @& R& k. U
rgManager.nearestFreeStation(@,track.~);6 Y9 f" q* P1 u& q
newDirection(@);
" h+ s( g* c3 U. H; h if @.Destination /= void then: Z$ \- [% @, x
@.Destination.NumReservation :=0 ]( w" c5 x3 }
@.Destination.NumReservation + 1;
4 M7 s& e0 t6 c, E+ ?' N. A end;( s" ~* y" y# m! \) F% o
@.CurrIcon := "drivingHome";
5 H3 P$ p6 D' C9 `/ X( ~+ w @.DrivingHome := true;* Z4 u. u4 n J6 X- f3 j
end;% r8 r* w/ ?5 m* [/ x/ F9 W1 w! n `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 h1 S6 v; j& E& B# x
part := @.transpOrder;
0 C m' K# L& R: a2 ~0 r* S part.move(@);-- load part7 P" q- ]+ ^% W0 C0 Y
@.CurrIcon := "load";
2 k5 R' a( w2 T# f$ C C! Q GlobalDistObj := part.globDestination;4 q- Y+ `: [0 D% C! ^9 i
assignLObj := rgmanager.rgAssignL;, H: Q; _/ B3 X3 I
row := assignLObj.getRowNo(GlobalDistObj);
# W' a* d' v: o1 y. P if Row = -1 then -- since 70
& p3 U) \0 Z( D0 M9 S if lan=1 then5 Q# u5 a3 z+ e- W. j8 X# S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; c' v$ l( B; i
to_str("in der Andockstation: \"",?.~.name,"\""));
; P; }/ g/ F' A0 Y7 ]+ q1 }" }! T) W else
/ y+ U8 U7 e* U. S& u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! b# x4 u6 F" Y to_str("in docking station: \"",?.~.name,"\"")); 5 H$ `2 H/ ?8 l/ N, d
end;
6 o! Y# i( y6 u else
# \- \. y7 P7 i* z4 k4 e @.Destination := assignLObj[1,row];$ s3 \& `/ T; O$ T' h
end; t* U8 I6 f# S! s, u k" R* A
newDirection(@);8 G6 i" A W3 k$ U" s4 F) j4 V
@.HasOrder := true;- I, Z; P! k' ]% J$ r' v- r
end;, b; H" `/ Q1 A4 Z/ y3 z; C. T
end;
* z; B. e, v* [% Q& xend; -- of the method" }0 K; U3 v' r- Q2 _
|