aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCow <cow@volloeko.de>2023-07-16 13:12:29 +0200
committerCow <cow@volloeko.de>2023-07-16 13:12:29 +0200
commit927da68630bb651dd39294cd88e79557fae6bfc6 (patch)
tree761a54115e80fffb691342363d10ede9d189befe
parent24c9e641a1dc0c109d94504ef707a10171b837c4 (diff)
downloadCowlection-927da68630bb651dd39294cd88e79557fae6bfc6.tar.gz
Cowlection-927da68630bb651dd39294cd88e79557fae6bfc6.tar.bz2
Cowlection-927da68630bb651dd39294cd88e79557fae6bfc6.zip
Changed dungeons overlay to be disabled by default
Other mods track and display the info much more accurately.
-rw-r--r--CHANGELOG.md3
-rw-r--r--src/main/java/de/cowtipper/cowlection/command/MooCommand.java6
-rw-r--r--src/main/java/de/cowtipper/cowlection/config/MooConfig.java6
-rw-r--r--src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java8
-rw-r--r--src/main/java/de/cowtipper/cowlection/util/MooChatComponent.java4
5 files changed, 18 insertions, 9 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 65dab68..02d543c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [1.8.9-0.16.0] - unreleased
+### Changed
+- Dungeons overlay: now disabled by default (old config entries aren't modified)
+
### Fixed
- Pet exp in tooltips: fixed rare crash caused by unexpected NBT data typing
- Bazaar: fixed "Show items left to buy/sell" not working anymore
diff --git a/src/main/java/de/cowtipper/cowlection/command/MooCommand.java b/src/main/java/de/cowtipper/cowlection/command/MooCommand.java
index 13db747..6debc4e 100644
--- a/src/main/java/de/cowtipper/cowlection/command/MooCommand.java
+++ b/src/main/java/de/cowtipper/cowlection/command/MooCommand.java
@@ -1062,9 +1062,13 @@ public class MooCommand extends CommandBase {
}
private void sendCommandUsage(ICommandSender sender) {
+ IChatComponent dungeonOverlayHint = MooConfig.dungOverlayEnabled
+ ? new MooChatComponent("\n").reset().white().appendText(EnumChatFormatting.DARK_GREEN + " ❢" + EnumChatFormatting.LIGHT_PURPLE + EnumChatFormatting.ITALIC + " To move the Dungeons overlay: " + EnumChatFormatting.WHITE + "/" + getCommandName() + " config " + EnumChatFormatting.GRAY + "➡ " + EnumChatFormatting.WHITE + "SB Dungeons " + EnumChatFormatting.GRAY + "➡ " + EnumChatFormatting.WHITE + "Dungeon Performance Overlay")
+ : null;
+
IChatComponent usage = new MooChatComponent("➜ " + Cowlection.MODNAME + " commands:").gold().bold()
.appendSibling(createCmdHelpEntry("config", "Open mod's configuration"))
- .appendSibling(new MooChatComponent("\n").reset().white().appendText(EnumChatFormatting.DARK_GREEN + " ❢" + EnumChatFormatting.LIGHT_PURPLE + EnumChatFormatting.ITALIC + " To move the Dungeons overlay: " + EnumChatFormatting.WHITE + "/" + getCommandName() + " config " + EnumChatFormatting.GRAY + "➡ " + EnumChatFormatting.WHITE + "SB Dungeons " + EnumChatFormatting.GRAY + "➡ " + EnumChatFormatting.WHITE + "Dungeon Performance Overlay"))
+ .appendSibling(dungeonOverlayHint)
.appendSibling(new MooChatComponent("\n").reset().gray().appendText(EnumChatFormatting.DARK_GREEN + " ❢" + EnumChatFormatting.GRAY + EnumChatFormatting.ITALIC + " Commands marked with §d§l⚷" + EnumChatFormatting.GRAY + EnumChatFormatting.ITALIC + " require a valid API key"))
.appendSibling(createCmdHelpSection(1, "Best friends, friends & other players"))
.appendSibling(createCmdHelpEntry("stalk", "Get info of player's status §d§l⚷"))
diff --git a/src/main/java/de/cowtipper/cowlection/config/MooConfig.java b/src/main/java/de/cowtipper/cowlection/config/MooConfig.java
index 87f6330..92632f3 100644
--- a/src/main/java/de/cowtipper/cowlection/config/MooConfig.java
+++ b/src/main/java/de/cowtipper/cowlection/config/MooConfig.java
@@ -614,13 +614,13 @@ public class MooConfig {
"Does " + EnumChatFormatting.ITALIC + "not" + EnumChatFormatting.RESET + " track explorer score " + EnumChatFormatting.GRAY + "(explored rooms, secrets, ...)");
Property propDungSendPerformanceOnDeath = subCat.addConfigEntry(cfg.get(configCat.getConfigName(),
- "dungSendPerformanceOnDeath", true, "Send dungeon performance after a player died?"));
+ "dungSendPerformanceOnDeath", false, "Send dungeon performance after a player died?"));
Property propDungSendPerformanceOnEndScreen = subCat.addConfigEntry(cfg.get(configCat.getConfigName(),
- "dungSendPerformanceOnEndScreen", true, "Send dungeon performance on end screen?"));
+ "dungSendPerformanceOnEndScreen", false, "Send dungeon performance on end screen?"));
Property propDungOverlayEnabled = subCat.addConfigEntry(cfg.get(configCat.getConfigName(),
- "dungOverlayEnabled", true, "Enable Dungeon performance overlay?"));
+ "dungOverlayEnabled", false, "Enable Dungeon performance overlay?"));
Property propDungOverlayPositionX = subCat.addConfigEntry(cfg.get(configCat.getConfigName(),
"dungOverlayPositionX", 6, "Dungeon performance overlay position: x value", 0, 1000),
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 74cd137..f2c653c 100644
--- a/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java
+++ b/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java
@@ -692,12 +692,12 @@ public class DungeonsListener {
if (e.type == RenderGameOverlayEvent.ElementType.ALL) {
DungeonCache dungeonCache = main.getDungeonCache();
- if (dungeonCache.isInDungeon()) {
- dungeonCache.fetchScoreboardData();
- }
-
boolean isEditingDungeonOverlaySettings = MooConfigGui.showDungeonPerformanceOverlay();
if (MooConfig.dungOverlayEnabled && dungeonCache.isInDungeon() || isEditingDungeonOverlaySettings) {
+ if (dungeonCache.isInDungeon()) {
+ dungeonCache.fetchScoreboardData();
+ }
+
ArrayList<String> dungeonPerformanceEntries = new ArrayList<>();
int maxSkillScore = dungeonCache.getMaxSkillScore();
int totalDeaths = dungeonCache.getTotalDeaths();
diff --git a/src/main/java/de/cowtipper/cowlection/util/MooChatComponent.java b/src/main/java/de/cowtipper/cowlection/util/MooChatComponent.java
index 5500345..56b57fe 100644
--- a/src/main/java/de/cowtipper/cowlection/util/MooChatComponent.java
+++ b/src/main/java/de/cowtipper/cowlection/util/MooChatComponent.java
@@ -164,7 +164,9 @@ public class MooChatComponent extends ChatComponentText {
@Override
public MooChatComponent appendSibling(IChatComponent component) {
- super.appendSibling(component);
+ if (component != null) {
+ super.appendSibling(component);
+ }
return this;
}