/* called by: entrance ctrl of the object 'track'! R) h' K: t4 }" ]! @2 A g" o% ]; Z
*/1 b9 j/ P3 L) j5 U1 @
is
( a% ^" z3 V8 O8 L3 \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;' A" X# c5 f9 {$ [1 P
do/ U( }2 o( h9 @- x) I- T/ E9 G" t
Lan := rootfolder.Internal.Tools.AOLlanguage;3 n$ |5 O [1 C+ ]6 I' j
if current = @.Destination -- else return* r( h# {) }+ s
then
" G: w% K9 \' z p. @. V5 _ @.Destination := void;
6 a# ^9 X8 s3 j6 n if @.occupied then u( D* P! {% R$ Q% n! D. B
part := @.cont;
5 F' `: g: o; z6 s @.transpOrder := void;! O9 q7 w# k/ B: j+ I& Q' n: g+ U( A! M3 _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( [9 S% a2 _( ]0 b @,root.eventcontroller.simTime);/ ~: ?6 e1 Q& @- D4 R# S8 Q
@.HasOrder := false;
( W+ R/ L/ _2 W6 i8 S @.DrivingHome := true;
$ g9 {5 q" ] m, [ rgManager.tryToStartTransOrder;" b W; y) a4 S& G( U" X1 q
if @.Destination = void" {$ E. F# |$ i$ A# O) Z
then -- no transport order for vehicle @
8 y$ V" v7 @6 @* C @.Destination :=
5 d+ @5 ]% N |+ z* U( u X( G rgManager.nearestFreeStation(@,track.~);1 a6 [1 p, |5 x; y @+ o
newDirection(@);
) ?- c' p. C- W1 D7 R- U if @.Destination /= void then; i! f/ e: [# j4 T- E
@.Destination.NumReservation :=
- h/ t7 M% I% S0 G( V3 U% | @.Destination.NumReservation + 1;
( m) r3 r2 [& ]# g [1 ^ end;$ D/ |' U) i* r. H/ A6 V9 N
@.CurrIcon := "drivingHome"; Z7 J0 b9 ]) _, {; ]# A) s
@.DrivingHome := true;* `. y3 j: ]% C
end;9 `7 \+ J2 d# ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* r" ~; E& V7 K1 Y s- v part := @.transpOrder;
- x" b4 T) r, b; H4 K. f0 ?. t j7 c part.move(@);-- load part: g( Q; O- U: L/ B
@.CurrIcon := "load";0 d" Y% ~! {) _! C, A) Z
GlobalDistObj := part.globDestination; s$ O2 x& e, ^" ]4 C9 B! [$ m: Y
assignLObj := rgmanager.rgAssignL;
8 q9 c! b; X; J! } row := assignLObj.getRowNo(GlobalDistObj);5 V- S5 K+ e4 {# R5 s) ^
if Row = -1 then -- since 70
i' b& u5 s" f if lan=1 then
- W% j$ _4 v) Z6 r. H3 Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 c! L/ @$ ]! w$ W1 V! ~$ ` ^* Q to_str("in der Andockstation: \"",?.~.name,"\""));5 I E( R! d" ~/ k9 S! z
else( {( }! m6 v1 | n) q& j7 q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 X7 i2 a, x# I
to_str("in docking station: \"",?.~.name,"\"")); ; w2 ?- @/ i) m0 j1 H2 a) Q; J
end;
& s3 p6 {' _0 Q+ d' [ else
% t% r* D2 Z) T( L4 D3 m @.Destination := assignLObj[1,row];
n& P" H: P" e+ v: v# @2 T" | end; + Q8 ^! J3 i& I' R+ U9 ]
newDirection(@);
. ~7 u: ^1 L( f( w- Z( q$ T @.HasOrder := true;( t0 P7 h6 H* C1 F! T! l0 g
end;
- d; \7 G" B5 v- a5 \# m. s end;3 Q% W* ^+ y+ r* D* v
end; -- of the method6 ?9 A5 a/ N# M: v1 [3 S
|