aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/cowtipper/cowlection/config
diff options
context:
space:
mode:
authorCow <cow@volloeko.de>2021-03-16 15:46:08 +0100
committerCow <cow@volloeko.de>2021-03-16 15:46:08 +0100
commitf43d8f566c6140eda00867b2ccfdbc2e967e5596 (patch)
tree758ea85ef9dc9511860352805b07adc65f4f500c /src/main/java/de/cowtipper/cowlection/config
parentf567357a8f625e63f8418d733604bfed0d265937 (diff)
downloadCowlection-f43d8f566c6140eda00867b2ccfdbc2e967e5596.tar.gz
Cowlection-f43d8f566c6140eda00867b2ccfdbc2e967e5596.tar.bz2
Cowlection-f43d8f566c6140eda00867b2ccfdbc2e967e5596.zip
Added Bestiary Overview
- plus small cleanup here and there
Diffstat (limited to 'src/main/java/de/cowtipper/cowlection/config')
-rw-r--r--src/main/java/de/cowtipper/cowlection/config/MooConfig.java29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/main/java/de/cowtipper/cowlection/config/MooConfig.java b/src/main/java/de/cowtipper/cowlection/config/MooConfig.java
index c422236..caa392a 100644
--- a/src/main/java/de/cowtipper/cowlection/config/MooConfig.java
+++ b/src/main/java/de/cowtipper/cowlection/config/MooConfig.java
@@ -78,6 +78,8 @@ public class MooConfig {
private static String tooltipAuctionHousePriceEach;
private static String bazaarConnectGraphsNodes;
public static int bazaarConnectGraphsLineWidth;
+ public static String bestiaryOverviewOrder;
+ private String[] bestiaryOverviewOrderDefaultValues;
private static int lookupWikiKeyBinding;
private static int lookupPriceKeyBinding;
public static boolean lookupItemDirectly;
@@ -387,7 +389,7 @@ public class MooConfig {
"numeralSystem", "Arabic: 1, 4, 10", "Use Roman or Arabic numeral system?", new String[]{"Arabic: 1, 4, 10", "Roman: I, IV, X"}));
Map<String, NBTBase> demoAhItemExtraAttributes = new HashMap<>();
- demoItemExtraAttributes.put("id", new NBTTagString("BEACON"));
+ demoAhItemExtraAttributes.put("id", new NBTTagString("BEACON"));
ItemStack demoAhItem = MooConfigPreview.createDemoItem("beacon", "§764x §fB§8e§facon Block", new String[]{"§f§lCOMMON", "§8§m-----------------", "§7Seller: §6[MVP§0++§6] Enlightener", "§7Buy it now: §63,900,000 coins", "", "§7Ends in: §e13h 33m 37s", "", "§eDon't click to inspect!"}, demoAhItemExtraAttributes);
demoAhItem.stackSize = 64;
MooConfigPreview ahItemPreview = new MooConfigPreview(demoAhItem);
@@ -409,6 +411,16 @@ public class MooConfig {
Property propBazaarConnectGraphsLineWidth = subCat.addConfigEntry(cfg.get(configCat.getConfigName(),
"bazaarConnectGraphsLineWidth", 3, "Line width of bazaar graph", 1, 10));
+ bestiaryOverviewOrderDefaultValues = new String[]{"fewest kills", "lowest %", "hidden"};
+ MooConfigPreview bestiaryOverviewPreview = new MooConfigPreview(MooConfigPreview.createDemoItem("wheat", "§a§3The Barn", new String[]{
+ "§7View all of the mobs that you've",
+ "§7found and killed in §3The Barn§7.",
+ "",
+ "§7Families Found: §e75§6%", "§3---------------§f----- §b3§3/§b4"}, Maps.newHashMap()));
+ Property propBestiaryOverviewOrder = subCat.addConfigEntry(cfg.get(configCat.getConfigName(),
+ "bestiaryOverviewOrder", "fewest kills", "Order of the Bestiary overview?", bestiaryOverviewOrderDefaultValues),
+ bestiaryOverviewPreview);
+
// Sub-Category: Item lookup
subCat = configCat.addSubCategory("Item lookup");
subCat.addExplanations("Lookup item prices or wiki articles for any SkyBlock item in any inventory.");
@@ -586,6 +598,7 @@ public class MooConfig {
tooltipAuctionHousePriceEach = propTooltipAuctionHousePriceEach.getString();
bazaarConnectGraphsNodes = propBazaarConnectGraphsNodes.getString();
bazaarConnectGraphsLineWidth = propBazaarConnectGraphsLineWidth.getInt();
+ bestiaryOverviewOrder = propBestiaryOverviewOrder.getString();
lookupWikiKeyBinding = propLookupWikiKeyBinding.getInt();
lookupPriceKeyBinding = propLookupPriceKeyBinding.getInt();
lookupItemDirectly = propLookupItemDirectly.getBoolean();
@@ -650,6 +663,7 @@ public class MooConfig {
propTooltipAuctionHousePriceEach.set(tooltipAuctionHousePriceEach);
propBazaarConnectGraphsNodes.set(bazaarConnectGraphsNodes);
propBazaarConnectGraphsLineWidth.set(bazaarConnectGraphsLineWidth);
+ propBestiaryOverviewOrder.set(bestiaryOverviewOrder);
propLookupWikiKeyBinding.set(lookupWikiKeyBinding);
propLookupPriceKeyBinding.set(lookupPriceKeyBinding);
propLookupItemDirectly.set(lookupItemDirectly);
@@ -800,6 +814,19 @@ public class MooConfig {
return numeralSystem.startsWith("Roman");
}
+ public void cycleBestiaryOverviewOrder() {
+ String oldValue = bestiaryOverviewOrder;
+ int currentIndex = -1;
+ for (int i = 0; i < bestiaryOverviewOrderDefaultValues.length; i++) {
+ if (oldValue.equals(bestiaryOverviewOrderDefaultValues[i])) {
+ currentIndex = i;
+ break;
+ }
+ }
+ bestiaryOverviewOrder = bestiaryOverviewOrderDefaultValues[(currentIndex + 1) % bestiaryOverviewOrderDefaultValues.length];
+ syncFromFields();
+ }
+
public static boolean isTooltipToggleKeyBindingPressed() {
return tooltipToggleKeyBinding > 0 && Keyboard.isKeyDown(tooltipToggleKeyBinding);
}