/* called by: entrance ctrl of the object 'track'
$ E2 N: `7 @% o' t2 N% G. ^1 H*/# l/ v: ^ ~" J j8 u
is
" U8 b- R7 L( e' L) T( @; T' E: g$ n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) Q0 C# Z9 s+ K$ j* v$ q. K: ]0 \# cdo4 W% w' Q. u8 ]% ]
Lan := rootfolder.Internal.Tools.AOLlanguage; A6 o4 H. N) [+ n5 b( |" m3 ~0 E& o
if current = @.Destination -- else return( O5 M0 g2 f ]* e( Z( R4 ^
then
5 d% D e8 W4 q$ t/ n @.Destination := void;. n/ v7 C# ]" ^5 L
if @.occupied then( P/ r4 b% Q3 u; }$ W* |2 _1 j5 B
part := @.cont;
1 n8 s# p4 p* q1 D8 n1 E. d. y1 |; [; W0 b @.transpOrder := void;# I5 M0 }+ D5 `1 M2 L, G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 p0 l- |. {/ Q
@,root.eventcontroller.simTime);- `5 ^9 ^! d9 Q, }2 L/ i
@.HasOrder := false;
* M& L5 u5 P* m/ g @.DrivingHome := true;
8 W' k: V M$ x# \6 O- O rgManager.tryToStartTransOrder;% w. j6 u+ h0 f9 A' }" e* h
if @.Destination = void, Z- d& R1 ?8 v
then -- no transport order for vehicle @
6 z% Q6 L, X) C @.Destination :=
% E2 I. n; M( ?2 i rgManager.nearestFreeStation(@,track.~);, S1 M2 m+ M$ \( m- K
newDirection(@);
2 @7 d' f5 f$ z+ ]7 w, T if @.Destination /= void then. d& X7 ]1 l+ ^3 q) C
@.Destination.NumReservation :=. j8 l. d% x0 R I
@.Destination.NumReservation + 1;* A: F; q V1 [" v
end;
4 b) k7 v# s8 J" C( x# R @.CurrIcon := "drivingHome";) G* o5 Q3 m; m$ ]( e+ \1 S4 ^' @
@.DrivingHome := true;
# f0 I \: ^& m; S end;
+ C( M" X5 h% o7 o4 d0 f else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. t; I/ @% ~1 P0 J8 `1 C" i part := @.transpOrder;5 P7 F% D. @- m
part.move(@);-- load part; O; {5 L9 K' m9 j* E& X2 M) h
@.CurrIcon := "load";
2 |! D( f4 @0 M1 V6 ~! v L GlobalDistObj := part.globDestination;8 ?" N* M" E; m2 V H4 `
assignLObj := rgmanager.rgAssignL;
- F d0 D5 b3 D/ P" _2 V row := assignLObj.getRowNo(GlobalDistObj);+ S' u* m- g' m+ K- w: H
if Row = -1 then -- since 70
$ ]* @; U% _3 W' Z* w/ r if lan=1 then5 f0 G/ z) u) ~- i1 ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, x) [' C6 _+ g* d2 ~$ J: w) w, Y to_str("in der Andockstation: \"",?.~.name,"\""));4 _" I& w+ |# U
else, m* I1 ], b3 K& m0 [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) i0 b+ ~& C! @! i$ R1 L to_str("in docking station: \"",?.~.name,"\"")); 7 g y8 J$ f d2 { o5 F) y
end;
% d( ]. ]1 B7 H: E5 O' V else- G4 Z$ s8 I, i8 ?
@.Destination := assignLObj[1,row];
! V1 \% R5 B l/ C, Z; H end;
* X+ S6 S0 ^. D4 @ newDirection(@);5 r2 h9 M. j' h" `
@.HasOrder := true;4 t; {; A- M3 U5 b
end;1 D0 ?( r1 F2 P7 D/ B. q, {: v
end;
" c( L+ |6 U- Z3 N" x' Gend; -- of the method
+ l3 K8 H. B* x! D |