Some module reshuffling, no user functionality yet
parent
8ecfc9a717
commit
ec1a5d8933
|
@ -33,6 +33,7 @@ using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
|
using Mono.Addins;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications.Cache;
|
using OpenSim.Framework.Communications.Cache;
|
||||||
|
@ -40,7 +41,10 @@ using OpenSim.Framework.Servers.HttpServer;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.ReplaceableModules.MoneyModule
|
[assembly: Addin("SampleMoneyModule", "0.1")]
|
||||||
|
[assembly: AddinDependency("OpenSim", "0.5")]
|
||||||
|
|
||||||
|
namespace OpenSim.Region.OptionalModules.World.MoneyModule
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is only the functionality required to make the functionality associated with money work
|
/// This is only the functionality required to make the functionality associated with money work
|
||||||
|
@ -52,7 +56,9 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule
|
||||||
/// This commonly looks like -helperuri http://127.0.0.1:9000/
|
/// This commonly looks like -helperuri http://127.0.0.1:9000/
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SampleMoneyModule : IMoneyModule, IRegionModule
|
|
||||||
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||||
|
public class SampleMoneyModule : IMoneyModule, ISharedRegionModule
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
@ -110,7 +116,7 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="scene"></param>
|
/// <param name="scene"></param>
|
||||||
/// <param name="config"></param>
|
/// <param name="config"></param>
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
m_gConfig = config;
|
m_gConfig = config;
|
||||||
|
|
||||||
|
@ -118,8 +124,14 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule
|
||||||
IConfig economyConfig = m_gConfig.Configs["Economy"];
|
IConfig economyConfig = m_gConfig.Configs["Economy"];
|
||||||
|
|
||||||
|
|
||||||
ReadConfigAndPopulate(scene, startupConfig, "Startup");
|
ReadConfigAndPopulate(startupConfig, "Startup");
|
||||||
ReadConfigAndPopulate(scene, economyConfig, "Economy");
|
ReadConfigAndPopulate(economyConfig, "Economy");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddRegion(Scene scene)
|
||||||
|
{
|
||||||
|
// Send ObjectCapacity to Scene.. Which sends it to the SimStatsReporter.
|
||||||
|
scene.SetObjectCapacity(ObjectCapacity);
|
||||||
|
|
||||||
if (m_enabled)
|
if (m_enabled)
|
||||||
{
|
{
|
||||||
|
@ -167,6 +179,15 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RemoveRegion(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RegionLoaded(Scene scene)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Please do not refactor these to be just one method
|
// Please do not refactor these to be just one method
|
||||||
// Existing implementations need the distinction
|
// Existing implementations need the distinction
|
||||||
//
|
//
|
||||||
|
@ -202,16 +223,16 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Type ReplacableInterface
|
||||||
|
{
|
||||||
|
get { return typeof(IMoneyModule); }
|
||||||
|
}
|
||||||
|
|
||||||
public string Name
|
public string Name
|
||||||
{
|
{
|
||||||
get { return "BetaGridLikeMoneyModule"; }
|
get { return "BetaGridLikeMoneyModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSharedModule
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -220,7 +241,7 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule
|
||||||
/// <param name="scene"></param>
|
/// <param name="scene"></param>
|
||||||
/// <param name="startupConfig"></param>
|
/// <param name="startupConfig"></param>
|
||||||
/// <param name="config"></param>
|
/// <param name="config"></param>
|
||||||
private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string config)
|
private void ReadConfigAndPopulate(IConfig startupConfig, string config)
|
||||||
{
|
{
|
||||||
if (config == "Startup" && startupConfig != null)
|
if (config == "Startup" && startupConfig != null)
|
||||||
{
|
{
|
||||||
|
@ -249,8 +270,6 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule
|
||||||
m_sellEnabled = startupConfig.GetBoolean("SellEnabled", false);
|
m_sellEnabled = startupConfig.GetBoolean("SellEnabled", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send ObjectCapacity to Scene.. Which sends it to the SimStatsReporter.
|
|
||||||
scene.SetObjectCapacity(ObjectCapacity);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public EconomyData GetEconomyData()
|
public EconomyData GetEconomyData()
|
38
prebuild.xml
38
prebuild.xml
|
@ -3164,44 +3164,6 @@
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
<Project name="OpenSim.Region.ReplaceableModules.MoneyModule" path="OpenSim/Region/ReplaceableModules/MoneyModule" type="Library">
|
|
||||||
<Configuration name="Debug">
|
|
||||||
<Options>
|
|
||||||
<OutputPath>../../../../bin/</OutputPath>
|
|
||||||
</Options>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration name="Release">
|
|
||||||
<Options>
|
|
||||||
<OutputPath>../../../../bin/</OutputPath>
|
|
||||||
</Options>
|
|
||||||
</Configuration>
|
|
||||||
|
|
||||||
<ReferencePath>../../../../bin/</ReferencePath>
|
|
||||||
<Reference name="System"/>
|
|
||||||
<Reference name="System.Xml"/>
|
|
||||||
<Reference name="System.Web"/>
|
|
||||||
<Reference name="OpenMetaverseTypes.dll"/>
|
|
||||||
<Reference name="OpenMetaverse.dll"/>
|
|
||||||
<Reference name="OpenSim.Framework"/>
|
|
||||||
<Reference name="OpenSim.Framework.Communications"/>
|
|
||||||
<Reference name="OpenSim.Region.Framework" />
|
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
|
||||||
<Reference name="OpenSim.Framework.Servers.HttpServer"/>
|
|
||||||
<Reference name="OpenSim.Framework.Serialization"/>
|
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
|
||||||
<Reference name="XMLRPC.dll"/>
|
|
||||||
<Reference name="OpenSim.Framework.Communications"/>
|
|
||||||
<Reference name="Nini.dll" />
|
|
||||||
<Reference name="log4net.dll"/>
|
|
||||||
|
|
||||||
<Files>
|
|
||||||
<Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/>
|
|
||||||
<Match pattern="*.cs" recurse="true">
|
|
||||||
</Match>
|
|
||||||
<Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/>
|
|
||||||
</Files>
|
|
||||||
</Project>
|
|
||||||
|
|
||||||
<Project name="OpenSim.Region.UserStatistics" path="OpenSim/Region/UserStatistics" type="Library">
|
<Project name="OpenSim.Region.UserStatistics" path="OpenSim/Region/UserStatistics" type="Library">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
|
|
Loading…
Reference in New Issue