diff options
author | RabbitType99 <luis.be@gmx.de> | 2021-03-13 17:10:14 +0100 |
---|---|---|
committer | RabbitType99 <luis.be@gmx.de> | 2021-03-13 17:10:14 +0100 |
commit | 440911c722b2acaa94a4d40daae3f29d81329441 (patch) | |
tree | 75d31ad4e45f43085c826d722f0df6879e95a518 /src/main/java/me | |
parent | a3f51f679364d8d97fe55f4aed3a80c61d6849b7 (diff) | |
parent | ed93b04124db9b8944ddd1ed33d0f4dabf4a486b (diff) | |
download | SkyblockMod-440911c722b2acaa94a4d40daae3f29d81329441.tar.gz SkyblockMod-440911c722b2acaa94a4d40daae3f29d81329441.tar.bz2 SkyblockMod-440911c722b2acaa94a4d40daae3f29d81329441.zip |
Merge branch 'InstallerFrame' into development_test
# Conflicts:
# src/main/java/me/Danker/commands/ToggleCommand.java
Diffstat (limited to 'src/main/java/me')
7 files changed, 133 insertions, 11 deletions
diff --git a/src/main/java/me/Danker/commands/DisplayCommand.java b/src/main/java/me/Danker/commands/DisplayCommand.java index 74f142a..7760ec9 100644 --- a/src/main/java/me/Danker/commands/DisplayCommand.java +++ b/src/main/java/me/Danker/commands/DisplayCommand.java @@ -21,7 +21,7 @@ public class DisplayCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " <zombie/spider/wolf/fishing/catacombs/mythological/auto/off> [winter/festival/spooky/session/f(1-7)]"; + return "/" + getCommandName() + " <zombie/spider/wolf/fishing/catacombs/mythological/ghost/auto/off> [winter/festival/spooky/session/f(1-7)]"; } @Override @@ -32,7 +32,7 @@ public class DisplayCommand extends CommandBase { @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "fishing", "catacombs", "mythological", "auto", "off"); + return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "fishing", "catacombs", "mythological", "ghost", "auto", "off"); } else if (args.length == 2 && args[0].equalsIgnoreCase("fishing")) { return getListOfStringsMatchingLastWord(args, "winter", "festival", "spooky", "session"); } else if (args.length == 2 && args[0].equalsIgnoreCase("catacombs")) { @@ -192,6 +192,13 @@ public class DisplayCommand extends CommandBase { return; } break; + case "ghost": + if (showSession) { + LootDisplay.display = "ghost_session"; + } else { + LootDisplay.display = "ghost"; + } + case "auto": LootDisplay.auto = true; player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Display set to " + DankersSkyblockMod.SECONDARY_COLOUR + "auto" + DankersSkyblockMod.MAIN_COLOUR + ".")); diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index e44f8ce..ebe957a 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -18,6 +18,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean goldenToggled; public static boolean slayerCountTotal; public static boolean rngesusAlerts; + public static boolean ghostDisplay; public static boolean splitFishing; public static boolean chatMaddoxToggled; public static boolean spiritBearAlerts; @@ -26,6 +27,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean shadowFuryToggled; public static boolean petColoursToggled; public static boolean dungeonTimerToggled; + public static boolean ghostTimerToggled; public static boolean golemAlertToggled; public static boolean expertiseLoreToggled; public static boolean skill50DisplayToggled; @@ -81,15 +83,14 @@ public class ToggleCommand extends CommandBase implements ICommand { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/" + - "aotd/lividdagger/shadowfury/flowerweapons/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/" + + return "/" + getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/ghostdisplay/chatmaddox/spiritbearalert/" + + "aotd/lividdagger/shadowfury/flowerweapons/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/" + //ghosttimer "skill50display/outlinetext/midasstaffmessages/implosionmessages/healmessages/cooldownmessages/" + "manamessages/killcombomessages/caketimer/lowhealthnotify/lividsolver/stopsalvagestarred/" + "notifyslayerslain/necronnotifications/bonzotimer/threemanpuzzle/oruopuzzle/blazepuzzle/" + "creeperpuzzle/waterpuzzle/tictactoepuzzle/boulderpuzzle/silverfishpuzzle/watchermessage/" + "startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/" + - "itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/ " + - "/specialhoe/melodytooltips/list>"; + "itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>"; } @Override @@ -100,9 +101,9 @@ public class ToggleCommand extends CommandBase implements ICommand { @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", + return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", "ghostdisplay", "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger", "shadowfury", - "flowerweapons", "sceptremessages", "petcolors", "dungeontimer", "golemalerts", + "flowerweapons", "sceptremessages", "petcolors", "dungeontimer", /*"ghosttimer",*/"golemalerts", "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", "implosionmessages", "healmessages", "cooldownmessages", "manamessages", "killcombomessages", "caketimer", "lowhealthnotify", "autoskilltracker", "lividsolver", @@ -152,6 +153,11 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "RNGesusAlerts", rngesusAlerts); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Slayer RNGesus alerts has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + rngesusAlerts + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "ghostDisplay": + ghostDisplay = !ghostDisplay; + ConfigHandler.writeBooleanConfig("toggles", "GhostDisplay", ghostDisplay); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Ghost Display has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + ghostDisplay + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "splitfishing": splitFishing = !splitFishing; ConfigHandler.writeBooleanConfig("toggles", "SplitFishing", splitFishing); @@ -233,6 +239,11 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "DungeonTimer", dungeonTimerToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Dungeon timer has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + dungeonTimerToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + /*case "ghostTimer": + ghostTimerToggled = !ghostTimerToggled; + ConfigHandler.writeBooleanConfig("toggles", "GhostTimer", ghostTimerToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Ghost timer has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + ghostTimerToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; */ case "golemalerts": golemAlertToggled = !golemAlertToggled; ConfigHandler.writeBooleanConfig("toggles", "GolemAlerts", golemAlertToggled); @@ -416,6 +427,7 @@ public class ToggleCommand extends CommandBase implements ICommand { DankersSkyblockMod.TYPE_COLOUR + " Heal messages: " + DankersSkyblockMod.VALUE_COLOUR + healMessages + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Ability cooldown messages: " + DankersSkyblockMod.VALUE_COLOUR + cooldownMessages + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Out of mana messages: " + DankersSkyblockMod.VALUE_COLOUR + manaMessages + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Kill combo messages: " + DankersSkyblockMod.VALUE_COLOUR + killComboMessages + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Pet colours: " + DankersSkyblockMod.VALUE_COLOUR + petColoursToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Dungeon timer: " + DankersSkyblockMod.VALUE_COLOUR + dungeonTimerToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Golem spawn alerts: " + DankersSkyblockMod.VALUE_COLOUR + golemAlertToggled + "\n" + diff --git a/src/main/java/me/Danker/features/AutoDisplay.java b/src/main/java/me/Danker/features/AutoDisplay.java index 876fb6a..182c0b4 100644 --- a/src/main/java/me/Danker/features/AutoDisplay.java +++ b/src/main/java/me/Danker/features/AutoDisplay.java @@ -37,6 +37,9 @@ public class AutoDisplay { } else if (sCleaned.contains("Revenant Horror")) { LootDisplay.display = "zombie"; found = true; + } else if (sCleaned.contains("The Mist")){ + LootDisplay.display = "ghost"; + found = true; } else if (sCleaned.contains("The Catacombs (")) { if (sCleaned.contains("F1")) { LootDisplay.display = "catacombs_floor_one"; diff --git a/src/main/java/me/Danker/features/loot/LootDisplay.java b/src/main/java/me/Danker/features/loot/LootDisplay.java index 363b70c..e3f43e8 100644 --- a/src/main/java/me/Danker/features/loot/LootDisplay.java +++ b/src/main/java/me/Danker/features/loot/LootDisplay.java @@ -892,6 +892,36 @@ public class LootDisplay { EnumChatFormatting.AQUA + Utils.getMoneySpent(LootTracker.f7CoinsSpentSession) + "\n" + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootTracker.f7TimeSpentSession); break; + case "ghost_session": + dropsText = EnumChatFormatting.GOLD + "Bags of Cash:\n" + + EnumChatFormatting.BLUE + "Sorrows:\n" + + EnumChatFormatting.DARK_PURPLE + "Ghosty Boots:\n" + + EnumChatFormatting.DARK_PURPLE + "Voltas:\n" + + EnumChatFormatting.DARK_PURPLE + "Plasmas:" ; // + \n + // EnumChatFormatting.AQUA + "Time Spent:" + + countText = EnumChatFormatting.GOLD + nf.format(LootTracker.bagOfCashSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootTracker.sorrowSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.ghostlyBootsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.voltaSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.plasmaSession); //+ "\n" + + // EnumChatFormatting.AQUA + nf.format(LootTracker.ghostsTimeSpentSession); + break; + case "ghost": + dropsText = EnumChatFormatting.GOLD + "Bags of Cash:\n" + + EnumChatFormatting.BLUE + "Sorrows:\n" + + EnumChatFormatting.DARK_PURPLE + "Ghosty Boots:\n" + + EnumChatFormatting.DARK_PURPLE + "Voltas:\n" + + EnumChatFormatting.DARK_PURPLE + "Plasmas:" ; // + \n + // EnumChatFormatting.AQUA + "Time Spent:" + + countText = EnumChatFormatting.GOLD + nf.format(LootTracker.bagOfCashSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootTracker.sorrowSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.ghostlyBootsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.voltaSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.plasmaSession); //+ "\n" + + // EnumChatFormatting.AQUA + nf.format(LootTracker.ghostsTimeSpentSession); + break; + + default: System.out.println("Display was an unknown value, turning off."); display = "off"; diff --git a/src/main/java/me/Danker/features/loot/LootTracker.java b/src/main/java/me/Danker/features/loot/LootTracker.java index f7f7044..6430bc2 100644 --- a/src/main/java/me/Danker/features/loot/LootTracker.java +++ b/src/main/java/me/Danker/features/loot/LootTracker.java @@ -176,6 +176,15 @@ public class LootTracker { public static int witherBoots; public static double f7CoinsSpent; public static double f7TimeSpent; + // Ghosts + public static int sorrows = 0; + public static int bagOfCashs = 0; + public static int voltas = 0; + public static int plasmas = 0; + public static int ghostlyBoots = 0; + // public static double ghostsTimeSpent = -1; + + // Single sessions (No config saves) // Wolf @@ -336,6 +345,14 @@ public class LootTracker { public static int witherBootsSession = 0; public static double f7CoinsSpentSession = 0; public static double f7TimeSpentSession = 0; + // Ghosts + public static int sorrowSession = 0; + public static int bagOfCashSession = 0; + public static int voltaSession = 0; + public static int plasmaSession = 0; + public static int ghostlyBootsSession = 0; + // public static double ghostsSecondsSinceStarts = 0; + static double checkItemsNow = 0; static double itemsChecked = 0; @@ -344,6 +361,7 @@ public class LootTracker { public void onChat(ClientChatReceivedEvent event) { String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + if (!Utils.inSkyblock) return; if (event.type == 2) return; if (message.contains(":")) return; @@ -352,6 +370,8 @@ public class LootTracker { boolean spiderRNG = false; boolean zombieRNG = false; + + // Slayer tracker // T6 books if (message.contains("VERY RARE DROP! (Enchanted Book)") || message.contains("CRAZY RARE DROP! (Enchanted Book)")) { @@ -369,6 +389,7 @@ public class LootTracker { zombieBooks++; ConfigHandler.writeIntConfig("zombie", "book", zombieBooks); } + } } @@ -957,6 +978,41 @@ public class LootTracker { ConfigHandler.writeIntConfig("mythological", "minosInquisitor", minosInquisitors); } } + + + if (message.contains("RARE DROP!")) { + if (message.contains("Sorrow")) { + sorrows++; + sorrowSession++; + ConfigHandler.writeIntConfig("ghosts", "sorrow", sorrows); + } + if (message.contains("Volta")) { + voltas++; + voltaSession++; + ConfigHandler.writeIntConfig("ghosts", "volta", voltas); + } + if (message.contains("Plasma")) { + plasmas++; + plasmaSession++; + ConfigHandler.writeIntConfig("ghosts", "plasma", plasmas); + } + if (message.contains("Ghostly Boots")) { + ghostlyBoots++; + ghostlyBootsSession++; + ConfigHandler.writeIntConfig("ghosts", "ghostlyBoots", ghostlyBoots); + } + if (message.contains("Bag of Cash")) { + bagOfCashs++; + bagOfCashSession++; + ConfigHandler.writeIntConfig("ghosts", "bagOfCash", bagOfCashs); + } + + + + } + + + } @SubscribeEvent diff --git a/src/main/java/me/Danker/gui/DisplayGui.java b/src/main/java/me/Danker/gui/DisplayGui.java index ceda556..f38c29e 100644 --- a/src/main/java/me/Danker/gui/DisplayGui.java +++ b/src/main/java/me/Danker/gui/DisplayGui.java @@ -33,6 +33,7 @@ public class DisplayGui extends GuiScreen { private GuiButton catacombsF5; private GuiButton catacombsF6; private GuiButton catacombsF7; + private GuiButton ghost; @Override public boolean doesGuiPauseGame() { @@ -58,7 +59,7 @@ public class DisplayGui extends GuiScreen { fishingWinter = new GuiButton(0, width / 2 - 110, (int) (height * 0.4), 100, 20, "Fishing Winter"); fishingFestival = new GuiButton(0, width / 2 + 10, (int) (height * 0.4), 100, 20, "Fishing Festival"); fishingSpooky = new GuiButton(0, width / 2 + 130, (int) (height * 0.4), 100, 20, "Fishing Spooky"); - mythological = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), 200, 20, "Mythological"); + mythological = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), 95, 20, "Mythological"); catacombsF1 = new GuiButton(0, width / 2 - 205, (int) (height * 0.65), 50, 20, "F1"); catacombsF2 = new GuiButton(0, width / 2 - 145, (int) (height * 0.65), 50, 20, "F2"); catacombsF3 = new GuiButton(0, width / 2 - 85, (int) (height * 0.65), 50, 20, "F3"); @@ -66,6 +67,7 @@ public class DisplayGui extends GuiScreen { catacombsF5 = new GuiButton(0, width / 2 + 35, (int) (height * 0.65), 50, 20, "F5"); catacombsF6 = new GuiButton(0, width / 2 + 95, (int) (height * 0.65), 50, 20, "F6"); catacombsF7 = new GuiButton(0, width / 2 + 155, (int) (height * 0.65), 50, 20, "F7"); + ghost = new GuiButton(0, width / 2 + 5, (int) (height * 0.5), 95, 20, "Ghost"); this.buttonList.add(showSession); this.buttonList.add(off); @@ -85,6 +87,7 @@ public class DisplayGui extends GuiScreen { this.buttonList.add(catacombsF5); this.buttonList.add(catacombsF6); this.buttonList.add(catacombsF7); + this.buttonList.add(ghost); this.buttonList.add(goBack); } @@ -151,7 +154,8 @@ public class DisplayGui extends GuiScreen { setDisplay("catacombs_floor_six", false); } else if (button == catacombsF7) { setDisplay("catacombs_floor_seven", false); - } + } else if (button == ghost) + setDisplay("ghost",false); } public void setDisplay(String display, boolean forceNoSession) { diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 892f231..491ae36 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -214,6 +214,8 @@ public class ConfigHandler { ToggleCommand.goldenToggled = initBoolean("toggles", "Golden", false); ToggleCommand.slayerCountTotal = initBoolean("toggles", "SlayerCount", true); ToggleCommand.rngesusAlerts = initBoolean("toggles", "RNGesusAlerts", false); + ToggleCommand.ghostDisplay = initBoolean("toggles", "GhostDisplay", true); + ToggleCommand.dungeonTimerToggled = initBoolean("toggles", "GhostTimer", false); ToggleCommand.splitFishing = initBoolean("toggles", "SplitFishing", true); ToggleCommand.chatMaddoxToggled = initBoolean("toggles", "ChatMaddox", false); ToggleCommand.spiritBearAlerts = initBoolean("toggles", "SpiritBearAlerts", false); @@ -437,7 +439,15 @@ public class ConfigHandler { LootTracker.witherBoots = initInt("catacombs", "witherBoot", 0); LootTracker.f7CoinsSpent = initDouble("catacombs", "floorSevenCoins", 0); LootTracker.f7TimeSpent = initDouble("catacombs", "floorSevenTime", 0); - + + // Ghost + LootTracker.sorrows = initInt("ghosts", "sorrow", 0); + LootTracker.voltas = initInt("ghosts", "volta", 0); + LootTracker.plasmas = initInt("ghosts", "plasma", 0); + LootTracker.ghostlyBoots = initInt("ghosts", "ghostlyBoots", 0); + LootTracker.bagOfCashs = initInt("ghosts", "bagOfCash", 0); + + // Misc LootDisplay.display = initString("misc", "display", "off"); LootDisplay.auto = initBoolean("misc", "autoDisplay", false); |