aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2009-07-10 20:46:16 +0000
committerMelanie Thielker2009-07-10 20:46:16 +0000
commitec1a5d89336570d1cbef64607160bd8ab1a55fb6 (patch)
treefb6995d36b431e7e65c8f46bb7f3c00fba12fd2b
parentCommitting the interface change and the addition to the modules to get (diff)
downloadopensim-SC-ec1a5d89336570d1cbef64607160bd8ab1a55fb6.zip
opensim-SC-ec1a5d89336570d1cbef64607160bd8ab1a55fb6.tar.gz
opensim-SC-ec1a5d89336570d1cbef64607160bd8ab1a55fb6.tar.bz2
opensim-SC-ec1a5d89336570d1cbef64607160bd8ab1a55fb6.tar.xz
Some module reshuffling, no user functionality yet
-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
-rw-r--r--prebuild.xml38
3 files changed, 31 insertions, 50 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;
33using log4net; 33using log4net;
34using Nini.Config; 34using Nini.Config;
35using Nwc.XmlRpc; 35using Nwc.XmlRpc;
36using Mono.Addins;
36using OpenMetaverse; 37using OpenMetaverse;
37using OpenSim.Framework; 38using OpenSim.Framework;
38using OpenSim.Framework.Communications.Cache; 39using OpenSim.Framework.Communications.Cache;
@@ -40,7 +41,10 @@ using OpenSim.Framework.Servers.HttpServer;
40using OpenSim.Region.Framework.Interfaces; 41using OpenSim.Region.Framework.Interfaces;
41using OpenSim.Region.Framework.Scenes; 42using OpenSim.Region.Framework.Scenes;
42 43
43namespace OpenSim.Region.ReplaceableModules.MoneyModule 44[assembly: Addin("SampleMoneyModule", "0.1")]
45[assembly: AddinDependency("OpenSim", "0.5")]
46
47namespace 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()
diff --git a/prebuild.xml b/prebuild.xml
index 8274ad5..77b6e1a 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -3164,44 +3164,6 @@
3164 </Files> 3164 </Files>
3165 </Project> 3165 </Project>
3166 3166
3167 <Project name="OpenSim.Region.ReplaceableModules.MoneyModule" path="OpenSim/Region/ReplaceableModules/MoneyModule" type="Library">
3168 <Configuration name="Debug">
3169 <Options>
3170 <OutputPath>../../../../bin/</OutputPath>
3171 </Options>
3172 </Configuration>
3173 <Configuration name="Release">
3174 <Options>
3175 <OutputPath>../../../../bin/</OutputPath>
3176 </Options>
3177 </Configuration>
3178
3179 <ReferencePath>../../../../bin/</ReferencePath>
3180 <Reference name="System"/>
3181 <Reference name="System.Xml"/>
3182 <Reference name="System.Web"/>
3183 <Reference name="OpenMetaverseTypes.dll"/>
3184 <Reference name="OpenMetaverse.dll"/>
3185 <Reference name="OpenSim.Framework"/>
3186 <Reference name="OpenSim.Framework.Communications"/>
3187 <Reference name="OpenSim.Region.Framework" />
3188 <Reference name="OpenSim.Framework.Servers"/>
3189 <Reference name="OpenSim.Framework.Servers.HttpServer"/>
3190 <Reference name="OpenSim.Framework.Serialization"/>
3191 <Reference name="OpenSim.Framework.Console"/>
3192 <Reference name="XMLRPC.dll"/>
3193 <Reference name="OpenSim.Framework.Communications"/>
3194 <Reference name="Nini.dll" />
3195 <Reference name="log4net.dll"/>
3196
3197 <Files>
3198 <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/>
3199 <Match pattern="*.cs" recurse="true">
3200 </Match>
3201 <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/>
3202 </Files>
3203 </Project>
3204
3205 <Project name="OpenSim.Region.UserStatistics" path="OpenSim/Region/UserStatistics" type="Library"> 3167 <Project name="OpenSim.Region.UserStatistics" path="OpenSim/Region/UserStatistics" type="Library">
3206 <Configuration name="Debug"> 3168 <Configuration name="Debug">
3207 <Options> 3169 <Options>