/* called by: entrance ctrl of the object 'track'2 a0 U, F9 Y4 `. `7 X
*/7 f1 y y R& w: E5 ]3 T
is( I) `) p9 w; C5 o i6 ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, @5 W0 p) h, U6 I8 q; A( U2 Q
do
2 c2 B/ {1 h, E6 r. x Lan := rootfolder.Internal.Tools.AOLlanguage;" x2 M- h+ Y! C; X
if current = @.Destination -- else return: Z" g7 U; t" O$ q% b. O
then
7 F: J. y. ^7 n4 k @.Destination := void;& `6 U- `& K/ E3 D$ ~
if @.occupied then
. K* y" W$ v. b part := @.cont;) I6 w$ i$ Y: m
@.transpOrder := void;
4 X& M( ^* O$ ?; l" c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& k( h5 x3 m0 g- \& z7 C0 U* _0 F7 ^4 @% T
@,root.eventcontroller.simTime); M) l/ j. Y( @2 m% V# e c6 e2 p
@.HasOrder := false;
# \; _5 p& C- A. @5 B o% }0 e8 h @.DrivingHome := true;+ J2 `0 I. ^% T2 J
rgManager.tryToStartTransOrder;; q( W% ?9 p' \) p- S
if @.Destination = void. b6 B/ z7 @; ?1 V3 o6 p
then -- no transport order for vehicle @8 ]' j0 }# w# k/ h6 B
@.Destination :=
# d9 n' W! K- X- l7 h rgManager.nearestFreeStation(@,track.~);
/ I" z- C3 e& Z3 {5 V2 s% @ newDirection(@); 5 x; Y0 A4 D4 q: d( U( _9 B5 K
if @.Destination /= void then; {2 ?8 W1 w' a
@.Destination.NumReservation :=/ @4 W9 N! Q s0 Q, k9 y
@.Destination.NumReservation + 1;+ a% J) R; O' ]4 f/ P
end;
! N! D1 L$ V3 `) N: |) J! w( a4 U! I: L @.CurrIcon := "drivingHome";
# H1 [( w; [ f5 v. O3 y5 E- s0 v3 K& ^ @.DrivingHome := true;
% n9 q' r& G; Q$ t+ A" ]: `0 Z end;; X: X+ L) }+ f0 P+ f0 W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" J8 U* _: b: W% r: K1 B: r
part := @.transpOrder;
/ D% W1 U& Q/ N5 u$ _ part.move(@);-- load part7 N1 _' M9 w k% k( c
@.CurrIcon := "load";& X8 x& ^: a% l* y# b: [; L* b
GlobalDistObj := part.globDestination;. ^! E! Z& K& B/ k" B9 q! r; ] ]
assignLObj := rgmanager.rgAssignL;
0 ]# `" r r1 b2 k6 @ row := assignLObj.getRowNo(GlobalDistObj);1 T1 l. I* X/ v. G& b
if Row = -1 then -- since 70% Q& y& Z4 t1 c8 e
if lan=1 then
. `2 B) @* s' c+ F+ g" E" L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: @ d: |. @7 G: x6 s4 e) } to_str("in der Andockstation: \"",?.~.name,"\""));
$ W* L6 [1 }, [) D# r$ b else
/ ~2 j- y; [4 A& j/ l0 u% |& K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," l! u6 F/ C# v+ r( M: C; ^
to_str("in docking station: \"",?.~.name,"\""));
k( e4 z( |& _: h; }0 F- v7 t end;3 U( P$ [. l! ?" d: P
else
7 e1 r0 g1 a4 V @.Destination := assignLObj[1,row];
K' F" h2 X u+ W5 i* @ end; ! ~/ L, u( j* F% |6 {" i
newDirection(@);
f) g3 L' ~* M& Q) f5 ` Q& o" k @.HasOrder := true;* h8 z6 [$ [+ R( {/ k
end;
2 ^: l" f$ y& t1 x end;) \' @* U% J5 Q# i4 X
end; -- of the method1 b; Z6 x$ S/ k, B' O+ X$ x: {
|