From f474643f45fd2c771d46304fdb3f4e51a8658dce Mon Sep 17 00:00:00 2001 From: Seth Date: Fri, 26 Jan 2018 16:30:23 -0600 Subject: [PATCH] Fix spelling inconsistencies/add rest of potions --- .../client/plugins/timers/GameTimer.java | 8 +- .../client/plugins/timers/TimersConfig.java | 54 +++++++++-- .../client/plugins/timers/TimersPlugin.java | 86 +++++++++++++++++- .../client/plugins/timers/antidoteplus.png | Bin 0 -> 815 bytes .../client/plugins/timers/antivenom.png | Bin 693 -> 703 bytes .../client/plugins/timers/antivenomplus.png | Bin 0 -> 693 bytes .../client/plugins/timers/exsuperantifire.png | Bin 0 -> 880 bytes .../runelite/client/plugins/timers/sanfew.png | Bin 0 -> 828 bytes 8 files changed, 134 insertions(+), 14 deletions(-) create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/timers/antidoteplus.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/timers/antivenomplus.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/timers/exsuperantifire.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/timers/sanfew.png diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java b/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java index 4006c87274..ad551e297b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java @@ -46,7 +46,7 @@ public enum GameTimer MAGICIMBUE("magicimbue", "Magic imbue", 15, ChronoUnit.SECONDS), FULLTB("teleblock", "Full Teleblock", 5, ChronoUnit.MINUTES), HALFTB("teleblock", "Half Teleblock", 150, ChronoUnit.SECONDS), - SUPERANTIVENOM("antivenom", "Anti-venom+", 3, ChronoUnit.MINUTES), + ANTIVENOMPLUS("antivenomplus", "Anti-venom+", 3, ChronoUnit.MINUTES), SUPERANTIFIRE("superantifire", "Super antifire", 2, ChronoUnit.MINUTES), ANTIDOTEPLUSPLUS("antidoteplusplus", "Antidote++", 12, ChronoUnit.MINUTES), BIND("bind", "Bind", GraphicID.BIND, 5, ChronoUnit.SECONDS), @@ -60,7 +60,11 @@ public enum GameTimer ICEBLITZ("iceblitz", "Ice blitz", GraphicID.ICE_BLITZ, 15, ChronoUnit.SECONDS), ICEBARRAGE("icebarrage", "Ice barrage", GraphicID.ICE_BARRAGE, 20, ChronoUnit.SECONDS), IMBUEDHEART("imbuedheart", "Imbued heart", GraphicID.IMBUED_HEART, 420, ChronoUnit.SECONDS), - VENGEANCE("vengeance", "Vengeance", GraphicID.VENGEANCE, 30, ChronoUnit.SECONDS); + VENGEANCE("vengeance", "Vengeance", GraphicID.VENGEANCE, 30, ChronoUnit.SECONDS), + ANTIDOTEPLUS("antidoteplus", "Antidote+", 518, ChronoUnit.SECONDS), + ANTIVENOM("antivenom", "Anto-venom", 12, ChronoUnit.MINUTES), + EXSUPERANTIFIRE("exsuperantifire", "Extended Super AntiFire", 6, ChronoUnit.MINUTES), + SANFEW("sanfew", "Sanfew serum", 6, ChronoUnit.MINUTES); @Getter private final String imageResource; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersConfig.java index 3146d4803b..fd7314dd2f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersConfig.java @@ -67,7 +67,7 @@ public interface TimersConfig extends Config @ConfigItem( keyName = "showExAntiFire", - name = "Extended Antifire timer", + name = "Extended antifire timer", description = "Configures whether extended antifire timer is displayed" ) default boolean showExAntiFire() @@ -97,7 +97,7 @@ public interface TimersConfig extends Config @ConfigItem( keyName = "showMagicImbue", - name = "Magic Imbue timer", + name = "Magic imbue timer", description = "Configures whether magic imbue timer is displayed" ) default boolean showMagicImbue() @@ -116,18 +116,18 @@ public interface TimersConfig extends Config } @ConfigItem( - keyName = "showAntiVenom", - name = "Anti Venom+ timer", + keyName = "showAntiVenomPlus", + name = "Anti-venom+ timer", description = "Configures whether anti venom+ timer is displayed" ) - default boolean showAntiVenom() + default boolean showAntiVenomPlus() { return true; } @ConfigItem( keyName = "showSuperAntiFire", - name = "Super Antifire timer", + name = "Super antifire timer", description = "Configures whether super antifire timer is displayed" ) default boolean showSuperAntiFire() @@ -147,7 +147,7 @@ public interface TimersConfig extends Config @ConfigItem( keyName = "showImbuedHeart", - name = "Imbued Heart timer", + name = "Imbued heart timer", description = "Configures whether imbued heart timer is displayed" ) default boolean showImbuedHeart() @@ -174,4 +174,44 @@ public interface TimersConfig extends Config { return true; } + + @ConfigItem( + keyName = "showExSuperAntifire", + name = "Extended super antifire timer", + description = "Configures whether extended super antifire timer is displayed" + ) + default boolean showExSuperAntifire() + { + return true; + } + + @ConfigItem( + keyName = "showSanfew", + name = "Sanfew serum timer", + description = "Configures whether sanfew serum timer is displayed" + ) + default boolean showSanfew() + { + return true; + } + + @ConfigItem( + keyName = "showAntidotePlus", + name = "Antidote+ timer", + description = "Configures whether antidote+ timer is displayed" + ) + default boolean showAntidotePlus() + { + return true; + } + + @ConfigItem( + keyName = "showAntiVenom", + name = "Anti-venom timer", + description = "Configures whether antivenom timer is displayed" + ) + default boolean showAntiVenom() + { + return true; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java index 8f4c61ec10..7644e1bf12 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java @@ -24,17 +24,21 @@ */ package net.runelite.client.plugins.timers; +import static net.runelite.client.plugins.timers.GameTimer.ANTIDOTEPLUS; import static net.runelite.client.plugins.timers.GameTimer.ANTIDOTEPLUSPLUS; import static net.runelite.client.plugins.timers.GameTimer.ANTIFIRE; +import static net.runelite.client.plugins.timers.GameTimer.ANTIVENOM; +import static net.runelite.client.plugins.timers.GameTimer.ANTIVENOMPLUS; import static net.runelite.client.plugins.timers.GameTimer.CANNON; import static net.runelite.client.plugins.timers.GameTimer.EXANTIFIRE; +import static net.runelite.client.plugins.timers.GameTimer.EXSUPERANTIFIRE; import static net.runelite.client.plugins.timers.GameTimer.FULLTB; import static net.runelite.client.plugins.timers.GameTimer.HALFTB; import static net.runelite.client.plugins.timers.GameTimer.MAGICIMBUE; import static net.runelite.client.plugins.timers.GameTimer.OVERLOAD; +import static net.runelite.client.plugins.timers.GameTimer.SANFEW; import static net.runelite.client.plugins.timers.GameTimer.STAMINA; import static net.runelite.client.plugins.timers.GameTimer.SUPERANTIFIRE; -import static net.runelite.client.plugins.timers.GameTimer.SUPERANTIVENOM; import static net.runelite.client.plugins.timers.GameTimer.BIND; import static net.runelite.client.plugins.timers.GameTimer.ENTANGLE; import static net.runelite.client.plugins.timers.GameTimer.HALFBIND; @@ -123,9 +127,9 @@ public class TimersPlugin extends Plugin removeGameTimer(MAGICIMBUE); } - if (!config.showAntiVenom()) + if (!config.showAntiVenomPlus()) { - removeGameTimer(SUPERANTIVENOM); + removeGameTimer(ANTIVENOMPLUS); } if (!config.showTeleblock()) @@ -143,6 +147,50 @@ public class TimersPlugin extends Plugin { removeGameTimer(ANTIDOTEPLUSPLUS); } + + if (!config.showAntidotePlus()) + { + removeGameTimer(ANTIDOTEPLUS); + } + + if (!config.showAntiVenom()) + { + removeGameTimer(ANTIVENOM); + } + + if (!config.showAntiVenomPlus()) + { + removeGameTimer(ANTIVENOMPLUS); + } + + if (!config.showSanfew()) + { + removeGameTimer(SANFEW); + } + + if (!config.showVengeance()) + { + removeGameTimer(VENGEANCE); + } + + if (!config.showImbuedHeart()) + { + removeGameTimer(IMBUEDHEART); + } + + if (!config.showFreezes()) + { + removeGameTimer(BIND); + removeGameTimer(HALFBIND); + removeGameTimer(SNARE); + removeGameTimer(HALFSNARE); + removeGameTimer(ENTANGLE); + removeGameTimer(HALFENTANGLE); + removeGameTimer(ICERUSH); + removeGameTimer(ICEBURST); + removeGameTimer(ICEBLITZ); + removeGameTimer(ICEBARRAGE); + } } @Subscribe @@ -157,6 +205,19 @@ public class TimersPlugin extends Plugin { // Needs menu option hook because drink message is intercepting with antipoison message createGameTimer(ANTIDOTEPLUSPLUS); + return; + } + + if (config.showAntidotePlus() + && event.getMenuOption().contains("Drink") + && (event.getId() == ItemID.ANTIDOTE1 + || event.getId() == ItemID.ANTIDOTE2 + || event.getId() == ItemID.ANTIDOTE3 + || event.getId() == ItemID.ANTIDOTE4)) + { + // Needs menu option hook because drink message is intercepting with antipoison message + createGameTimer(ANTIDOTEPLUS); + return; } } @@ -188,6 +249,11 @@ public class TimersPlugin extends Plugin createGameTimer(EXANTIFIRE); } + if (event.getMessage().equals("You drink some of your extended super antifire potion.") && config.showExSuperAntifire()) + { + createGameTimer(EXSUPERANTIFIRE); + } + if (event.getMessage().equals("Your antifire potion has expired.")) { //they have the same expired message @@ -210,9 +276,9 @@ public class TimersPlugin extends Plugin removeGameTimer(CANNON); } - if (event.getMessage().contains("You drink some of your super antivenom potion") && config.showAntiVenom()) + if (event.getMessage().contains("You drink some of your super antivenom potion") && config.showAntiVenomPlus()) { - createGameTimer(SUPERANTIVENOM); + createGameTimer(ANTIVENOMPLUS); } if (event.getMessage().equals("You are charged to combine runes!") && config.showMagicImbue()) @@ -249,6 +315,16 @@ public class TimersPlugin extends Plugin { removeGameTimer(IMBUEDHEART); } + + if (event.getMessage().contains("You drink some of your antivenom potion") && config.showAntiVenom()) + { + createGameTimer(ANTIVENOM); + } + + if (event.getMessage().contains("You drink some of your Sanfew Serum.") && config.showSanfew()) + { + createGameTimer(SANFEW); + } } @Subscribe diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/timers/antidoteplus.png b/runelite-client/src/main/resources/net/runelite/client/plugins/timers/antidoteplus.png new file mode 100644 index 0000000000000000000000000000000000000000..c8e4a89f5d9a0aaef824e206ecd0ddf917428313 GIT binary patch literal 815 zcmV+~1JL}5P)Px%=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vBSm02 zF_CfZtVYpx5WpA%5rruvi0FUn6zHvggQ`N2FP{v7h%h@lcfdMbScDb9k9VJT)Bm-B zD2@@O@qS5-UcWSt8Q-r`_d^gFu*dM3aPH*kTH1-r?|%gCS_&ox5$}i8=#9%);qhdv z+2mr(&9r;oZnatyN!SpG30$P#L`&0Bj>Vbb8E&MlD0seCv^m@0XC77)EtM%}JTCQ5 zTREv%0UHKWGcA=VjdAamoR}JEX++76GAV~OvZ73T;nbNiEdc;AIRh&1d1l^2E2>pb zeb2|V$A2iSNwgzx2~hL!*~(Ocm9R>*)>`z_1RuYw15h(=D5~Nllwy(+6JUXzVTNQo z#b&RI?;AhIJ=Xj?l9v`1OG2gjFF-cTAXd;%W2A#^bo*gJS8dv+Y2J@Mz?6$xvFL_> q5XCWGe|TFv0i6F*_0Q_Z$zOm@6o|cEf^Yx;00{s|MNUMnLSTYOu`{Fq diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/timers/antivenomplus.png b/runelite-client/src/main/resources/net/runelite/client/plugins/timers/antivenomplus.png new file mode 100644 index 0000000000000000000000000000000000000000..ded709eb2a9e4d7b19c4a0f758cf2c85140dcc4a GIT binary patch literal 693 zcmV;m0!safP)Px%Z%IT!R7l6AmOF3MP!NUBow2jtMF=RU=y(VTC{cLR4}8-UDp?-omSwtBo6>u};@stl`+vBSm02F_CfZtVYpx5WpA% z5rruvi0FUn6zHvggQ`N2FP{v7h%h@lcfdMbScDb9k9VJT)Bm-BD2@@O@qS5-UcWSt z8Q-r`_d^gFu*dM3aPH*kTH1-r?*#2y3MK{-?}yarjmuZz@noynOwmM9GdaDTg((qD*_?)R{3Y0RS;M11j%%X5K?9s#Q;Y&&RaKD6C1eBX0>% z^YGcqRDzYTO0?Em^wR_%zpMjLGj1rV;v|$}k`fbOft_K7WIM%XuZ!;+KgT`R{5z7D z78XlFrTH&FHq0Pa&`)EegKc#CVL?}I+NNpVk3PVZi(0YhhJO&nFc`1nfKC*MyPx&DoI2^R7l6AmOqGG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