diff options
author | Melanie Thielker | 2009-07-10 20:46:16 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-07-10 20:46:16 +0000 |
commit | ec1a5d89336570d1cbef64607160bd8ab1a55fb6 (patch) | |
tree | fb6995d36b431e7e65c8f46bb7f3c00fba12fd2b /OpenSim | |
parent | Committing the interface change and the addition to the modules to get (diff) | |
download | opensim-SC_OLD-ec1a5d89336570d1cbef64607160bd8ab1a55fb6.zip opensim-SC_OLD-ec1a5d89336570d1cbef64607160bd8ab1a55fb6.tar.gz opensim-SC_OLD-ec1a5d89336570d1cbef64607160bd8ab1a55fb6.tar.bz2 opensim-SC_OLD-ec1a5d89336570d1cbef64607160bd8ab1a55fb6.tar.xz |
Some module reshuffling, no user functionality yet
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/MoneyModule/Resources/MoneyModulePlugin.addin.xml (renamed from OpenSim/Region/ReplaceableModules/MoneyModule/Resources/MoneyModulePlugin.addin.xml) | 0 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs (renamed from OpenSim/Region/ReplaceableModules/MoneyModule/SampleMoneyModule.cs) | 43 |
2 files changed, 31 insertions, 12 deletions
diff --git a/OpenSim/Region/ReplaceableModules/MoneyModule/Resources/MoneyModulePlugin.addin.xml b/OpenSim/Region/OptionalModules/World/MoneyModule/Resources/MoneyModulePlugin.addin.xml index a25f297..a25f297 100644 --- a/OpenSim/Region/ReplaceableModules/MoneyModule/Resources/MoneyModulePlugin.addin.xml +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/Resources/MoneyModulePlugin.addin.xml | |||
diff --git a/OpenSim/Region/ReplaceableModules/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index c4fd4bc..5471f9e 100644 --- a/OpenSim/Region/ReplaceableModules/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | |||
@@ -33,6 +33,7 @@ using System.Reflection; | |||
33 | using log4net; | 33 | using log4net; |
34 | using Nini.Config; | 34 | using Nini.Config; |
35 | using Nwc.XmlRpc; | 35 | using Nwc.XmlRpc; |
36 | using Mono.Addins; | ||
36 | using OpenMetaverse; | 37 | using OpenMetaverse; |
37 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
38 | using OpenSim.Framework.Communications.Cache; | 39 | using OpenSim.Framework.Communications.Cache; |
@@ -40,7 +41,10 @@ using OpenSim.Framework.Servers.HttpServer; | |||
40 | using OpenSim.Region.Framework.Interfaces; | 41 | using OpenSim.Region.Framework.Interfaces; |
41 | using OpenSim.Region.Framework.Scenes; | 42 | using OpenSim.Region.Framework.Scenes; |
42 | 43 | ||
43 | namespace OpenSim.Region.ReplaceableModules.MoneyModule | 44 | [assembly: Addin("SampleMoneyModule", "0.1")] |
45 | [assembly: AddinDependency("OpenSim", "0.5")] | ||
46 | |||
47 | namespace OpenSim.Region.OptionalModules.World.MoneyModule | ||
44 | { | 48 | { |
45 | /// <summary> | 49 | /// <summary> |
46 | /// This is only the functionality required to make the functionality associated with money work | 50 | /// This is only the functionality required to make the functionality associated with money work |
@@ -52,7 +56,9 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule | |||
52 | /// This commonly looks like -helperuri http://127.0.0.1:9000/ | 56 | /// This commonly looks like -helperuri http://127.0.0.1:9000/ |
53 | /// | 57 | /// |
54 | /// </summary> | 58 | /// </summary> |
55 | public class SampleMoneyModule : IMoneyModule, IRegionModule | 59 | |
60 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | ||
61 | public class SampleMoneyModule : IMoneyModule, ISharedRegionModule | ||
56 | { | 62 | { |
57 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 63 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
58 | 64 | ||
@@ -110,7 +116,7 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule | |||
110 | /// </summary> | 116 | /// </summary> |
111 | /// <param name="scene"></param> | 117 | /// <param name="scene"></param> |
112 | /// <param name="config"></param> | 118 | /// <param name="config"></param> |
113 | public void Initialise(Scene scene, IConfigSource config) | 119 | public void Initialise(IConfigSource config) |
114 | { | 120 | { |
115 | m_gConfig = config; | 121 | m_gConfig = config; |
116 | 122 | ||
@@ -118,8 +124,14 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule | |||
118 | IConfig economyConfig = m_gConfig.Configs["Economy"]; | 124 | IConfig economyConfig = m_gConfig.Configs["Economy"]; |
119 | 125 | ||
120 | 126 | ||
121 | ReadConfigAndPopulate(scene, startupConfig, "Startup"); | 127 | ReadConfigAndPopulate(startupConfig, "Startup"); |
122 | ReadConfigAndPopulate(scene, economyConfig, "Economy"); | 128 | ReadConfigAndPopulate(economyConfig, "Economy"); |
129 | } | ||
130 | |||
131 | public void AddRegion(Scene scene) | ||
132 | { | ||
133 | // Send ObjectCapacity to Scene.. Which sends it to the SimStatsReporter. | ||
134 | scene.SetObjectCapacity(ObjectCapacity); | ||
123 | 135 | ||
124 | if (m_enabled) | 136 | if (m_enabled) |
125 | { | 137 | { |
@@ -167,6 +179,15 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule | |||
167 | } | 179 | } |
168 | } | 180 | } |
169 | 181 | ||
182 | public void RemoveRegion(Scene scene) | ||
183 | { | ||
184 | } | ||
185 | |||
186 | public void RegionLoaded(Scene scene) | ||
187 | { | ||
188 | } | ||
189 | |||
190 | |||
170 | // Please do not refactor these to be just one method | 191 | // Please do not refactor these to be just one method |
171 | // Existing implementations need the distinction | 192 | // Existing implementations need the distinction |
172 | // | 193 | // |
@@ -202,14 +223,14 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule | |||
202 | { | 223 | { |
203 | } | 224 | } |
204 | 225 | ||
205 | public string Name | 226 | public Type ReplacableInterface |
206 | { | 227 | { |
207 | get { return "BetaGridLikeMoneyModule"; } | 228 | get { return typeof(IMoneyModule); } |
208 | } | 229 | } |
209 | 230 | ||
210 | public bool IsSharedModule | 231 | public string Name |
211 | { | 232 | { |
212 | get { return true; } | 233 | get { return "BetaGridLikeMoneyModule"; } |
213 | } | 234 | } |
214 | 235 | ||
215 | #endregion | 236 | #endregion |
@@ -220,7 +241,7 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule | |||
220 | /// <param name="scene"></param> | 241 | /// <param name="scene"></param> |
221 | /// <param name="startupConfig"></param> | 242 | /// <param name="startupConfig"></param> |
222 | /// <param name="config"></param> | 243 | /// <param name="config"></param> |
223 | private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string config) | 244 | private void ReadConfigAndPopulate(IConfig startupConfig, string config) |
224 | { | 245 | { |
225 | if (config == "Startup" && startupConfig != null) | 246 | if (config == "Startup" && startupConfig != null) |
226 | { | 247 | { |
@@ -249,8 +270,6 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule | |||
249 | m_sellEnabled = startupConfig.GetBoolean("SellEnabled", false); | 270 | m_sellEnabled = startupConfig.GetBoolean("SellEnabled", false); |
250 | } | 271 | } |
251 | 272 | ||
252 | // Send ObjectCapacity to Scene.. Which sends it to the SimStatsReporter. | ||
253 | scene.SetObjectCapacity(ObjectCapacity); | ||
254 | } | 273 | } |
255 | 274 | ||
256 | public EconomyData GetEconomyData() | 275 | public EconomyData GetEconomyData() |