From 8c101d24dfc48ae20ddf963e51b07b43019930ea Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Tue, 18 Aug 2009 00:23:02 +1000 Subject: [PATCH] * Implementing a bunch of Unimplemented MRM stubs. --- .../Scripting/Minimodule/SOPObjectMaterial.cs | 29 ++++++++++++++++--- .../Scripting/Minimodule/SPAvatar.cs | 8 ++--- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs index 68f2f528b0..0cba6afb6c 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs @@ -91,24 +91,45 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule public bool Bright { get { return GetTexface().Fullbright; } - set { throw new System.NotImplementedException(); } + set + { + Primitive.TextureEntry tex = m_parent.Shape.Textures; + Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); + texface.Fullbright = value; + tex.FaceTextures[m_face] = texface; + m_parent.UpdateTexture(tex); + } } public double Bloom { get { return GetTexface().Glow; } - set { throw new System.NotImplementedException(); } + set + { + Primitive.TextureEntry tex = m_parent.Shape.Textures; + Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); + texface.Glow = (float) value; + tex.FaceTextures[m_face] = texface; + m_parent.UpdateTexture(tex); + } } public bool Shiny { get { return GetTexface().Shiny != Shininess.None; } - set { throw new System.NotImplementedException(); } + set + { + Primitive.TextureEntry tex = m_parent.Shape.Textures; + Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); + texface.Shiny = value ? Shininess.High : Shininess.None; + tex.FaceTextures[m_face] = texface; + m_parent.UpdateTexture(tex); + } } public bool BumpMap { - get { throw new System.NotImplementedException(); } + get { return GetTexface().Bump == Bumpiness.None; } set { throw new System.NotImplementedException(); } } } diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs index 4600836952..4427426339 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs @@ -25,17 +25,13 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Reflection; using System.Collections; using System.Collections.Generic; - +using System.Security; using OpenMetaverse; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Interfaces; -using log4net; - namespace OpenSim.Region.OptionalModules.Scripting.Minimodule { class SPAvatar : System.MarshalByRefObject, IAvatar @@ -60,7 +56,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule public string Name { get { return GetSP().Name; } - set { throw new InvalidOperationException("Avatar Names are a read-only property."); } + set { throw new SecurityException("Avatar Names are a read-only property."); } } public UUID GlobalID