diff options
author | Adam Frisby | 2009-04-21 04:55:53 +0000 |
---|---|---|
committer | Adam Frisby | 2009-04-21 04:55:53 +0000 |
commit | 594c7c3eb13695304c755ec1bc65c5f239754222 (patch) | |
tree | 5de4d356929e3afa7efd0045167a92e44f710c21 /OpenSim/Region/OptionalModules/Scripting/Minimodule/Host.cs | |
parent | Change a bad use of a type name as a variable. Thanks, Fly-Man (diff) | |
download | opensim-SC-594c7c3eb13695304c755ec1bc65c5f239754222.zip opensim-SC-594c7c3eb13695304c755ec1bc65c5f239754222.tar.gz opensim-SC-594c7c3eb13695304c755ec1bc65c5f239754222.tar.bz2 opensim-SC-594c7c3eb13695304c755ec1bc65c5f239754222.tar.xz |
* Implements Extensions to MRM. This allows Region Modules to insert new classes into OpenSim MRM's.
* Example in region module:
Scene.GetModuleInterface<IMRMModule>.RegisterExtension<IMyInterface>(this);
* In the MRM:
//@DEPENDS:MyExtensionModule.dll
...
Host.Extensions<IMyInterface>.DoStuff();
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/Minimodule/Host.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Host.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Host.cs index b7f67dd..94796e4 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Host.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Host.cs | |||
@@ -28,6 +28,7 @@ | |||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using log4net; | 29 | using log4net; |
30 | using OpenSim.Region.Framework.Scenes; | 30 | using OpenSim.Region.Framework.Scenes; |
31 | using OpenSim.Region.OptionalModules.Scripting.Minimodule.Interfaces; | ||
31 | 32 | ||
32 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | 33 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule |
33 | { | 34 | { |
@@ -36,11 +37,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
36 | private readonly IObject m_obj; | 37 | private readonly IObject m_obj; |
37 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 38 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
38 | private readonly IGraphics m_graphics; | 39 | private readonly IGraphics m_graphics; |
40 | private readonly IExtension m_extend; | ||
39 | //private Scene m_scene; | 41 | //private Scene m_scene; |
40 | 42 | ||
41 | public Host(IObject m_obj, Scene m_scene) | 43 | public Host(IObject m_obj, Scene m_scene, IExtension m_extend) |
42 | { | 44 | { |
43 | this.m_obj = m_obj; | 45 | this.m_obj = m_obj; |
46 | this.m_extend = m_extend; | ||
44 | //this.m_scene = m_scene; | 47 | //this.m_scene = m_scene; |
45 | 48 | ||
46 | m_graphics = new Graphics(m_scene); | 49 | m_graphics = new Graphics(m_scene); |
@@ -60,5 +63,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
60 | { | 63 | { |
61 | get { return m_graphics; } | 64 | get { return m_graphics; } |
62 | } | 65 | } |
66 | |||
67 | public IExtension Extensions | ||
68 | { | ||
69 | get { return m_extend; } | ||
70 | } | ||
63 | } | 71 | } |
64 | } | 72 | } |