diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java | 146 | ||||
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/overlays/CrystalHollowOverlay.java | 21 |
2 files changed, 124 insertions, 43 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java index 4a4d5e23..e464fd37 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java @@ -179,12 +179,12 @@ public class Mining { )
@ConfigEditorBoolean
@ConfigAccordionId(id = 6)
- public boolean crystalHollowOverlay = false;
+ public boolean crystalHollowOverlay = true;
@Expose
@ConfigOption(
name = "Position",
- desc = "Change the position of the Crystal Hollows Overlay overlay."
+ desc = "Change the position of the Crystal Hollows Overlay."
)
@ConfigEditorButton(
runnableId = 10,
@@ -195,8 +195,9 @@ public class Mining { @Expose
@ConfigOption(
- name = "Text",
- desc = "\u00a7eDrag text to change the appearance of the overlay"
+ name = "Options",
+ desc = "Drag text to change the appearance of the overlay!\n" +
+ "Click add to add extra things!"
)
@ConfigEditorDraggableList(
exampleText = {
@@ -239,7 +240,7 @@ public class Mining { @Expose
@ConfigOption(
name = "Style",
- desc = "Change the style of the Crystal Hollows Overlay overlay."
+ desc = "Change the style of the Crystal Hollows Overlay."
)
@ConfigEditorDropdown(
values = {"Background", "No Shadow", "Shadow", "Full Shadow"}
@@ -247,6 +248,34 @@ public class Mining { @ConfigAccordionId(id = 6)
public int crystalHollowOverlayStyle = 0;
+
+ @Expose
+ @ConfigOption(
+ name = "Show Icons",
+ desc = "Show icons in the overlay that represent the part."
+ )
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 6)
+ public boolean crystalHollowIcons = true;
+
+
+ @Expose
+ @ConfigOption(
+ name = "Hide Done",
+ desc = "Don't show parts you've given to the NPC."
+ )
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 6)
+ public boolean crystalHollowHideDone = false;
+
+ @ConfigOption(
+ name = "Locations",
+ desc = ""
+ )
+ @ConfigEditorAccordion(id = 7)
+ @ConfigAccordionId(id = 6)
+ public boolean crystalHollowLocationAccordion = false;
+
@Expose
@ConfigOption(
name = "Show Automaton",
@@ -255,70 +284,61 @@ public class Mining { @ConfigEditorDropdown(
values = {"Crystal Hollows", "Precursor Remnants", "Lost Precursor City"}
)
- @ConfigAccordionId(id = 6)
+ @ConfigAccordionId(id = 7)
public int crystalHollowAutomatonLocation = 2;
@Expose
@ConfigOption(
- name = "Show Automaton",
- desc = "Change where to show Automaton parts."
+ name = "Show Divan",
+ desc = "Change where to show Mines of Divan parts."
)
@ConfigEditorDropdown(
values = {"Crystal Hollows", "Mithril Deposits", "Mines of Divan"}
)
- @ConfigAccordionId(id = 6)
+ @ConfigAccordionId(id = 7)
public int crystalHollowDivanLocation = 2;
-
@Expose
@ConfigOption(
- name = "Show Icons",
- desc = "Show icons in the overlay that represent the part."
+ name = "Show Crystal",
+ desc = "Change where to show Collected Crystals."
)
- @ConfigEditorBoolean
- @ConfigAccordionId(id = 6)
- public boolean crystalHollowIcons = true;
-
-
- @Expose
- @ConfigOption(
- name = "Hide Done",
- desc = "Don't show parts you've given to the NPC."
+ @ConfigEditorDropdown(
+ values = {"Crystal Hollows", "When No Other Overlays"}
)
- @ConfigEditorBoolean
- @ConfigAccordionId(id = 6)
- public boolean crystalHollowHideDone = false;
+ @ConfigAccordionId(id = 7)
+ public int crystalHollowCrystalLocation = 1;
@ConfigOption(
name = "Colours",
desc = ""
)
- @ConfigEditorAccordion(id = 7)
+ @ConfigEditorAccordion(id = 8)
@ConfigAccordionId(id = 6)
public boolean crystalHollowColourAccordion = false;
@Expose
@ConfigOption(
- name = "Part colour",
- desc = "Change the colour of the part text."
+ name = "Main Color",
+ desc = "Change the main color of the overlay."
)
@ConfigEditorDropdown(
values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"}
)
- @ConfigAccordionId(id = 7)
+ @ConfigAccordionId(id = 8)
public int crystalHollowPartColor = 3;
@Expose
@ConfigOption(
- name = "Done colour",
+ name = "Done Color",
desc = "Change the colour when the part is given to the NPC."
)
@ConfigEditorDropdown(
values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"}
)
- @ConfigAccordionId(id = 7)
+ @ConfigAccordionId(id = 8)
public int crystalHollowDoneColor = 10;
@Expose
@@ -330,7 +350,7 @@ public class Mining { @ConfigEditorDropdown(
values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"}
)
- @ConfigAccordionId(id = 7)
+ @ConfigAccordionId(id = 8)
public int crystalHollowInventoryColor = 14;
@Expose
@@ -342,7 +362,7 @@ public class Mining { @ConfigEditorDropdown(
values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"}
)
- @ConfigAccordionId(id = 7)
+ @ConfigAccordionId(id = 8)
public int crystalHollowStorageColor = 14;
@Expose
@@ -354,11 +374,71 @@ public class Mining { @ConfigEditorDropdown(
values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"}
)
- @ConfigAccordionId(id = 7)
+ @ConfigAccordionId(id = 8)
public int crystalHollowMissingColor = 12;
@Expose
@ConfigOption(
+ name = "Placed Color",
+ desc = "Change the colour when the crystal is placed."
+
+ )
+ @ConfigEditorDropdown(
+ values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"}
+ )
+ @ConfigAccordionId(id = 8)
+ public int crystalHollowPlacedColor = 10;
+
+ @Expose
+ @ConfigOption(
+ name = "Collected Color",
+ desc = "Change the colour when the crystal is collected"
+
+ )
+ @ConfigEditorDropdown(
+ values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"}
+ )
+ @ConfigAccordionId(id = 8)
+ public int crystalHollowCollectedColor = 14;
+
+ @Expose
+ @ConfigOption(
+ name = "All Color",
+ desc = "Change the colour when you have 2/3-all of the parts collected in the count overlay."
+
+ )
+ @ConfigEditorDropdown(
+ values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"}
+ )
+ @ConfigAccordionId(id = 8)
+ public int crystalHollowAllColor = 10;
+
+ @Expose
+ @ConfigOption(
+ name = "1/3 Color",
+ desc = "Change the colour when you have 1/3-2/3 of the parts collected in the count overlay."
+
+ )
+ @ConfigEditorDropdown(
+ values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"}
+ )
+ @ConfigAccordionId(id = 8)
+ public int crystalHollowMiddleColor = 14;
+
+ @Expose
+ @ConfigOption(
+ name = "0 Color",
+ desc = "Change the colour when you have 0-1/3 of the parts collected in the count overlay."
+
+ )
+ @ConfigEditorDropdown(
+ values = {"Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"}
+ )
+ @ConfigAccordionId(id = 8)
+ public int crystalHollowNoneColor = 12;
+
+ @Expose
+ @ConfigOption(
name = "Puzzler Solver",
desc = "Show the correct block to mine for the puzzler puzzle in Dwarven Mines"
)
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/CrystalHollowOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/CrystalHollowOverlay.java index 3d65b762..f3dfa242 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/CrystalHollowOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/CrystalHollowOverlay.java @@ -81,12 +81,13 @@ public class CrystalHollowOverlay extends TextOverlay { for (String part : hidden.crystals.keySet()) { switch (hidden.crystals.get(part)) { case 2: - overlayStrings.add(EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.mining.crystalHollowPartColor] + part + ": " + - EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.mining.crystalHollowDoneColor] + "Placed"); + if (!NotEnoughUpdates.INSTANCE.config.mining.crystalHollowHideDone) + overlayStrings.add(EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.mining.crystalHollowPartColor] + part + ": " + + EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.mining.crystalHollowPlacedColor] + "Placed"); break; case 1: overlayStrings.add(EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.mining.crystalHollowPartColor] + part + ": " + - EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.mining.crystalHollowInventoryColor] + "Collected"); + EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.mining.crystalHollowCollectedColor] + "Collected"); break; case 0: overlayStrings.add(EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.mining.crystalHollowPartColor] + part + ": " + @@ -100,8 +101,8 @@ public class CrystalHollowOverlay extends TextOverlay { if (crystalCheck()) { int count = getCountCrystal(hidden.crystals); float percent = (float) count / hidden.crystals.size() * 100; - overlayStrings.add(EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.mining.crystalHollowPartColor] + "Crystals: " + getColor(percent) + count - + "/" + hidden.crystals.size()); + overlayStrings.add(EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.mining.crystalHollowPartColor] + "Crystals: " + getColor(percent) + + count + "/" + hidden.crystals.size()); } break; case 2: @@ -151,7 +152,7 @@ public class CrystalHollowOverlay extends TextOverlay { private void renderParts(HashMap<String, Boolean> parts, HashMap<String, Integer> inventoryData, HashMap<String, Integer> storageData) { for (String part : parts.keySet()) { - if (parts.get(part)) + if (parts.get(part) && !NotEnoughUpdates.INSTANCE.config.mining.crystalHollowHideDone) overlayStrings.add(EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.mining.crystalHollowPartColor] + part + ": " + EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.mining.crystalHollowDoneColor] + "Done"); else if (inventoryData.get(part) >= 1) @@ -200,11 +201,11 @@ public class CrystalHollowOverlay extends TextOverlay { private EnumChatFormatting getColor(float percent) { if (percent >= 66) - return EnumChatFormatting.GREEN; + return EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.mining.crystalHollowAllColor]; else if (percent >= 33) - return EnumChatFormatting.YELLOW; + return EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.mining.crystalHollowMiddleColor]; else - return EnumChatFormatting.RED; + return EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.mining.crystalHollowNoneColor]; } private int getCount(HashMap<String, Boolean> parts, HashMap<String, Integer> inventoryData, HashMap<String, Integer> storageData) { @@ -240,7 +241,7 @@ public class CrystalHollowOverlay extends TextOverlay { } private boolean crystalCheck() { - return true; + return NotEnoughUpdates.INSTANCE.config.mining.crystalHollowCrystalLocation == 0 || !divanCheck() && !automatonCheck(); } public void message(String message) { |