diff --git a/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java b/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java index f705a3b1..d5167531 100644 --- a/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java @@ -967,8 +967,11 @@ public class ConfigManager { Jobs.getGCManager().setTntFinder(true); double income = section.getDouble("income", 0.0); + income = updateValue(CurrencyType.MONEY, income); double points = section.getDouble("points", 0.0); + points = updateValue(CurrencyType.POINTS, points); double experience = section.getDouble("experience", 0.0); + experience = updateValue(CurrencyType.EXP, experience); int fromlevel = 1; @@ -1010,4 +1013,10 @@ public class ConfigManager { // e.printStackTrace(); //} } + + private double updateValue(CurrencyType type, double amount) { + Double mult = Jobs.getGCManager().getGeneralMulti(type); + amount = amount + (amount * mult); + return amount; + } } diff --git a/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java b/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java index 3ceb290f..a539a173 100644 --- a/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java @@ -69,6 +69,7 @@ public class GeneralConfigManager { public boolean PaymentMethodsMoney; public boolean PaymentMethodsPoints; public boolean PaymentMethodsExp; + private HashMap generalMulti = new HashMap(); public int getSelectionTooldID; private int ResetTimeHour; @@ -101,7 +102,7 @@ public class GeneralConfigManager { public boolean fixAtMaxLevel, ToggleActionBar, TitleChangeChat, TitleChangeActionBar, LevelChangeChat, LevelChangeActionBar, SoundLevelupUse, SoundTitleChangeUse, UseServerAccount, EmptyServerAcountChat, EmptyServerAcountActionBar, ActionBarsMessageByDefault, ShowTotalWorkers, ShowPenaltyBonus, useDynamicPayment, - JobsGUIOpenOnBrowse, JobsGUIShowChatBrowse, JobsGUISwitcheButtons, JobsGUIOpenOnJoin; + JobsGUIOpenOnBrowse, JobsGUIShowChatBrowse, JobsGUISwitcheButtons, JobsGUIOpenOnJoin; private int JobsGUIRows, JobsGUIBackButton, JobsGUIStartPosition, @@ -572,6 +573,18 @@ public class GeneralConfigManager { PaymentMethodsPoints = c.get("Economy.PaymentMethods.Points", true); PaymentMethodsExp = c.get("Economy.PaymentMethods.Exp", true); + c.getW().addComment("Economy.GeneralMulti", + "Can be used to change payment amounts for all jobs and all actions if you want to readjust them", + "Amounts are in percentage, above 0 will increase payments", + "Amount belove 0 will decrease payments", + "If action pays negative amount, then value above 0 will increase that negative value", + "So is placing diamond ore takes from you 10 bucks, then by setting 50 for money income, you will be charged 15 bucks for placing it", + "If you are getting paid 10 for placing wood, then same value of 50 for money income, will result you getting 15 bucks", + "This only effects base income value"); + for (CurrencyType one : CurrencyType.values()) { + generalMulti.put(one, c.get("Economy.GeneralMulti." + one.name(), 0D) / 100D); + } + c.getW().addComment("Economy.MinimumOveralPayment.use", "Determines minimum payment. In example if player uses McMMO treefeller and earns only 20%, but at same time he gets 25% penalty from dynamic payment. He can 'get' negative amount of money", "This will limit it to particular percentage", "Works only when original payment is above 0"); @@ -1007,4 +1020,8 @@ public class GeneralConfigManager { return JobsGUISkipAmount; } + public Double getGeneralMulti(CurrencyType type) { + return generalMulti.get(type); + } + }