diff options
author | Cow <cow@volloeko.de> | 2021-02-01 22:30:42 +0100 |
---|---|---|
committer | Cow <cow@volloeko.de> | 2021-02-01 22:30:42 +0100 |
commit | f567357a8f625e63f8418d733604bfed0d265937 (patch) | |
tree | dac404a556c075cff90d8abbef1fb844de1632c2 /src | |
parent | 50113a57f593d0aec94d8627826d95024085345c (diff) | |
download | Cowlection-f567357a8f625e63f8418d733604bfed0d265937.tar.gz Cowlection-f567357a8f625e63f8418d733604bfed0d265937.tar.bz2 Cowlection-f567357a8f625e63f8418d733604bfed0d265937.zip |
Added new Dungeon-related config options
- Dungeon Party Finder: Parties with specific classes can now *always* be marked as 'unideal'
- Dungeon Performance Overlay: added an alternative text border option
Diffstat (limited to 'src')
6 files changed, 237 insertions, 76 deletions
diff --git a/src/main/java/de/cowtipper/cowlection/Cowlection.java b/src/main/java/de/cowtipper/cowlection/Cowlection.java index f278a1a..92a6397 100644 --- a/src/main/java/de/cowtipper/cowlection/Cowlection.java +++ b/src/main/java/de/cowtipper/cowlection/Cowlection.java @@ -64,7 +64,7 @@ public class Cowlection { friendsHandler = new FriendsHandler(this, new File(configDir, "friends.json")); moo = new CredentialStorage(new Configuration(new File(configDir, "do-not-share-me-with-other-players.cfg"))); - config = new MooConfig(this, new Configuration(new File(configDir, MODID + ".cfg"), "1")); + config = new MooConfig(this, new Configuration(new File(configDir, MODID + ".cfg"), "0.12.0")); } @EventHandler diff --git a/src/main/java/de/cowtipper/cowlection/config/MooConfig.java b/src/main/java/de/cowtipper/cowlection/config/MooConfig.java index 85b55b1..c422236 100644 --- a/src/main/java/de/cowtipper/cowlection/config/MooConfig.java +++ b/src/main/java/de/cowtipper/cowlection/config/MooConfig.java @@ -90,7 +90,7 @@ public class MooConfig { public static int dungOverlayPositionX; public static int dungOverlayPositionY; public static int dungOverlayGuiScale; - public static boolean dungOverlayTextShadow; + private static String dungOverlayTextBorder; private static String dungPartyFinderPlayerLookup; public static boolean dungPartyFullLookup; public static boolean dungPartyFinderPartyLookup; @@ -98,11 +98,11 @@ public class MooConfig { public static int dungClassMin; private static String dungMarkPartiesWithCarry; private static String dungMarkPartiesWithHyperion; - private static boolean dungFilterPartiesWithArcherDupes; - private static boolean dungFilterPartiesWithBerserkDupes; - private static boolean dungFilterPartiesWithHealerDupes; - private static boolean dungFilterPartiesWithMageDupes; - private static boolean dungFilterPartiesWithTankDupes; + private static String dungMarkPartiesWithArcher; + private static String dungMarkPartiesWithBerserk; + private static String dungMarkPartiesWithHealer; + private static String dungMarkPartiesWithMage; + private static String dungMarkPartiesWithTank; private static Configuration cfg = null; private static final List<MooConfigCategory> configCategories = new ArrayList<>(); @@ -115,14 +115,18 @@ public class MooConfig { this.main = main; cfg = configuration; - if (cfg.getLoadedConfigVersion() == null || !cfg.getLoadedConfigVersion().equals(cfg.getDefinedConfigVersion())) { - updateConfig(cfg.getLoadedConfigVersion()); + String oldLoadedConfigVersion = cfg.getLoadedConfigVersion(); + boolean configVersionChanged = oldLoadedConfigVersion == null || !oldLoadedConfigVersion.equals(cfg.getDefinedConfigVersion()); + if (configVersionChanged) { + updateConfigPreInit(oldLoadedConfigVersion); } - initConfig(); + if (configVersionChanged) { + updateConfigPostInit(oldLoadedConfigVersion); + } } - private void updateConfig(String oldVersion) { + private void updateConfigPreInit(String oldVersion) { if (oldVersion == null) { // config of Cowlection v1.8.9-0.10.2 and older @@ -146,6 +150,34 @@ public class MooConfig { } } + private void updateConfigPostInit(String oldVersion) { + if ("1".equals(oldVersion)) { + // config of Cowlection v1.8.9-0.12.0 and older + ConfigCategory sbDungCategory = cfg.getCategory("skyblockdungeons"); + if (sbDungCategory.containsKey("dungOverlayTextShadow")) { + boolean dungOverlayTextShadow = sbDungCategory.get("dungOverlayTextShadow").getBoolean(); + if (!dungOverlayTextShadow) { + sbDungCategory.get("dungOverlayTextBorder").set("no border"); + } + sbDungCategory.remove("dungOverlayTextShadow"); + } + + for (String dungClass : new String[]{"Archer", "Berserk", "Healer", "Mage", "Tank"}) { + String configKey = "dungFilterPartiesWith" + dungClass + "Dupes"; + if (sbDungCategory.containsKey(configKey)) { + boolean filterPartiesWithX = sbDungCategory.get(configKey).getBoolean(); + String configKeyNew = "dungMarkPartiesWith" + dungClass; + if (filterPartiesWithX) { + sbDungCategory.get(configKeyNew).set("if duplicated"); + } + sbDungCategory.remove(configKey); + } + } + cfg.save(); + syncFromFile(); + } + } + private void initConfig() { syncFromFile(); MinecraftForge.EVENT_BUS.register(new ConfigEventHandler()); @@ -456,8 +488,8 @@ public class MooConfig { MooConfigGui.showDungeonPerformanceOverlayUntil = System.currentTimeMillis() + 500; }); - Property propDungOverlayTextShadow = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), - "dungOverlayTextShadow", true, "Dungeon performance overlay GUI scale")); + Property propDungOverlayTextBorder = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), + "dungOverlayTextBorder", "drop shadow", "Dungeon performance overlay text border", new String[]{"drop shadow", "full outline", "no border"})); // Sub-Category: Party Finder subCat = configCat.addSubCategory("Dungeon Party Finder"); @@ -500,25 +532,25 @@ public class MooConfig { new String[]{"suitable " + EnumChatFormatting.GREEN + "⬛", "unideal " + EnumChatFormatting.GOLD + "⬛", "block " + EnumChatFormatting.RED + "⬛", "do not mark"}), new MooConfigPreview(new MooChatComponent("Marked with: " + EnumChatFormatting.AQUA + "hyper").gray())); - Property propDungFilterPartiesWithArcherDupes = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), - "dungFilterPartiesWithArcherDupes", true, "Mark parties with duplicated Archer class?"), - new MooConfigPreview(new MooChatComponent("Marked with: " + EnumChatFormatting.GOLD + "²⁺" + EnumChatFormatting.YELLOW + "A").gray())); + Property propDungMarkPartiesWithArcher = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), + "dungMarkPartiesWithArcher", "if duplicated", "Mark parties with Archer class?", new String[]{"always", "if duplicated", "do not mark"}), + new MooConfigPreview(DataHelper.DungeonClass.ARCHER)); - Property propDungFilterPartiesWithBerserkDupes = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), - "dungFilterPartiesWithBerserkDupes", false, "Mark parties with duplicated Berserk class?"), - new MooConfigPreview(new MooChatComponent("Marked with: " + EnumChatFormatting.GOLD + "²⁺" + EnumChatFormatting.YELLOW + "B").gray())); + Property propDungMarkPartiesWithBerserk = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), + "dungMarkPartiesWithBerserk", "do not mark", "Mark parties with Berserk class?", new String[]{"always", "if duplicated", "do not mark"}), + new MooConfigPreview(DataHelper.DungeonClass.BERSERK)); - Property propDungFilterPartiesWithHealerDupes = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), - "dungFilterPartiesWithHealerDupes", false, "Mark parties with duplicated Healer class?"), - new MooConfigPreview(new MooChatComponent("Marked with: " + EnumChatFormatting.GOLD + "²⁺" + EnumChatFormatting.YELLOW + "H").gray())); + Property propDungMarkPartiesWithHealer = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), + "dungMarkPartiesWithHealer", "do not mark", "Mark parties with Healer class?", new String[]{"always", "if duplicated", "do not mark"}), + new MooConfigPreview(DataHelper.DungeonClass.HEALER)); - Property propDungFilterPartiesWithMageDupes = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), - "dungFilterPartiesWithMageDupes", false, "Mark parties with duplicated Mage class?"), - new MooConfigPreview(new MooChatComponent("Marked with: " + EnumChatFormatting.GOLD + "²⁺" + EnumChatFormatting.YELLOW + "M").gray())); + Property propDungMarkPartiesWithMage = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), + "dungMarkPartiesWithMage", "do not mark", "Mark parties with Mage class?", new String[]{"always", "if duplicated", "do not mark"}), + new MooConfigPreview(DataHelper.DungeonClass.MAGE)); - Property propDungFilterPartiesWithTankDupes = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), - "dungFilterPartiesWithTankDupes", false, "Mark parties with duplicated Tank class?"), - new MooConfigPreview(new MooChatComponent("Marked with: " + EnumChatFormatting.GOLD + "²⁺" + EnumChatFormatting.YELLOW + "T").gray())); + Property propDungMarkPartiesWithTank = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), + "dungMarkPartiesWithTank", "do not mark", "Mark parties with Tank class?", new String[]{"always", "if duplicated", "do not mark"}), + new MooConfigPreview(DataHelper.DungeonClass.TANK)); boolean modifiedMooCmdAlias = false; String mooCmdAliasPreChange = mooCmdAlias; @@ -566,7 +598,7 @@ public class MooConfig { dungOverlayPositionX = propDungOverlayPositionX.getInt(); dungOverlayPositionY = propDungOverlayPositionY.getInt(); dungOverlayGuiScale = propDungOverlayGuiScale.getInt(); - dungOverlayTextShadow = propDungOverlayTextShadow.getBoolean(); + dungOverlayTextBorder = propDungOverlayTextBorder.getString(); dungPartyFinderPlayerLookup = propDungPartyFinderPlayerLookup.getString(); dungPartyFullLookup = propDungPartyFullLookup.getBoolean(); dungPartyFinderPartyLookup = propDungPartyFinderPartyLookup.getBoolean(); @@ -574,11 +606,11 @@ public class MooConfig { dungClassMin = propDungClassMin.getInt(); dungMarkPartiesWithCarry = propDungMarkPartiesWithCarry.getString(); dungMarkPartiesWithHyperion = propDungMarkPartiesWithHyperion.getString(); - dungFilterPartiesWithArcherDupes = propDungFilterPartiesWithArcherDupes.getBoolean(); - dungFilterPartiesWithBerserkDupes = propDungFilterPartiesWithBerserkDupes.getBoolean(); - dungFilterPartiesWithHealerDupes = propDungFilterPartiesWithHealerDupes.getBoolean(); - dungFilterPartiesWithMageDupes = propDungFilterPartiesWithMageDupes.getBoolean(); - dungFilterPartiesWithTankDupes = propDungFilterPartiesWithTankDupes.getBoolean(); + dungMarkPartiesWithArcher = propDungMarkPartiesWithArcher.getString(); + dungMarkPartiesWithBerserk = propDungMarkPartiesWithBerserk.getString(); + dungMarkPartiesWithHealer = propDungMarkPartiesWithHealer.getString(); + dungMarkPartiesWithMage = propDungMarkPartiesWithMage.getString(); + dungMarkPartiesWithTank = propDungMarkPartiesWithTank.getString(); if (!StringUtils.equals(mooCmdAliasPreChange, mooCmdAlias)) { @@ -630,7 +662,7 @@ public class MooConfig { propDungOverlayPositionX.set(dungOverlayPositionX); propDungOverlayPositionY.set(dungOverlayPositionY); propDungOverlayGuiScale.set(dungOverlayGuiScale); - propDungOverlayTextShadow.set(dungOverlayTextShadow); + propDungOverlayTextBorder.set(dungOverlayTextBorder); propDungPartyFinderPlayerLookup.set(dungPartyFinderPlayerLookup); propDungPartyFullLookup.set(dungPartyFullLookup); propDungPartyFinderPartyLookup.set(dungPartyFinderPartyLookup); @@ -638,11 +670,11 @@ public class MooConfig { propDungClassMin.set(dungClassMin); propDungMarkPartiesWithCarry.set(dungMarkPartiesWithCarry); propDungMarkPartiesWithHyperion.set(dungMarkPartiesWithHyperion); - propDungFilterPartiesWithArcherDupes.set(dungFilterPartiesWithArcherDupes); - propDungFilterPartiesWithBerserkDupes.set(dungFilterPartiesWithBerserkDupes); - propDungFilterPartiesWithHealerDupes.set(dungFilterPartiesWithHealerDupes); - propDungFilterPartiesWithMageDupes.set(dungFilterPartiesWithMageDupes); - propDungFilterPartiesWithTankDupes.set(dungFilterPartiesWithTankDupes); + propDungMarkPartiesWithArcher.set(dungMarkPartiesWithArcher); + propDungMarkPartiesWithBerserk.set(dungMarkPartiesWithBerserk); + propDungMarkPartiesWithHealer.set(dungMarkPartiesWithHealer); + propDungMarkPartiesWithMage.set(dungMarkPartiesWithMage); + propDungMarkPartiesWithTank.set(dungMarkPartiesWithTank); if (saveToFile && cfg.hasChanged()) { boolean isPlayerIngame = Minecraft.getMinecraft().thePlayer != null; @@ -793,6 +825,18 @@ public class MooConfig { return dungItemToolTipToggleKeyBinding > 0 && Keyboard.isKeyDown(dungItemToolTipToggleKeyBinding); } + public static Setting getDungOverlayTextBorder() { + switch (dungOverlayTextBorder) { + case "drop shadow": + return Setting.TEXT; + case "full outline": + return Setting.ALWAYS; + default: + // everything else: "no border" + return Setting.DISABLED; + } + } + public static Setting getDungPartyFinderPlayerLookupDisplay() { return Setting.get(dungPartyFinderPlayerLookup); } @@ -819,20 +863,35 @@ public class MooConfig { } } - public static boolean filterDungPartiesWithDupes(DataHelper.DungeonClass dungeonClass) { + public static Setting filterDungPartiesWithDupes(DataHelper.DungeonClass dungeonClass) { + String setting; switch (dungeonClass) { case ARCHER: - return dungFilterPartiesWithArcherDupes; + setting = dungMarkPartiesWithArcher; + break; case BERSERK: - return dungFilterPartiesWithBerserkDupes; + setting = dungMarkPartiesWithBerserk; + break; case HEALER: - return dungFilterPartiesWithHealerDupes; + setting = dungMarkPartiesWithHealer; + break; case MAGE: - return dungFilterPartiesWithMageDupes; + setting = dungMarkPartiesWithMage; + break; case TANK: - return dungFilterPartiesWithTankDupes; + setting = dungMarkPartiesWithTank; + break; default: - return false; + setting = "do not mark"; + break; + } + switch (setting) { + case "always": + return Setting.ALWAYS; + case "if duplicated": + return Setting.SPECIAL; + default: // do not mark + return Setting.DISABLED; } } diff --git a/src/main/java/de/cowtipper/cowlection/config/gui/MooConfigCategoryScrolling.java b/src/main/java/de/cowtipper/cowlection/config/gui/MooConfigCategoryScrolling.java index 4ffa9f0..7e8f3eb 100644 --- a/src/main/java/de/cowtipper/cowlection/config/gui/MooConfigCategoryScrolling.java +++ b/src/main/java/de/cowtipper/cowlection/config/gui/MooConfigCategoryScrolling.java @@ -134,7 +134,12 @@ public class MooConfigCategoryScrolling extends GuiListExtended { EnumChatFormatting.GOLD + "Press Done to save changes. " + EnumChatFormatting.RED + "Requires a game restart to take effect!")))); continue; } else if (configEntry.getValidValues() != null && configEntry.getValidValues().length > 0) { - this.listEntries.add(new CycleConfigEntry(configEntry)); + if ("dungOverlayTextBorder".equals(configEntry.getName())) { + // special case: Dung Performance Overlay: show preview on button click + this.listEntries.add(new DungCycleConfigEntry(configEntry)); + } else { + this.listEntries.add(new CycleConfigEntry(configEntry)); + } continue; } } @@ -671,6 +676,18 @@ public class MooConfigCategoryScrolling extends GuiListExtended { } } + private class DungCycleConfigEntry extends CycleConfigEntry { + private DungCycleConfigEntry(Property property) { + super(property); + } + + @Override + protected void changeConfigEntryButtonPressed() { + super.changeConfigEntryButtonPressed(); + MooConfigGui.showDungeonPerformanceOverlayUntil = System.currentTimeMillis() + 3000; + } + } + private class CycleConfigEntry extends ButtonConfigEntry { protected final int beforeIndex; protected final int defaultIndex; diff --git a/src/main/java/de/cowtipper/cowlection/config/gui/MooConfigPreview.java b/src/main/java/de/cowtipper/cowlection/config/gui/MooConfigPreview.java index 32fb6d9..675c392 100644 --- a/src/main/java/de/cowtipper/cowlection/config/gui/MooConfigPreview.java +++ b/src/main/java/de/cowtipper/cowlection/config/gui/MooConfigPreview.java @@ -1,5 +1,7 @@ package de.cowtipper.cowlection.config.gui; +import de.cowtipper.cowlection.config.MooConfig; +import de.cowtipper.cowlection.data.DataHelper; import de.cowtipper.cowlection.util.MooChatComponent; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; @@ -40,6 +42,11 @@ public class MooConfigPreview { this.items = items; } + public MooConfigPreview(PreviewChatRunnable previewRunnable) { + this.type = Type.RUNNABLE; + this.previewRunnable = previewRunnable; + } + public MooConfigPreview(String sound, float volume, float pitch) { this.type = Type.RUNNABLE_ON_HOVER; previewRunnable = () -> { @@ -49,6 +56,26 @@ public class MooConfigPreview { }; } + public MooConfigPreview(DataHelper.DungeonClass dungeonClass) { + this(new MooConfigPreview.PreviewChatRunnable() { + @Override + public IChatComponent getText() { + String markWith; + switch (MooConfig.filterDungPartiesWithDupes(dungeonClass)) { + case ALWAYS: + markWith = "" + EnumChatFormatting.WHITE + dungeonClass.getShortName(); + break; + case SPECIAL: + markWith = EnumChatFormatting.GOLD + "²⁺" + EnumChatFormatting.YELLOW + dungeonClass.getShortName(); + break; + default: // disabled/"do not mark": + markWith = "" + EnumChatFormatting.DARK_GRAY + EnumChatFormatting.ITALIC + "not marked"; + } + return new MooChatComponent("Marked with: " + markWith).gray(); + } + }); + } + public void drawPreview(int x, int y, int mouseX, int mouseY, boolean enablePreview) { switch (type) { case ITEM: @@ -57,8 +84,11 @@ public class MooConfigPreview { case CHAT: drawChatPreview(x, y, mouseX, mouseY, enablePreview); break; + case RUNNABLE: + drawButtonWithRunnablePreview(x, y, mouseX, mouseY, false); + break; case RUNNABLE_ON_HOVER: - drawButtonWithRunnablePreview(x, y, mouseX, mouseY, enablePreview); + drawButtonWithRunnablePreview(x, y, mouseX, mouseY, true); break; default: // do nothing @@ -187,22 +217,48 @@ public class MooConfigPreview { return new MooChatComponent(name).darkGreen().setHover(new MooChatComponent(gameMode).yellow().appendFreshSibling(new MooChatComponent("Online for " + onlineTime).white())); } - private void drawButtonWithRunnablePreview(int x, int y, int mouseX, int mouseY, boolean enablePreview) { + private void drawButtonWithRunnablePreview(int x, int y, int mouseX, int mouseY, boolean checkHover) { FontRenderer fontRenderer = Minecraft.getMinecraft().fontRendererObj; int currentX = x + 15; int chatY = y + 20 / 2 - fontRenderer.FONT_HEIGHT / 2; - String previewText = "(hover me to preview)"; - fontRenderer.drawStringWithShadow(previewText, currentX, chatY, 0xffffffff); - if (nextPreviewAt < Minecraft.getSystemTime() - && mouseY >= chatY && mouseY <= chatY + fontRenderer.FONT_HEIGHT - && mouseX > currentX && mouseX < currentX + fontRenderer.getStringWidth(previewText)) { - nextPreviewAt = Minecraft.getSystemTime() + 3000; + if (previewRunnable instanceof PreviewChatRunnable) { + ((PreviewChatRunnable) previewRunnable).setPos(x, y); previewRunnable.run(); + } else { + String previewText = "(hover me to preview)"; + fontRenderer.drawStringWithShadow(previewText, currentX, chatY, 0xffffffff); + if (checkHover && nextPreviewAt < Minecraft.getSystemTime() + && mouseY >= chatY && mouseY <= chatY + fontRenderer.FONT_HEIGHT + && mouseX > currentX && mouseX < currentX + fontRenderer.getStringWidth(previewText)) { + nextPreviewAt = Minecraft.getSystemTime() + 3000; + previewRunnable.run(); + } + } + } + + public abstract static class PreviewChatRunnable implements Runnable { + private int x; + private int y; + + public void setPos(int x, int y) { + this.x = x; + this.y = y; + } + + public abstract IChatComponent getText(); + + @Override + public void run() { + FontRenderer fontRenderer = Minecraft.getMinecraft().fontRendererObj; + int currentX = x + 15; + int chatY = y + 20 / 2 - fontRenderer.FONT_HEIGHT / 2; + + fontRenderer.drawStringWithShadow(getText().getFormattedText(), currentX, chatY, 0xffffffff); } } private enum Type { - CHAT, ITEM, RUNNABLE_ON_HOVER + CHAT, ITEM, RUNNABLE, RUNNABLE_ON_HOVER } } diff --git a/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java b/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java index 63927c6..deb4385 100644 --- a/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java +++ b/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java @@ -359,22 +359,40 @@ public class DungeonsListener { font.drawStringWithShadow(EnumChatFormatting.BOLD + "ᐯ", x + 1, y + 8, new Color(220, 20, 20, 255).getRGB()); GlStateManager.popMatrix(); } + StringBuilder unwantedClasses = new StringBuilder(); StringBuilder dupedClasses = new StringBuilder(); for (Map.Entry<DungeonClass, AtomicInteger> partyClassInfo : dungClassesInParty.entrySet()) { - if (partyClassInfo.getValue().get() > 1 && MooConfig.filterDungPartiesWithDupes(partyClassInfo.getKey())) { - dupedClasses.append(partyClassInfo.getKey().getShortName()); + switch (MooConfig.filterDungPartiesWithDupes(partyClassInfo.getKey())) { + case ALWAYS: + unwantedClasses.append(partyClassInfo.getKey().getShortName()); + break; + case SPECIAL: + if (partyClassInfo.getValue().get() > 1) { + // 2+ class + dupedClasses.append(partyClassInfo.getKey().getShortName()); + } + break; + default: // DISABLED + // do nothing } } + StringBuilder badClasses = new StringBuilder(); + if (unwantedClasses.length() > 0) { + badClasses.append(EnumChatFormatting.WHITE).append(unwantedClasses); + } if (dupedClasses.length() > 0) { - // party has class duplicates + badClasses.append(EnumChatFormatting.GOLD).append("²⁺").append(EnumChatFormatting.YELLOW).append(dupedClasses); // 2+ + } + + if (badClasses.length() > 0) { + // party has unwanted classes or class duplicates partyType = DataHelper.PartyType.UNIDEAL; - dupedClasses.insert(0, EnumChatFormatting.YELLOW).insert(0, "²⁺"); // 2+ GlStateManager.pushMatrix(); GlStateManager.translate(0, 0, 280); double scaleFactor = 0.8; GlStateManager.scale(scaleFactor, scaleFactor, 0); - font.drawStringWithShadow(dupedClasses.toString(), (float) (x / scaleFactor), (float) (y / scaleFactor), new Color(255, 170, 0, 255).getRGB()); + font.drawStringWithShadow(badClasses.toString(), (float) (x / scaleFactor), (float) (y / scaleFactor), new Color(255, 170, 0, 255).getRGB()); GlStateManager.popMatrix(); } else if (!memberTooLowLevel && middleText == null) { // party matches our criteria! @@ -624,9 +642,20 @@ public class DungeonsListener { String dungeonPerformanceEntry = dungeonPerformanceEntries.get(line); int xPos = (int) ((e.resolution.getScaledWidth() * (MooConfig.dungOverlayPositionX / 1000d)) / scaleFactor); int yPos = (int) ((e.resolution.getScaledHeight() * (MooConfig.dungOverlayPositionY / 1000d) + 2) / scaleFactor + fontRenderer.FONT_HEIGHT * line + 2); - if (MooConfig.dungOverlayTextShadow) { + MooConfig.Setting dungOverlayTextBorder = MooConfig.getDungOverlayTextBorder(); + if (dungOverlayTextBorder == MooConfig.Setting.TEXT) { + // normal mc text shadow (drop shadow) fontRenderer.drawStringWithShadow(dungeonPerformanceEntry, xPos, yPos, 0xffFFAA00); + } else if (dungOverlayTextBorder == MooConfig.Setting.ALWAYS) { + // full outline + String dungeonPerformanceEntryShadow = EnumChatFormatting.getTextWithoutFormattingCodes(dungeonPerformanceEntry); + fontRenderer.drawString(dungeonPerformanceEntryShadow, xPos + 1, yPos, 0xff3F2A00); + fontRenderer.drawString(dungeonPerformanceEntryShadow, xPos - 1, yPos, 0xff3F2A00); + fontRenderer.drawString(dungeonPerformanceEntryShadow, xPos, yPos + 1, 0xff3F2A00); + fontRenderer.drawString(dungeonPerformanceEntryShadow, xPos, yPos - 1, 0xff3F2A00); + fontRenderer.drawString(dungeonPerformanceEntry, xPos, yPos, 0xffFFAA00); } else { + // no border, just plain text fontRenderer.drawString(dungeonPerformanceEntry, xPos, yPos, 0xffFFAA00); } } diff --git a/src/main/resources/assets/cowlection/lang/en_US.lang b/src/main/resources/assets/cowlection/lang/en_US.lang index ede0dda..bcb84d7 100644 --- a/src/main/resources/assets/cowlection/lang/en_US.lang +++ b/src/main/resources/assets/cowlection/lang/en_US.lang @@ -29,7 +29,7 @@ cowlection.config.showFriendNotifications.tooltip=Set to true to receive friends cowlection.config.showGuildNotifications=Show guild notifications cowlection.config.showGuildNotifications.tooltip=Set to true to receive guild members' login/logout messages, set to false hide them. cowlection.config.doBestFriendsOnlineCheck=Do best friends online check §d§l⚷ -cowlection.config.doBestFriendsOnlineCheck.tooltip=Set to true to check best friends' online status when joining a server, set to false to disable.\n§fDoes §dnot §fwork for staff members and players hiding their online status.\n§d§l⚷ §eRequires a valid API key! +cowlection.config.doBestFriendsOnlineCheck.tooltip=Set to true to check best friends' online status when joining a server, set to false to disable.\n§fDoes §dnot §fwork for staff members and players hiding their online status.\n§aHover over a player name to see their current gamemode.\n§d§l⚷ §eRequires a valid API key! cowlection.config.enableSkyBlockOnlyFeatures=Enable SkyBlock-only features cowlection.config.enableSkyBlockOnlyFeatures.tooltip=§6When should SkyBlock-only features be active?\n§7§o(relog or change worlds after changing this option)\n §d➊ §fonly while being on SkyBlock §e(= disabled on other servers and in other gamemodes\n §d➋ §falways §e(= including other servers and gamemodes)\n §d➌ §fnever §e(§cNone §eof the SkyBlock-only features will work!) cowlection.config.notifyFreshServer=Notify when world is loaded <X days @@ -78,8 +78,8 @@ cowlection.config.dungOverlayPositionY=Overlay y position (⇦/⇨ keys to fine- cowlection.config.dungOverlayPositionY.tooltip=Use left and right arrow key to increment/decrement the y position by 1 cowlection.config.dungOverlayGuiScale=Overlay Gui Scale cowlection.config.dungOverlayGuiScale.tooltip=Adjust the size of the dungeon performance overlay (50%%-200%%) -cowlection.config.dungOverlayTextShadow=Add text shadow -cowlection.config.dungOverlayTextShadow.tooltip=Enable or disable text shadow +cowlection.config.dungOverlayTextBorder=Text border/shadow +cowlection.config.dungOverlayTextBorder.tooltip=Change or disable text border/shadow cowlection.config.dungPartyFinderPlayerLookup=Show info of joining players §d§l⚷ cowlection.config.dungPartyFinderPlayerLookup.tooltip=Show armor and dungeons stats of player joining via party finder as a tooltip or in chat?\n§d§l⚷ §eRequires a valid API key! cowlection.config.dungPartyFullLookup=Lookup info when party full? §d§l⚷ @@ -94,16 +94,16 @@ cowlection.config.dungMarkPartiesWithCarry=Mark 'carry' parties? cowlection.config.dungMarkPartiesWithCarry.tooltip=Mark parties that have 'carry' in their notes? cowlection.config.dungMarkPartiesWithHyperion=Mark 'hyperion' parties? cowlection.config.dungMarkPartiesWithHyperion.tooltip=Mark parties that have 'hyperion' in their notes? -cowlection.config.dungFilterPartiesWithArcherDupes=Mark duplicated Archer class? -cowlection.config.dungFilterPartiesWithArcherDupes.tooltip=Mark parties with duplicated Archer class? -cowlection.config.dungFilterPartiesWithBerserkDupes=Mark duplicated Berserk class? -cowlection.config.dungFilterPartiesWithBerserkDupes.tooltip=Mark parties with duplicated Berserk class? -cowlection.config.dungFilterPartiesWithHealerDupes=Mark duplicated Healer class? -cowlection.config.dungFilterPartiesWithHealerDupes.tooltip=Mark parties with duplicated Healer class? -cowlection.config.dungFilterPartiesWithMageDupes=Mark duplicated Mage class? -cowlection.config.dungFilterPartiesWithMageDupes.tooltip=Mark parties with duplicated Mage class? -cowlection.config.dungFilterPartiesWithTankDupes=Mark duplicated Tank class? -cowlection.config.dungFilterPartiesWithTankDupes.tooltip=Mark parties with duplicated Tank class? +cowlection.config.dungMarkPartiesWithArcher=Mark parties with Archer class as unideal? +cowlection.config.dungMarkPartiesWithArcher.tooltip=Mark parties with Archer class as unideal (orange background)? +cowlection.config.dungMarkPartiesWithBerserk=Mark parties with Berserk class as unideal? +cowlection.config.dungMarkPartiesWithBerserk.tooltip=Mark parties with Berserk class as unideal (orange background)? +cowlection.config.dungMarkPartiesWithHealer=Mark parties with Healer class as unideal? +cowlection.config.dungMarkPartiesWithHealer.tooltip=Mark parties with Healer class as unideal (orange background)? +cowlection.config.dungMarkPartiesWithMage=Mark parties with Mage class as unideal? +cowlection.config.dungMarkPartiesWithMage.tooltip=Mark parties with Mage class as unideal (orange background)? +cowlection.config.dungMarkPartiesWithTank=Mark parties with Tank class as unideal? +cowlection.config.dungMarkPartiesWithTank.tooltip=Mark parties with Tank class as unideal (orange background)? cowlection.commands.generic.exception=%s key.cowlection.category=Cowlection key.cowlection.moo=Open Command |