aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/NPC
diff options
context:
space:
mode:
authorMelanie2010-01-29 07:20:13 +0000
committerMelanie2010-01-29 07:20:13 +0000
commitcfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac (patch)
tree43f3fd01f30651d482f81b5ae7c25fd84cc8ca37 /OpenSim/Region/OptionalModules/World/NPC
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC-cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac.zip
opensim-SC-cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac.tar.gz
opensim-SC-cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac.tar.bz2
opensim-SC-cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac.tar.xz
Revert "Updates all IRegionModules to the new style region modules."
This reverts commit ec3c31e61e5e540f822891110df9bc978655bbaf.
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/NPC')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs28
1 files changed, 7 insertions, 21 deletions
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 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System;
29using System.Collections.Generic; 28using System.Collections.Generic;
30using System.Threading; 29using System.Threading;
31using OpenMetaverse; 30using OpenMetaverse;
32using Mono.Addins;
33using Nini.Config; 31using Nini.Config;
34using OpenSim.Region.Framework.Interfaces; 32using OpenSim.Region.Framework.Interfaces;
35using OpenSim.Region.Framework.Scenes; 33using OpenSim.Region.Framework.Scenes;
@@ -39,8 +37,7 @@ using Timer=System.Timers.Timer;
39 37
40namespace OpenSim.Region.OptionalModules.World.NPC 38namespace OpenSim.Region.OptionalModules.World.NPC
41{ 39{
42 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 40 public class NPCModule : IRegionModule, INPCModule
43 public class NPCModule : ISharedRegionModule, INPCModule
44 { 41 {
45 // private const bool m_enabled = false; 42 // private const bool m_enabled = false;
46 43
@@ -137,13 +134,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC
137 } 134 }
138 135
139 136
140 public void Initialise(IConfigSource source) 137 public void Initialise(Scene scene, IConfigSource source)
141 { 138 {
142 m_createMutex = new Mutex(false); 139 m_createMutex = new Mutex(false);
143 140
144 m_timer = new Timer(500); 141 m_timer = new Timer(500);
145 m_timer.Elapsed += m_timer_Elapsed; 142 m_timer.Elapsed += m_timer_Elapsed;
146 m_timer.Start(); 143 m_timer.Start();
144
145 scene.RegisterModuleInterface<INPCModule>(this);
147 } 146 }
148 147
149 void m_timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) 148 void m_timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
@@ -174,19 +173,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC
174 } 173 }
175 } 174 }
176 175
177 public void AddRegion(Scene scene)
178 {
179 scene.RegisterModuleInterface<INPCModule>(this);
180 }
181 public void RegionLoaded(Scene scene)
182 {
183 }
184
185 public void RemoveRegion(Scene scene)
186 {
187 scene.UnregisterModuleInterface<INPCModule>(this);
188 }
189
190 public void PostInitialise() 176 public void PostInitialise()
191 { 177 {
192 } 178 }
@@ -200,9 +186,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
200 get { return "NPCModule"; } 186 get { return "NPCModule"; }
201 } 187 }
202 188
203 public Type ReplaceableInterface 189 public bool IsSharedModule
204 { 190 {
205 get { return null; } 191 get { return true; }
206 } 192 }
207 } 193 }
208} 194}