aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/cowtipper/cowlection/command/MooCommand.java1
-rw-r--r--src/main/java/de/cowtipper/cowlection/config/MooConfig.java24
-rw-r--r--src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java5
-rw-r--r--src/main/resources/assets/cowlection/lang/en_US.lang2
4 files changed, 31 insertions, 1 deletions
diff --git a/src/main/java/de/cowtipper/cowlection/command/MooCommand.java b/src/main/java/de/cowtipper/cowlection/command/MooCommand.java
index 2f941c0..52dee14 100644
--- a/src/main/java/de/cowtipper/cowlection/command/MooCommand.java
+++ b/src/main/java/de/cowtipper/cowlection/command/MooCommand.java
@@ -129,6 +129,7 @@ public class MooCommand extends CommandBase {
//endregion
//region sub-commands: miscellaneous
else if (args[0].equalsIgnoreCase("config")) {
+ main.getConfig().theyOpenedTheConfigGui();
displayGuiScreen(new MooConfigGui());
} else if (args[0].equalsIgnoreCase("search")) {
displayGuiScreen(new GuiSearch(main.getConfigDirectory(), CommandBase.buildString(args, 1)));
diff --git a/src/main/java/de/cowtipper/cowlection/config/MooConfig.java b/src/main/java/de/cowtipper/cowlection/config/MooConfig.java
index d23592b..5a9750d 100644
--- a/src/main/java/de/cowtipper/cowlection/config/MooConfig.java
+++ b/src/main/java/de/cowtipper/cowlection/config/MooConfig.java
@@ -50,6 +50,7 @@ import java.util.regex.Pattern;
public class MooConfig {
// Category: General
private static String configGuiExplanations;
+ public static boolean hasOpenedConfigGui;
public static String mooCmdAlias;
public static boolean fixReplyCmd;
public static boolean enableCopyInventory;
@@ -252,6 +253,12 @@ public class MooConfig {
"configGuiExplanations", "tooltip ① §0⬛", "Display config settings explanations",
new String[]{"as tooltip ①§0⬛", "as tooltip ②§f⬛", "as text", "hidden"}));
+
+ // (not visible in config gui: has opened config? or: knows how to move the dungeon overlay?)
+ Property propHasOpenedConfigGui = cfg.get(configCat.getConfigName(),
+ "hasOpenedConfigGui", false, "Already opened config gui?")
+ .setShowInGui(false);
+
// Sub-Category: API settings
subCat = configCat.addSubCategory("API settings");
subCat.addExplanations("Some features use the official Hypixel API and therefore require your API key.",
@@ -594,6 +601,7 @@ public class MooConfig {
if (readFieldsFromConfig) {
// Category: General
configGuiExplanations = propConfigGuiExplanations.getString();
+ hasOpenedConfigGui = propHasOpenedConfigGui.getBoolean();
mooCmdAlias = propMooCmdAlias.getString();
fixReplyCmd = propFixReplyCmd.getBoolean();
enableCopyInventory = propEnableCopyInventory.getBoolean();
@@ -652,6 +660,10 @@ public class MooConfig {
dungMarkPartiesWithMage = propDungMarkPartiesWithMage.getString();
dungMarkPartiesWithTank = propDungMarkPartiesWithTank.getString();
+ if (!hasOpenedConfigGui && (!propDungOverlayEnabled.isDefault() || !propDungOverlayPositionX.isDefault() || !propDungOverlayPositionY.isDefault() || !propDungOverlayGuiScale.isDefault())) {
+ // player hasn't opened config gui yet and but already moved the dungeon overlay
+ hasOpenedConfigGui = true;
+ }
if (!StringUtils.equals(mooCmdAliasPreChange, mooCmdAlias)) {
modifiedMooCmdAlias = true;
}
@@ -665,6 +677,7 @@ public class MooConfig {
// Category: General
propConfigGuiExplanations.set(configGuiExplanations);
+ propHasOpenedConfigGui.set(hasOpenedConfigGui);
propMooCmdAlias.set(mooCmdAlias);
propFixReplyCmd.set(fixReplyCmd);
propEnableCopyInventory.set(enableCopyInventory);
@@ -816,6 +829,17 @@ public class MooConfig {
return Setting.get(configGuiExplanations);
}
+ public void theyOpenedTheConfigGui() {
+ if (!hasOpenedConfigGui) {
+ // opened config gui for the first time!
+ main.getChatHelper().sendMessage(new MooChatComponent(EnumChatFormatting.DARK_GREEN + " ❢ " + EnumChatFormatting.GREEN + "To configure " + EnumChatFormatting.GOLD + "Cowlection " + EnumChatFormatting.GREEN + "features use " + EnumChatFormatting.LIGHT_PURPLE + "/moo config").green()
+ .setSuggestCommand("/moo config")
+ .appendFreshSibling(new MooChatComponent(" (this message will be displayed only once)").gray()));
+ hasOpenedConfigGui = true;
+ syncFromFields();
+ }
+ }
+
public static boolean keepFullWailaInfo() {
return "all info".equals(wailaLevelOfDetail);
}
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 106a8c6..69c794a 100644
--- a/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java
+++ b/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java
@@ -642,6 +642,11 @@ public class DungeonsListener {
} else if (elapsedMinutes > 20) {
dungeonPerformanceEntries.add(EnumChatFormatting.GOLD + " Time penalty: " + EnumChatFormatting.RED + ((int) (2.2 * (elapsedMinutes - 20))) + " points");
}
+ if (!MooConfig.hasOpenedConfigGui) {
+ dungeonPerformanceEntries.add(EnumChatFormatting.RED + "Want to move me? " + EnumChatFormatting.LIGHT_PURPLE + "/moo config "
+ + EnumChatFormatting.DARK_GRAY + "➡ " + EnumChatFormatting.WHITE + "SB Dungeons "
+ + EnumChatFormatting.DARK_GRAY + "➡ " + EnumChatFormatting.WHITE + "Performance Overlay");
+ }
FontRenderer fontRenderer = Minecraft.getMinecraft().fontRendererObj;
GlStateManager.pushMatrix();
diff --git a/src/main/resources/assets/cowlection/lang/en_US.lang b/src/main/resources/assets/cowlection/lang/en_US.lang
index 6836fd4..d23b7f4 100644
--- a/src/main/resources/assets/cowlection/lang/en_US.lang
+++ b/src/main/resources/assets/cowlection/lang/en_US.lang
@@ -23,7 +23,7 @@ cowlection.config.gotoKeyBindings.tooltip=Some key bindings can be found in the
cowlection.config.doUpdateCheck=Check for updates
cowlection.config.doUpdateCheck.tooltip=Check for mod updates when launching the game?
cowlection.config.showBestFriendNotifications=Show best friend notifications
-cowlection.config.showBestFriendNotifications.tooltip=Set to true to receive best friends' login/logout messages, set to false hide them.
+cowlection.config.showBestFriendNotifications.tooltip=Set to true to receive best friends' login/logout messages, set to false hide them.\n§7Best friends list commands:\n ‣ §e/moo add\n ‣ §e/moo remove\n ‣ §e/moo list
cowlection.config.enableBestFriendNotificationSound=Play sound when best friend joins
cowlection.config.enableBestFriendNotificationSound.tooltip=If enabled: plays a notification sound when a best friend comes online.
cowlection.config.showFriendNotifications=Show friend notifications