diff options
author | Adam Frisby | 2009-04-01 09:31:40 +0000 |
---|---|---|
committer | Adam Frisby | 2009-04-01 09:31:40 +0000 |
commit | 5cd70a8c0e3786712fa7dc3be8c947829be060c7 (patch) | |
tree | 3bd74ef71efbce10631126477b51518c40e0d4ee /OpenSim/Region/OptionalModules/Scripting/Minimodule/IObjectAccessor.cs | |
parent | * Adds World.Avatars[] to MRM Scripting. Contains an enumerable array contain... (diff) | |
download | opensim-SC-5cd70a8c0e3786712fa7dc3be8c947829be060c7.zip opensim-SC-5cd70a8c0e3786712fa7dc3be8c947829be060c7.tar.gz opensim-SC-5cd70a8c0e3786712fa7dc3be8c947829be060c7.tar.bz2 opensim-SC-5cd70a8c0e3786712fa7dc3be8c947829be060c7.tar.xz |
* MRM Adjustments
* Changes World.Objects from Array IObject[] to IObjectAccessor.
* Syntactically identical in most behaviour, however the indexer is now ranges not from 0..Count, but any valid internal LocalID. Additional indexers have been added for UUID.
* Example: for(int i=0;i<World.Objects.Count;i++) will not work any more, however foreach(World.Objects) will remain functional.
* This prevents us needing to create a list for each access to World.Objects which should [in theory] present a dramatic speed improvement to MRM scripts frequently accessing World.Objects.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule/IObjectAccessor.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/Minimodule/IObjectAccessor.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObjectAccessor.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObjectAccessor.cs new file mode 100644 index 0000000..feddf67 --- /dev/null +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObjectAccessor.cs | |||
@@ -0,0 +1,12 @@ | |||
1 | using System.Collections.Generic; | ||
2 | using OpenMetaverse; | ||
3 | |||
4 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | ||
5 | { | ||
6 | public interface IObjectAccessor : ICollection<IObject> | ||
7 | { | ||
8 | IObject this[int index] { get; } | ||
9 | IObject this[uint index] { get; } | ||
10 | IObject this[UUID index] { get; } | ||
11 | } | ||
12 | } \ No newline at end of file | ||