diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | 59 |
1 files changed, 18 insertions, 41 deletions
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index b9a75cc..653f856 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | |||
@@ -108,6 +108,16 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
108 | 108 | ||
109 | public event ObjectPaid OnObjectPaid; | 109 | public event ObjectPaid OnObjectPaid; |
110 | 110 | ||
111 | public int UploadCharge | ||
112 | { | ||
113 | get { return 0; } | ||
114 | } | ||
115 | |||
116 | public int GroupCreationCharge | ||
117 | { | ||
118 | get { return 0; } | ||
119 | } | ||
120 | |||
111 | /// <summary> | 121 | /// <summary> |
112 | /// Startup | 122 | /// Startup |
113 | /// </summary> | 123 | /// </summary> |
@@ -128,8 +138,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
128 | public void AddRegion(Scene scene) | 138 | public void AddRegion(Scene scene) |
129 | { | 139 | { |
130 | // Send ObjectCapacity to Scene.. Which sends it to the SimStatsReporter. | 140 | // Send ObjectCapacity to Scene.. Which sends it to the SimStatsReporter. |
131 | scene.SetObjectCapacity(ObjectCapacity); | ||
132 | |||
133 | if (m_enabled) | 141 | if (m_enabled) |
134 | { | 142 | { |
135 | scene.RegisterModuleInterface<IMoneyModule>(this); | 143 | scene.RegisterModuleInterface<IMoneyModule>(this); |
@@ -188,15 +196,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
188 | // Please do not refactor these to be just one method | 196 | // Please do not refactor these to be just one method |
189 | // Existing implementations need the distinction | 197 | // Existing implementations need the distinction |
190 | // | 198 | // |
191 | public void ApplyUploadCharge(UUID agentID) | 199 | public void ApplyCharge(UUID agentID, int amount, string text) |
192 | { | ||
193 | } | ||
194 | |||
195 | public void ApplyGroupCreationCharge(UUID agentID) | ||
196 | { | 200 | { |
197 | } | 201 | } |
198 | 202 | public void ApplyUploadCharge(UUID agentID, int amount, string text) | |
199 | public void ApplyCharge(UUID agentID, int amount, string text) | ||
200 | { | 203 | { |
201 | } | 204 | } |
202 | 205 | ||
@@ -247,7 +250,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
247 | 250 | ||
248 | if (config == "Economy" && startupConfig != null) | 251 | if (config == "Economy" && startupConfig != null) |
249 | { | 252 | { |
250 | ObjectCapacity = startupConfig.GetInt("ObjectCapacity", 45000); | ||
251 | PriceEnergyUnit = startupConfig.GetInt("PriceEnergyUnit", 100); | 253 | PriceEnergyUnit = startupConfig.GetInt("PriceEnergyUnit", 100); |
252 | PriceObjectClaim = startupConfig.GetInt("PriceObjectClaim", 10); | 254 | PriceObjectClaim = startupConfig.GetInt("PriceObjectClaim", 10); |
253 | PricePublicObjectDecay = startupConfig.GetInt("PricePublicObjectDecay", 4); | 255 | PricePublicObjectDecay = startupConfig.GetInt("PricePublicObjectDecay", 4); |
@@ -268,27 +270,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
268 | 270 | ||
269 | } | 271 | } |
270 | 272 | ||
271 | public EconomyData GetEconomyData() | ||
272 | { | ||
273 | EconomyData edata = new EconomyData(); | ||
274 | edata.ObjectCapacity = ObjectCapacity; | ||
275 | edata.ObjectCount = ObjectCount; | ||
276 | edata.PriceEnergyUnit = PriceEnergyUnit; | ||
277 | edata.PriceGroupCreate = PriceGroupCreate; | ||
278 | edata.PriceObjectClaim = PriceObjectClaim; | ||
279 | edata.PriceObjectRent = PriceObjectRent; | ||
280 | edata.PriceObjectScaleFactor = PriceObjectScaleFactor; | ||
281 | edata.PriceParcelClaim = PriceParcelClaim; | ||
282 | edata.PriceParcelClaimFactor = PriceParcelClaimFactor; | ||
283 | edata.PriceParcelRent = PriceParcelRent; | ||
284 | edata.PricePublicObjectDecay = PricePublicObjectDecay; | ||
285 | edata.PricePublicObjectDelete = PricePublicObjectDelete; | ||
286 | edata.PriceRentLight = PriceRentLight; | ||
287 | edata.PriceUpload = PriceUpload; | ||
288 | edata.TeleportMinPrice = TeleportMinPrice; | ||
289 | return edata; | ||
290 | } | ||
291 | |||
292 | private void GetClientFunds(IClientAPI client) | 273 | private void GetClientFunds(IClientAPI client) |
293 | { | 274 | { |
294 | CheckExistAndRefreshFunds(client.AgentId); | 275 | CheckExistAndRefreshFunds(client.AgentId); |
@@ -717,7 +698,9 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
717 | 698 | ||
718 | if (user != null) | 699 | if (user != null) |
719 | { | 700 | { |
720 | user.SendEconomyData(EnergyEfficiency, ObjectCapacity, ObjectCount, PriceEnergyUnit, PriceGroupCreate, | 701 | Scene s = LocateSceneClientIn(user.AgentId); |
702 | |||
703 | user.SendEconomyData(EnergyEfficiency, s.RegionInfo.ObjectCapacity, ObjectCount, PriceEnergyUnit, PriceGroupCreate, | ||
721 | PriceObjectClaim, PriceObjectRent, PriceObjectScaleFactor, PriceParcelClaim, PriceParcelClaimFactor, | 704 | PriceObjectClaim, PriceObjectRent, PriceObjectScaleFactor, PriceParcelClaim, PriceParcelClaimFactor, |
722 | PriceParcelRent, PricePublicObjectDecay, PricePublicObjectDelete, PriceRentLight, PriceUpload, | 705 | PriceParcelRent, PricePublicObjectDecay, PricePublicObjectDelete, PriceRentLight, PriceUpload, |
723 | TeleportMinPrice, TeleportPriceExponent); | 706 | TeleportMinPrice, TeleportPriceExponent); |
@@ -790,7 +773,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
790 | //m_log.Info("[FRIEND]: " + avatar.Name + " status:" + (!avatar.IsChildAgent).ToString()); | 773 | //m_log.Info("[FRIEND]: " + avatar.Name + " status:" + (!avatar.IsChildAgent).ToString()); |
791 | } | 774 | } |
792 | 775 | ||
793 | public int GetBalance(IClientAPI client) | 776 | public int GetBalance(UUID agentID) |
794 | { | 777 | { |
795 | return 0; | 778 | return 0; |
796 | } | 779 | } |
@@ -798,16 +781,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
798 | // Please do not refactor these to be just one method | 781 | // Please do not refactor these to be just one method |
799 | // Existing implementations need the distinction | 782 | // Existing implementations need the distinction |
800 | // | 783 | // |
801 | public bool UploadCovered(IClientAPI client) | 784 | public bool UploadCovered(IClientAPI client, int amount) |
802 | { | 785 | { |
803 | return AmountCovered(client, PriceUpload); | 786 | return true; |
804 | } | ||
805 | |||
806 | public bool GroupCreationCovered(IClientAPI client) | ||
807 | { | ||
808 | return AmountCovered(client, PriceGroupCreate); | ||
809 | } | 787 | } |
810 | |||
811 | public bool AmountCovered(IClientAPI client, int amount) | 788 | public bool AmountCovered(IClientAPI client, int amount) |
812 | { | 789 | { |
813 | return true; | 790 | return true; |