From cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 29 Jan 2010 07:20:13 +0000 Subject: Revert "Updates all IRegionModules to the new style region modules." This reverts commit ec3c31e61e5e540f822891110df9bc978655bbaf. --- .../Region/OptionalModules/World/NPC/NPCModule.cs | 28 ++++++---------------- 1 file changed, 7 insertions(+), 21 deletions(-) (limited to 'OpenSim/Region/OptionalModules/World/NPC') diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 521d01a..ac39a53 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -25,11 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using System.Collections.Generic; using System.Threading; using OpenMetaverse; -using Mono.Addins; using Nini.Config; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -39,8 +37,7 @@ using Timer=System.Timers.Timer; namespace OpenSim.Region.OptionalModules.World.NPC { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] - public class NPCModule : ISharedRegionModule, INPCModule + public class NPCModule : IRegionModule, INPCModule { // private const bool m_enabled = false; @@ -137,13 +134,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC } - public void Initialise(IConfigSource source) + public void Initialise(Scene scene, IConfigSource source) { m_createMutex = new Mutex(false); m_timer = new Timer(500); m_timer.Elapsed += m_timer_Elapsed; m_timer.Start(); + + scene.RegisterModuleInterface(this); } void m_timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) @@ -174,19 +173,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC } } - public void AddRegion(Scene scene) - { - scene.RegisterModuleInterface(this); - } - public void RegionLoaded(Scene scene) - { - } - - public void RemoveRegion(Scene scene) - { - scene.UnregisterModuleInterface(this); - } - public void PostInitialise() { } @@ -200,9 +186,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC get { return "NPCModule"; } } - public Type ReplaceableInterface + public bool IsSharedModule { - get { return null; } - } + get { return true; } + } } } -- cgit v1.1