From fc75a2031ee557c0e4154aa066e20b773ac72dda Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 26 Jan 2009 20:05:13 +0000 Subject: [PATCH] * Providing a way for the rest of the simulator to get at the economy settings through the IMoneyModule interface. --- .../Currency/SampleMoney/SampleMoneyModule.cs | 23 +++++++++++++++++++ OpenSim/Region/Interfaces/IMoneyModule.cs | 21 +++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs index a1940ae037..07e62e20fc 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs @@ -279,6 +279,27 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney scene.SetObjectCapacity(ObjectCapacity); } + public EconomyData GetEconomyData() + { + EconomyData edata = new EconomyData(); + edata.ObjectCapacity = ObjectCapacity; + edata.ObjectCount = ObjectCount; + edata.PriceEnergyUnit = PriceEnergyUnit; + edata.PriceGroupCreate = PriceGroupCreate; + edata.PriceObjectClaim = PriceObjectClaim; + edata.PriceObjectRent = PriceObjectRent; + edata.PriceObjectScaleFactor = PriceObjectScaleFactor; + edata.PriceParcelClaim = PriceParcelClaim; + edata.PriceParcelClaimFactor = PriceParcelClaimFactor; + edata.PriceParcelRent = PriceParcelRent; + edata.PricePublicObjectDecay = PricePublicObjectDecay; + edata.PricePublicObjectDelete = PricePublicObjectDelete; + edata.PriceRentLight = PriceRentLight; + edata.PriceUpload = PriceUpload; + edata.TeleportMinPrice = TeleportMinPrice; + return edata; + } + private void GetClientFunds(IClientAPI client) { // Here we check if we're in grid mode @@ -1580,4 +1601,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney Gift = 2, Purchase = 3 } + + } diff --git a/OpenSim/Region/Interfaces/IMoneyModule.cs b/OpenSim/Region/Interfaces/IMoneyModule.cs index 1fa4f13925..5dfb64c54a 100644 --- a/OpenSim/Region/Interfaces/IMoneyModule.cs +++ b/OpenSim/Region/Interfaces/IMoneyModule.cs @@ -45,6 +45,27 @@ namespace OpenSim.Region.Interfaces bool AmountCovered(IClientAPI client, int amount); void ApplyCharge(UUID agentID, int amount, string text); + EconomyData GetEconomyData(); + event ObjectPaid OnObjectPaid; } + + public struct EconomyData + { + public int ObjectCapacity; + public int ObjectCount; + public int PriceEnergyUnit; + public int PriceGroupCreate; + public int PriceObjectClaim; + public float PriceObjectRent; + public float PriceObjectScaleFactor; + public int PriceParcelClaim; + public float PriceParcelClaimFactor; + public int PriceParcelRent; + public int PricePublicObjectDecay; + public int PricePublicObjectDelete; + public int PriceRentLight; + public int PriceUpload; + public int TeleportMinPrice; + } }