diff options
author | Revolution | 2010-01-22 18:09:33 -0600 |
---|---|---|
committer | Melanie | 2010-01-23 15:18:52 +0000 |
commit | ec3c31e61e5e540f822891110df9bc978655bbaf (patch) | |
tree | b0b34a239eab48e163a3ca064edcd7567948423c /OpenSim/Region/OptionalModules/World/NPC | |
parent | add a target position to agent updates to ScenePresence to support alternativ... (diff) | |
download | opensim-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.cs | 28 |
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 | ||
28 | using System; | ||
28 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
29 | using System.Threading; | 30 | using System.Threading; |
30 | using OpenMetaverse; | 31 | using OpenMetaverse; |
32 | using Mono.Addins; | ||
31 | using Nini.Config; | 33 | using Nini.Config; |
32 | using OpenSim.Region.Framework.Interfaces; | 34 | using OpenSim.Region.Framework.Interfaces; |
33 | using OpenSim.Region.Framework.Scenes; | 35 | using OpenSim.Region.Framework.Scenes; |
@@ -37,7 +39,8 @@ using Timer=System.Timers.Timer; | |||
37 | 39 | ||
38 | namespace OpenSim.Region.OptionalModules.World.NPC | 40 | namespace 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 | } |