aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/IParcel.cs4
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/ISocialEntity.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/IWorld.cs1
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/LOParcel.cs45
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs18
5 files changed, 67 insertions, 3 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IParcel.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IParcel.cs
index 7c3fe86..2a973a9 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IParcel.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IParcel.cs
@@ -5,11 +5,11 @@ using OpenMetaverse;
5 5
6namespace OpenSim.Region.OptionalModules.Scripting.Minimodule 6namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
7{ 7{
8 interface IParcel 8 public interface IParcel
9 { 9 {
10 string Name { get; set; } 10 string Name { get; set; }
11 string Description { get; set; } 11 string Description { get; set; }
12 ISocialEntity Owner { get; set; } 12 ISocialEntity Owner { get; set; }
13 bool[,] Bitmap { get; set; } 13 bool[,] Bitmap { get; }
14 } 14 }
15} 15}
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/ISocialEntity.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/ISocialEntity.cs
index fe4826a..0833ffd 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/ISocialEntity.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/ISocialEntity.cs
@@ -5,7 +5,7 @@ using OpenMetaverse;
5 5
6namespace OpenSim.Region.OptionalModules.Scripting.Minimodule 6namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
7{ 7{
8 interface ISocialEntity 8 public interface ISocialEntity
9 { 9 {
10 UUID GlobalID { get; } 10 UUID GlobalID { get; }
11 string Name { get; } 11 string Name { get; }
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IWorld.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IWorld.cs
index f06f57a..b35b57d 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IWorld.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IWorld.cs
@@ -31,6 +31,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
31 { 31 {
32 IObjectAccessor Objects { get; } 32 IObjectAccessor Objects { get; }
33 IAvatar[] Avatars { get; } 33 IAvatar[] Avatars { get; }
34 IParcel[] Parcels { get; }
34 IHeightmap Terrain { get; } 35 IHeightmap Terrain { get; }
35 } 36 }
36} 37}
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/LOParcel.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/LOParcel.cs
new file mode 100644
index 0000000..aceeacc
--- /dev/null
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/LOParcel.cs
@@ -0,0 +1,45 @@
1using OpenSim.Region.Framework.Interfaces;
2using OpenSim.Region.Framework.Scenes;
3
4namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
5{
6 class LOParcel : IParcel
7 {
8 private readonly Scene m_scene;
9 private readonly int m_parcelID;
10
11 public LOParcel(Scene m_scene, int m_parcelID)
12 {
13 this.m_scene = m_scene;
14 this.m_parcelID = m_parcelID;
15 }
16
17 private ILandObject GetLO()
18 {
19 return m_scene.LandChannel.GetLandObject(m_parcelID);
20 }
21
22 public string Name
23 {
24 get { return GetLO().landData.Name; }
25 set { GetLO().landData.Name = value; }
26 }
27
28 public string Description
29 {
30 get { return GetLO().landData.Description; }
31 set { GetLO().landData.Description = value; }
32 }
33
34 public ISocialEntity Owner
35 {
36 get { throw new System.NotImplementedException(); }
37 set { throw new System.NotImplementedException(); }
38 }
39
40 public bool[,] Bitmap
41 {
42 get { return GetLO().landBitmap; }
43 }
44 }
45}
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
index c798cc8..05a6a84 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
@@ -26,6 +26,7 @@
26 */ 26 */
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using OpenSim.Region.Framework.Interfaces;
29using OpenSim.Region.Framework.Scenes; 30using OpenSim.Region.Framework.Scenes;
30 31
31namespace OpenSim.Region.OptionalModules.Scripting.Minimodule 32namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
@@ -49,6 +50,23 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
49 get { return m_objs; } 50 get { return m_objs; }
50 } 51 }
51 52
53 public IParcel[] Parcels
54 {
55 get
56 {
57 List<ILandObject> m_los = m_internalScene.LandChannel.AllParcels();
58 List<IParcel> m_parcels = new List<IParcel>(m_los.Count);
59
60 foreach (ILandObject landObject in m_los)
61 {
62 m_parcels.Add(new LOParcel(m_internalScene, landObject.landData.LocalID));
63 }
64
65 return m_parcels.ToArray();
66 }
67 }
68
69
52 public IAvatar[] Avatars 70 public IAvatar[] Avatars
53 { 71 {
54 get 72 get