/* called by: entrance ctrl of the object 'track'
3 J; G4 W+ V5 s7 c1 V! k% h*/& E' Y$ d7 C0 z3 M: m: _
is! q0 Z5 R) H' i* }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 W% X/ d7 p& w; i- s* @ d2 {
do. V! P7 r+ Q0 E" N* @! ]
Lan := rootfolder.Internal.Tools.AOLlanguage;
. N4 R) S! d g, y0 ? u. A if current = @.Destination -- else return
2 o( W- Z6 [) b then6 Z! B3 _: n8 c# @! X8 |5 N
@.Destination := void;
- \1 u% i; {% }9 T" Z$ }, Q" a if @.occupied then& _2 F0 z) f/ w& |: e( `
part := @.cont;
# C X2 h6 W& y1 w$ B) M e @.transpOrder := void;+ ^* q7 E4 @" C- n1 o# v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 |4 X$ C3 w1 x2 h" Y! J( v
@,root.eventcontroller.simTime);
' Y* w% U: z" `$ D @.HasOrder := false;
" u, U1 ]; V) @ W8 h @.DrivingHome := true;
% S7 L n# q+ x$ z rgManager.tryToStartTransOrder;
0 v0 E$ I, I1 V" c# T. Z* Y if @.Destination = void
4 r9 [' f4 \ a1 w+ J then -- no transport order for vehicle @
8 Q H# y! e: v: d4 E- X5 a @.Destination :=
4 T; }5 ?- t* z8 ? rgManager.nearestFreeStation(@,track.~);. x8 ~; E: Q1 u6 z' j( _# i
newDirection(@); 5 O8 ]0 n* S" v; [, j7 ^9 B4 o
if @.Destination /= void then
! Z$ C( r- j { r3 p @.Destination.NumReservation :=5 t0 J/ a8 x' e: O# B3 H4 _' O
@.Destination.NumReservation + 1;
. H, ~3 I4 n8 ] end;7 R+ ?' u+ j6 I8 _4 h
@.CurrIcon := "drivingHome"; b3 l7 b7 Z T y- T8 x0 ]
@.DrivingHome := true;
/ z' q6 ]! f$ k3 o" v. H end;
* z( F4 H5 r( {6 q# N) s+ W else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 U+ V- {$ P' w# q3 c& p9 ~ part := @.transpOrder;4 W2 a4 H& k% m6 v' v# v
part.move(@);-- load part
* b1 A, G8 C" {' n+ Y6 g; W5 @3 j @.CurrIcon := "load";
# Z/ S% f8 h6 d# y" I% j GlobalDistObj := part.globDestination;
: Y. }9 R: o4 u5 d assignLObj := rgmanager.rgAssignL;
' ]+ Z+ {# b: O! O row := assignLObj.getRowNo(GlobalDistObj);. e, _5 O$ X, i% [4 P+ e$ t
if Row = -1 then -- since 70
5 J. Z& _* D3 |; e7 g( v if lan=1 then
& M9 F9 x, e8 Z& y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( h! c7 c- ^& d4 v9 A; B to_str("in der Andockstation: \"",?.~.name,"\""));( M( o- r" D8 H/ O0 J& d' I
else
: G8 U* W* P7 m; ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. T* Z' p- P# u0 a6 N- R" g to_str("in docking station: \"",?.~.name,"\""));
- w5 N: J% L2 P: c/ ^ end;2 y y, }5 ?0 a! J$ q" Y4 O# ?2 ]
else$ M! V) N: d9 X- t! {5 v- c
@.Destination := assignLObj[1,row];! i2 S' q/ w& h3 F+ x. c$ k
end;
! @) @1 f* m- D# w' V3 Z' F newDirection(@);
5 j9 P/ _5 q! b% U L9 n @.HasOrder := true;
: _, M3 f/ U: c. Y# L/ p/ w, V end;
" ?( G3 ^. w" v. W- f end;( P) p$ A) G! o$ t1 C7 r) c
end; -- of the method
5 x5 _ D+ p% G$ S7 ~% J# B$ m |