* Providing a way for the rest of the simulator to get at the economy settings through the IMoneyModule interface.

0.6.3-post-fixes
Teravus Ovares 2009-01-26 20:05:13 +00:00
parent f9b5329a74
commit fc75a2031e
2 changed files with 44 additions and 0 deletions

View File

@ -279,6 +279,27 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
scene.SetObjectCapacity(ObjectCapacity); 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) private void GetClientFunds(IClientAPI client)
{ {
// Here we check if we're in grid mode // Here we check if we're in grid mode
@ -1580,4 +1601,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
Gift = 2, Gift = 2,
Purchase = 3 Purchase = 3
} }
} }

View File

@ -45,6 +45,27 @@ namespace OpenSim.Region.Interfaces
bool AmountCovered(IClientAPI client, int amount); bool AmountCovered(IClientAPI client, int amount);
void ApplyCharge(UUID agentID, int amount, string text); void ApplyCharge(UUID agentID, int amount, string text);
EconomyData GetEconomyData();
event ObjectPaid OnObjectPaid; 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;
}
} }