/* called by: entrance ctrl of the object 'track'
# v1 Y7 O: O" Z5 r m*/0 V4 E: ?3 M' Q) [ P
is f( u' q$ m( j
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# q, o( b- s! q3 l- ^3 mdo
( Y# f( r2 r9 V$ b& U Lan := rootfolder.Internal.Tools.AOLlanguage;! m' M5 K. C7 [+ K
if current = @.Destination -- else return! n0 v, E" v* W+ \
then) J" {% ~* O6 t; w4 X
@.Destination := void;
2 t) D/ X; P( G) O8 K4 O if @.occupied then
# x$ ~9 S( a2 g9 U2 M( Q% i4 D part := @.cont;
% B6 o" D. o3 E" c A$ n @.transpOrder := void;
7 O6 w, E8 q. R- |# C6 s; M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; x! e: t/ A- b7 K$ d+ u @,root.eventcontroller.simTime);
; g- J3 A6 k4 h/ U$ x( { @.HasOrder := false;
m( ~0 f; r( n5 `0 [) B @.DrivingHome := true;
) e/ g8 G7 k+ q+ i" S. r& Y$ W rgManager.tryToStartTransOrder;
" z" H5 Z2 G" y9 D if @.Destination = void! l7 |% r( U/ V; q) {5 J
then -- no transport order for vehicle @
/ h" Y& X$ G$ I" x7 U8 A @.Destination :=
. L9 |& O2 [& _) |. h rgManager.nearestFreeStation(@,track.~);
7 g* w# X5 w, b S5 ` newDirection(@);
5 U7 F1 N" W4 d! p* p1 W; q if @.Destination /= void then4 I7 n8 j% J# M6 I+ S
@.Destination.NumReservation :=- x/ \! s" y4 |4 o" M* o
@.Destination.NumReservation + 1;8 D- `. |% A8 _8 R2 e
end; R7 ^) J6 c) X# _. z* o1 m
@.CurrIcon := "drivingHome";# T/ b: @" O* J: t* P
@.DrivingHome := true;5 ?3 H2 _9 ]# ~1 ~/ O
end;/ | y* |& ]2 A E# X% X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; w W1 x* M' Z2 d: { part := @.transpOrder;( S% D, m( X- E7 x" |# r
part.move(@);-- load part/ z c0 k" G3 K2 v) m
@.CurrIcon := "load"; R) p% w! a: J: s3 J
GlobalDistObj := part.globDestination;* \3 ?* s' r' f/ ]* W E9 S4 u6 n
assignLObj := rgmanager.rgAssignL;
+ f# z: D4 {$ i. Q3 q0 L, D" G9 } row := assignLObj.getRowNo(GlobalDistObj);
* P9 ?5 Q ~; j) l( x2 c9 M) y if Row = -1 then -- since 70! ~& R2 n k ?3 L# i, G
if lan=1 then
: n: X* v W* B7 B k4 t+ T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 j2 m3 F) d; X+ ?$ V. x" @, a
to_str("in der Andockstation: \"",?.~.name,"\""));* p3 r- H r y V2 k5 T t& P
else
1 s0 h! e' D# z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ M1 U1 |% h5 e: F to_str("in docking station: \"",?.~.name,"\""));
, [* ?/ v, v# t" o5 Z: Z end;
9 h: B+ ~3 b, \5 D else) Y9 Z. Y- ~ ~ ^
@.Destination := assignLObj[1,row];
$ a8 H2 ?# v! A5 Y/ q3 k" F end; ( _- j W0 x- r
newDirection(@);
% u1 a! g. I, a$ f, c5 m/ p @.HasOrder := true;+ y3 O2 z1 o- P4 W
end;+ R( {) g3 B% z; ?! A7 @$ }+ _
end;
: {/ P: T2 e! {& ^ tend; -- of the method7 p4 {$ {0 c& b- x
|