mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 14:05:25 +01:00
Option to change all base payment values
This commit is contained in:
parent
2e6f453120
commit
093675b86c
@ -967,8 +967,11 @@ public class ConfigManager {
|
|||||||
Jobs.getGCManager().setTntFinder(true);
|
Jobs.getGCManager().setTntFinder(true);
|
||||||
|
|
||||||
double income = section.getDouble("income", 0.0);
|
double income = section.getDouble("income", 0.0);
|
||||||
|
income = updateValue(CurrencyType.MONEY, income);
|
||||||
double points = section.getDouble("points", 0.0);
|
double points = section.getDouble("points", 0.0);
|
||||||
|
points = updateValue(CurrencyType.POINTS, points);
|
||||||
double experience = section.getDouble("experience", 0.0);
|
double experience = section.getDouble("experience", 0.0);
|
||||||
|
experience = updateValue(CurrencyType.EXP, experience);
|
||||||
|
|
||||||
int fromlevel = 1;
|
int fromlevel = 1;
|
||||||
|
|
||||||
@ -1010,4 +1013,10 @@ public class ConfigManager {
|
|||||||
// e.printStackTrace();
|
// e.printStackTrace();
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private double updateValue(CurrencyType type, double amount) {
|
||||||
|
Double mult = Jobs.getGCManager().getGeneralMulti(type);
|
||||||
|
amount = amount + (amount * mult);
|
||||||
|
return amount;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,7 @@ public class GeneralConfigManager {
|
|||||||
public boolean PaymentMethodsMoney;
|
public boolean PaymentMethodsMoney;
|
||||||
public boolean PaymentMethodsPoints;
|
public boolean PaymentMethodsPoints;
|
||||||
public boolean PaymentMethodsExp;
|
public boolean PaymentMethodsExp;
|
||||||
|
private HashMap<CurrencyType, Double> generalMulti = new HashMap<CurrencyType, Double>();
|
||||||
public int getSelectionTooldID;
|
public int getSelectionTooldID;
|
||||||
|
|
||||||
private int ResetTimeHour;
|
private int ResetTimeHour;
|
||||||
@ -572,6 +573,18 @@ public class GeneralConfigManager {
|
|||||||
PaymentMethodsPoints = c.get("Economy.PaymentMethods.Points", true);
|
PaymentMethodsPoints = c.get("Economy.PaymentMethods.Points", true);
|
||||||
PaymentMethodsExp = c.get("Economy.PaymentMethods.Exp", 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",
|
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",
|
"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");
|
"This will limit it to particular percentage", "Works only when original payment is above 0");
|
||||||
@ -1007,4 +1020,8 @@ public class GeneralConfigManager {
|
|||||||
return JobsGUISkipAmount;
|
return JobsGUISkipAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Double getGeneralMulti(CurrencyType type) {
|
||||||
|
return generalMulti.get(type);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user