/* called by: entrance ctrl of the object 'track'
* k2 @, T4 D1 J*/$ o* \8 [+ E/ q" e" e# k. H6 p
is0 w8 q1 m" B: S0 Q& r4 N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" L( t# h( M R/ ~$ u; c' b, ydo
2 T3 ]4 L9 \* _ |3 L+ B; @# m Lan := rootfolder.Internal.Tools.AOLlanguage;' f# _) k; K7 F6 t
if current = @.Destination -- else return0 D4 f0 R* R# N, c) |# ^
then
) I4 V' i" q4 z7 \( x9 H: C @.Destination := void;# Q/ p" U {( W2 y0 O4 o4 N
if @.occupied then
9 N4 ^8 n' ~4 D* b. j1 S part := @.cont;
0 }' A7 x# I2 C @.transpOrder := void;' n& u! T* X3 p6 f; }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 B1 l8 b5 y$ m! O6 i
@,root.eventcontroller.simTime);
3 v. `' n1 m* j. A @.HasOrder := false;. `8 s _* l W+ _
@.DrivingHome := true;2 p+ [) W- g2 ?' v2 _( B
rgManager.tryToStartTransOrder;
; Z+ w/ ^/ Y& T; \5 X if @.Destination = void
; c- U$ ]. C6 N }" H& f& | then -- no transport order for vehicle @' M1 v. I3 N& E8 L8 s& N5 R- f
@.Destination :=! R; |7 J7 N4 n. r! U+ K" c
rgManager.nearestFreeStation(@,track.~);
2 L1 m u7 X0 {9 `* V9 K newDirection(@);
8 d% `4 ~ V* g o7 Q8 b4 D if @.Destination /= void then# C+ k. `* @- @+ m, X6 G; b
@.Destination.NumReservation :=* ^6 K6 T% \2 j' e. J/ {
@.Destination.NumReservation + 1;
& U4 m/ L- O7 [& U+ F# h9 L end;, @0 v: s6 r) d# T+ d& o
@.CurrIcon := "drivingHome";: y' @$ K: d& x- l$ x. J8 w
@.DrivingHome := true;
: e+ w9 V7 w) F/ w+ @9 R- P; N end;% S; K3 q/ g7 V6 ~1 k, @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( w" E3 x$ I4 q% h- j0 ~ part := @.transpOrder;
& a( o' c8 w1 ?5 \ part.move(@);-- load part
- s: P9 B. u, \ A @.CurrIcon := "load";" r9 _& Y2 d& d* R. R4 q
GlobalDistObj := part.globDestination;0 i. u* v6 {! {: `' K/ x% L! [( {' N
assignLObj := rgmanager.rgAssignL;
% u* b+ b" w8 V3 |& Y5 u: `; ~5 b row := assignLObj.getRowNo(GlobalDistObj);: }% M: {5 l8 D" ?. p
if Row = -1 then -- since 70
# \2 {+ L- @; H if lan=1 then( j0 D; e4 d! z( U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 r3 y' V, n* c1 ?# q+ h6 W
to_str("in der Andockstation: \"",?.~.name,"\""));
0 z/ g2 h" n6 Y+ p& A/ I# p else- E+ F6 B' D% p' ?+ L* s2 x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! ]; \7 [$ p* l! S7 n: V
to_str("in docking station: \"",?.~.name,"\""));
# h) c; {+ Y! @. I V2 E7 i2 f end;
. e7 h# p0 I; J2 k( }$ Q( m& s, }# } else+ E+ ^. z2 U1 C8 d& z% T' G% H n9 i
@.Destination := assignLObj[1,row];
8 q, {2 [; ]& H end;
- u7 n# R- N+ D# a newDirection(@);
9 U; U# ]5 g- [+ R @.HasOrder := true;
6 f ^' i" y: [" W/ o* X+ B' [& Q end;
8 S( c5 C: z" o end;4 C% L4 M( L; E0 [- ?
end; -- of the method
$ H2 J9 J9 h) Q. S$ B _ |