From 8f0b03597b0bc8ea6873af9a55495407fae1ec56 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Wed, 19 Sep 2007 00:30:55 +0000 Subject: * Modernized ScriptManager to new interface-based module calls. * 'remove redundant this qualifier' ftw --- .../Environment/Modules/DynamicTextureModule.cs | 56 +++++++++++----------- 1 file changed, 27 insertions(+), 29 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/DynamicTextureModule.cs') diff --git a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs index bbd9810..3f737e1 100644 --- a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs +++ b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs @@ -1,23 +1,20 @@ -using System.Text; -using System.Net; -using System.Net.Sockets; -using System.Threading; -using System.IO; -using System.Collections.Generic; -using libsecondlife; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.Environment.Interfaces; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Utilities; -using OpenSim.Framework.Console; -using OpenSim.Framework.Types; - +using System; +using System.Collections.Generic; +using libsecondlife; +using OpenSim.Framework.Types; +using OpenSim.Framework.Utilities; +using OpenSim.Region.Environment.Interfaces; +using OpenSim.Region.Environment.Scenes; + namespace OpenSim.Region.Environment.Modules { - public class DynamicTextureModule :IRegionModule, IDynamicTextureManager + public class DynamicTextureModule : IRegionModule, IDynamicTextureManager { - private Dictionary RegisteredScenes = new Dictionary(); - private Dictionary RenderPlugins= new Dictionary(); + private Dictionary RegisteredScenes = new Dictionary(); + + private Dictionary RenderPlugins = + new Dictionary(); + private Dictionary Updaters = new Dictionary(); public void Initialise(Scene scene) @@ -30,8 +27,7 @@ namespace OpenSim.Region.Environment.Modules } public void PostInitialise() - { - + { } public void CloseDown() @@ -69,10 +65,11 @@ namespace OpenSim.Region.Environment.Modules } } - public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, string extraParams, int updateTimer) + public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, + string extraParams, int updateTimer) { - System.Console.WriteLine("dynamic texture being created: " + url + " of type " + contentType); - if (this.RenderPlugins.ContainsKey(contentType)) + Console.WriteLine("dynamic texture being created: " + url + " of type " + contentType); + if (RenderPlugins.ContainsKey(contentType)) { DynamicTextureUpdater updater = new DynamicTextureUpdater(); updater.SimUUID = simID; @@ -83,7 +80,7 @@ namespace OpenSim.Region.Environment.Modules updater.UpdaterID = LLUUID.Random(); updater.Params = extraParams; - if (!this.Updaters.ContainsKey(updater.UpdaterID)) + if (!Updaters.ContainsKey(updater.UpdaterID)) { Updaters.Add(updater.UpdaterID, updater); } @@ -94,9 +91,10 @@ namespace OpenSim.Region.Environment.Modules return LLUUID.Zero; } - public LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, string extraParams, int updateTimer) + public LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, + string extraParams, int updateTimer) { - if (this.RenderPlugins.ContainsKey(contentType)) + if (RenderPlugins.ContainsKey(contentType)) { DynamicTextureUpdater updater = new DynamicTextureUpdater(); updater.SimUUID = simID; @@ -107,7 +105,7 @@ namespace OpenSim.Region.Environment.Modules updater.UpdaterID = LLUUID.Random(); updater.Params = extraParams; - if (!this.Updaters.ContainsKey(updater.UpdaterID)) + if (!Updaters.ContainsKey(updater.UpdaterID)) { Updaters.Add(updater.UpdaterID, updater); } @@ -140,7 +138,7 @@ namespace OpenSim.Region.Environment.Modules public void DataReceived(byte[] data, Scene scene) { //TODO delete the last asset(data), if it was a dynamic texture - + AssetBase asset = new AssetBase(); asset.FullID = LLUUID.Random(); asset.Data = data; @@ -148,7 +146,7 @@ namespace OpenSim.Region.Environment.Modules asset.Type = 0; scene.commsManager.AssetCache.AddAsset(asset); - this.LastAssetID = asset.FullID; + LastAssetID = asset.FullID; SceneObjectPart part = scene.GetSceneObjectPart(PrimID); part.Shape.TextureEntry = new LLObject.TextureEntry(asset.FullID).ToBytes(); @@ -156,4 +154,4 @@ namespace OpenSim.Region.Environment.Modules } } } -} +} \ No newline at end of file -- cgit v1.1