aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/NPC
diff options
context:
space:
mode:
authorRevolution2010-01-22 18:09:33 -0600
committerMelanie2010-01-23 15:18:52 +0000
commitec3c31e61e5e540f822891110df9bc978655bbaf (patch)
treeb0b34a239eab48e163a3ca064edcd7567948423c /OpenSim/Region/OptionalModules/World/NPC
parentadd a target position to agent updates to ScenePresence to support alternativ... (diff)
downloadopensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.zip
opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.gz
opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.bz2
opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.xz
Updates all IRegionModules to the new style region modules.
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/NPC')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs28
1 files changed, 21 insertions, 7 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index ac39a53..521d01a 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -25,9 +25,11 @@
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;
28using System.Collections.Generic; 29using System.Collections.Generic;
29using System.Threading; 30using System.Threading;
30using OpenMetaverse; 31using OpenMetaverse;
32using Mono.Addins;
31using Nini.Config; 33using Nini.Config;
32using OpenSim.Region.Framework.Interfaces; 34using OpenSim.Region.Framework.Interfaces;
33using OpenSim.Region.Framework.Scenes; 35using OpenSim.Region.Framework.Scenes;
@@ -37,7 +39,8 @@ using Timer=System.Timers.Timer;
37 39
38namespace OpenSim.Region.OptionalModules.World.NPC 40namespace OpenSim.Region.OptionalModules.World.NPC
39{ 41{
40 public class NPCModule : IRegionModule, INPCModule 42 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
43 public class NPCModule : ISharedRegionModule, INPCModule
41 { 44 {
42 // private const bool m_enabled = false; 45 // private const bool m_enabled = false;
43 46
@@ -134,15 +137,13 @@ namespace OpenSim.Region.OptionalModules.World.NPC
134 } 137 }
135 138
136 139
137 public void Initialise(Scene scene, IConfigSource source) 140 public void Initialise(IConfigSource source)
138 { 141 {
139 m_createMutex = new Mutex(false); 142 m_createMutex = new Mutex(false);
140 143
141 m_timer = new Timer(500); 144 m_timer = new Timer(500);
142 m_timer.Elapsed += m_timer_Elapsed; 145 m_timer.Elapsed += m_timer_Elapsed;
143 m_timer.Start(); 146 m_timer.Start();
144
145 scene.RegisterModuleInterface<INPCModule>(this);
146 } 147 }
147 148
148 void m_timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) 149 void m_timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
@@ -173,6 +174,19 @@ namespace OpenSim.Region.OptionalModules.World.NPC
173 } 174 }
174 } 175 }
175 176
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
176 public void PostInitialise() 190 public void PostInitialise()
177 { 191 {
178 } 192 }
@@ -186,9 +200,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
186 get { return "NPCModule"; } 200 get { return "NPCModule"; }
187 } 201 }
188 202
189 public bool IsSharedModule 203 public Type ReplaceableInterface
190 { 204 {
191 get { return true; } 205 get { return null; }
192 } 206 }
193 } 207 }
194} 208}