/* called by: entrance ctrl of the object 'track'0 K8 [8 X; A! n) }; v: c3 p- s2 ~
*/3 r# T( N8 a, ` P; p4 x( G
is' `* J* v" x( A) F/ w/ S& c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ y6 X0 h0 n4 J# K2 p' w' @do" K3 Z3 {. u# _" b4 d
Lan := rootfolder.Internal.Tools.AOLlanguage;
) q9 V, }+ L, f) M if current = @.Destination -- else return4 g5 a% E9 K+ X/ u1 ^
then
& P$ t& D$ M; b' S4 c- _; z0 Z& ]" O @.Destination := void;
/ u. ` T, ?' P3 ?) D# P if @.occupied then
8 _4 a6 Z6 |6 s# {: e6 _3 e3 W2 H part := @.cont;
6 o7 Q6 V8 `4 O. x1 o/ e- M) e* z @.transpOrder := void; y. ^* j1 K- ~1 u- p- @/ i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 w3 m, @, S' k, ^
@,root.eventcontroller.simTime);
) F s2 B+ ~! Q! @+ J7 f @.HasOrder := false;2 I' H2 T+ w& \' [2 B4 D
@.DrivingHome := true;0 ^) }: n3 h- S7 R
rgManager.tryToStartTransOrder;
, E8 C. w6 g: o. _2 X2 w7 A1 b: e if @.Destination = void% \! ~" R/ R( z; k6 S( W
then -- no transport order for vehicle @& |9 ?# o% m2 o/ G: K: H4 J
@.Destination :=0 h& n, ]- n. u% M) X7 @" m- \
rgManager.nearestFreeStation(@,track.~);
3 s! h4 @/ G" Z7 ~6 j }8 j newDirection(@);
! I$ H3 j6 e! G3 z if @.Destination /= void then" f. H/ J- `7 [" H
@.Destination.NumReservation :=' a8 A1 e( b, _4 z0 |8 y# X3 r
@.Destination.NumReservation + 1;( e. [9 ~/ H+ B2 m( a2 ~3 s
end;) y. Q8 B9 h' I$ e# }
@.CurrIcon := "drivingHome";
8 V3 ~5 t! E, P8 \& ?/ f @.DrivingHome := true;+ }+ c4 Z! u0 p" ^2 w
end;4 k& i& ?! {4 w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. d8 M2 [* Y: O) [' s
part := @.transpOrder;
! Z& t8 @4 k% N part.move(@);-- load part; M$ N* G' `7 G: z& J6 A# J3 T9 E! F: Y
@.CurrIcon := "load";! _1 n. \1 J$ k0 Y
GlobalDistObj := part.globDestination;
. ?4 q( h8 T% j; S5 e assignLObj := rgmanager.rgAssignL;
& a8 d+ G3 F, a8 y( l' P+ k3 c& T) l8 B row := assignLObj.getRowNo(GlobalDistObj);8 @& q* ^2 T: Z5 D
if Row = -1 then -- since 70
. e# `9 P' Y, c8 z if lan=1 then
4 N% s* p- D8 N6 _. [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ } J0 ]* G/ y& W to_str("in der Andockstation: \"",?.~.name,"\""));- o* D% X6 |0 [0 ~
else
9 ^# p' Q1 n* ?" X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 x) h& {8 u' p$ {: J% B
to_str("in docking station: \"",?.~.name,"\""));
1 H# I' n0 D, H. r3 p6 ?* a end;
/ n" {( }1 C/ _; d, l; @ else
8 w6 ~+ [7 }6 Y3 r! K: E @.Destination := assignLObj[1,row];
4 ]0 _2 O0 V+ N0 A% h7 z" ^! { end; 9 D4 v' ?$ g7 ~' F* C( R
newDirection(@);
1 p4 H1 | E) X& T0 e @.HasOrder := true;
' P2 D: R1 C2 c! Z: S end;
- {; @( X: h! m p1 I, R end;
; K- I* a; V) _% eend; -- of the method
% f. M* ?2 ~0 O0 ?# R ` |