diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Sound/SoundModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Sound/SoundModule.cs | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs index 37f1f2e..ed7bfe1 100644 --- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs +++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using Mono.Addins; | ||
29 | using Nini.Config; | 30 | using Nini.Config; |
30 | using OpenMetaverse; | 31 | using OpenMetaverse; |
31 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
@@ -34,26 +35,44 @@ using OpenSim.Region.Framework.Scenes; | |||
34 | 35 | ||
35 | namespace OpenSim.Region.CoreModules.World.Sound | 36 | namespace OpenSim.Region.CoreModules.World.Sound |
36 | { | 37 | { |
37 | public class SoundModule : IRegionModule, ISoundModule | 38 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
39 | public class SoundModule : INonSharedRegionModule, ISoundModule | ||
38 | { | 40 | { |
39 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 41 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
40 | 42 | ||
41 | protected Scene m_scene; | 43 | protected Scene m_scene; |
42 | 44 | ||
43 | public void Initialise(Scene scene, IConfigSource source) | 45 | public void Initialise(IConfigSource source) |
46 | { | ||
47 | } | ||
48 | |||
49 | public void AddRegion(Scene scene) | ||
44 | { | 50 | { |
45 | m_scene = scene; | 51 | m_scene = scene; |
46 | 52 | ||
47 | m_scene.EventManager.OnNewClient += OnNewClient; | 53 | m_scene.EventManager.OnNewClient += OnNewClient; |
48 | 54 | ||
49 | m_scene.RegisterModuleInterface<ISoundModule>(this); | 55 | m_scene.RegisterModuleInterface<ISoundModule>(this); |
50 | } | 56 | } |
57 | |||
58 | public Type ReplaceableInterface | ||
59 | { | ||
60 | get { return null; } | ||
61 | } | ||
62 | |||
63 | public void RegionLoaded(Scene scene) | ||
64 | { | ||
65 | } | ||
66 | |||
67 | public void RemoveRegion(Scene scene) | ||
68 | { | ||
69 | scene.EventManager.OnNewClient -= OnNewClient; | ||
70 | scene.UnregisterModuleInterface<ISoundModule>(this); | ||
71 | } | ||
51 | 72 | ||
52 | public void PostInitialise() {} | ||
53 | public void Close() {} | 73 | public void Close() {} |
54 | public string Name { get { return "Sound Module"; } } | 74 | public string Name { get { return "Sound Module"; } } |
55 | public bool IsSharedModule { get { return false; } } | 75 | |
56 | |||
57 | private void OnNewClient(IClientAPI client) | 76 | private void OnNewClient(IClientAPI client) |
58 | { | 77 | { |
59 | client.OnSoundTrigger += TriggerSound; | 78 | client.OnSoundTrigger += TriggerSound; |