Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Quiver Display #1190

Merged
merged 51 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
cea67a7
use quiver item for quiverapi
ItsEmpa Mar 15, 2024
9cc2852
added quiver display and removed unnecessary imports
ItsEmpa Mar 16, 2024
8cd9257
merge beta
ItsEmpa Mar 16, 2024
e49951a
formatting
ItsEmpa Mar 16, 2024
c728f5c
fixed rendering while in inventory
ItsEmpa Mar 16, 2024
db0e889
added/edited some patterns
ItsEmpa Mar 16, 2024
7ade58a
quiver update event, only show type of arrow when wearing skeleton ma…
ItsEmpa Mar 16, 2024
63b35d8
Merge branch 'beta' into quiver-api
ItsEmpa Mar 16, 2024
fddc845
remove sound distance and cleanup
ItsEmpa Mar 16, 2024
937dedb
updated regex and added new config option
ItsEmpa Mar 17, 2024
8857ba8
only check bow in inventory every 2s
ItsEmpa Mar 17, 2024
ea14fc2
formatting issue when no arrow selected
ItsEmpa Mar 17, 2024
ee87832
alert when low arrors at end of dungeon
ItsEmpa Mar 17, 2024
8c5f8dd
innit
ItsEmpa Mar 18, 2024
835123e
Merge branch 'kuudraapi' into quiver-api
ItsEmpa Mar 18, 2024
8ac0f5b
fix not compiling
ItsEmpa Mar 18, 2024
4652eae
oops
ItsEmpa Mar 18, 2024
b3a4747
Merge branch 'kuudraapi' into quiver-api
ItsEmpa Mar 18, 2024
ee14078
fix display not getting updated on profile join
ItsEmpa Mar 18, 2024
84374c6
refactored quiver notification into quiver display and added config m…
ItsEmpa Mar 18, 2024
e82d49d
removed todo thing
ItsEmpa Mar 18, 2024
988a2b1
Merge branch 'beta' into quiver-api
ItsEmpa Mar 21, 2024
176eae0
Merge branch 'beta' into quiver-api
ItsEmpa Mar 23, 2024
0a1a0f4
couple fixes and new config name/descriptions
ItsEmpa Mar 23, 2024
30ce110
switch from floats to ints
ItsEmpa Mar 23, 2024
d038e0c
cleanup
ItsEmpa Mar 24, 2024
871ea81
Merge branch 'kuudraapi' into quiver-api
ItsEmpa Mar 24, 2024
77c64f3
remove other empty line and fit rest of code
CalMWolfs Mar 24, 2024
a8fb6ae
Merge branch 'kuudraapi' into quiver-api
ItsEmpa Mar 24, 2024
6987e98
Merge branch 'beta' into quiver-api
ItsEmpa Mar 26, 2024
0d76bd5
Merge branch 'beta' into quiver-api
ItsEmpa Mar 26, 2024
e28c5d3
changed show only with bow to only show when holding a bow
ItsEmpa Mar 27, 2024
16c47c7
accidentally removed that
ItsEmpa Mar 27, 2024
c9cf790
Merge branch 'beta' into quiver-api
ItsEmpa Mar 28, 2024
65d25c4
moved configs to gui
ItsEmpa Mar 28, 2024
f4ce1dc
Merge branch 'beta' into fork/quiver-api
hannibal002 Mar 30, 2024
3cd82af
changed config to dropdown
ItsEmpa Mar 30, 2024
8ced364
moved quiver display to gui
ItsEmpa Apr 2, 2024
595241a
Merge branch 'beta' into quiver-api
ItsEmpa Apr 3, 2024
b3602fd
Merge branch 'beta' into quiver-api
ItsEmpa Apr 3, 2024
5f01737
Merge branch 'beta' into fork/quiver-api
hannibal002 Apr 4, 2024
f30b54f
move
hannibal002 Apr 4, 2024
1bc5614
Merge branch 'beta' into fork/quiver-api
hannibal002 Apr 7, 2024
bccdde1
fix merge conflicts
hannibal002 Apr 7, 2024
78ca972
hanni's changes
ItsEmpa Apr 7, 2024
0ee1841
changed config
ItsEmpa Apr 8, 2024
3368625
use rarity in reminder after run
ItsEmpa Apr 8, 2024
0edce25
Merge branch 'beta' into fork/quiver-api
hannibal002 Apr 10, 2024
52da225
fix
hannibal002 Apr 10, 2024
627353f
code cleanup
hannibal002 Apr 10, 2024
f214bcb
fix item size and config migration
ItsEmpa Apr 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ import at.hannibal2.skyhanni.features.garden.visitor.VisitorListener
import at.hannibal2.skyhanni.features.garden.visitor.VisitorRewardWarning
import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard
import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardPattern
import at.hannibal2.skyhanni.features.gui.quiver.QuiverDisplay
import at.hannibal2.skyhanni.features.gui.quiver.QuiverWarning
import at.hannibal2.skyhanni.features.inventory.AuctionsHighlighter
import at.hannibal2.skyhanni.features.inventory.ChestValue
import at.hannibal2.skyhanni.features.inventory.DojoRankDisplay
Expand All @@ -240,7 +242,6 @@ import at.hannibal2.skyhanni.features.inventory.ItemStars
import at.hannibal2.skyhanni.features.inventory.MaxPurseItems
import at.hannibal2.skyhanni.features.inventory.PowerStoneGuideFeatures
import at.hannibal2.skyhanni.features.inventory.QuickCraftFeatures
import at.hannibal2.skyhanni.features.inventory.QuiverNotification
import at.hannibal2.skyhanni.features.inventory.RngMeterInventory
import at.hannibal2.skyhanni.features.inventory.SackDisplay
import at.hannibal2.skyhanni.features.inventory.ShiftClickBrewing
Expand Down Expand Up @@ -819,7 +820,6 @@ class SkyHanniMod {
loadModule(VerminTracker)
loadModule(SkillProgress)
loadModule(SkillTooltip())
loadModule(QuiverNotification)
loadModule(MaxPurseItems())
loadModule(SuperCraftFeatures())
loadModule(InfernoMinionFeatures())
Expand All @@ -829,6 +829,8 @@ class SkyHanniMod {
loadModule(DungeonShadowAssassinNotification())
loadModule(PestProfitTracker)
loadModule(NoBitsWarning())
loadModule(QuiverDisplay())
loadModule(QuiverWarning())

init()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ public class CombatConfig {
@Category(name = "Ghost Counter", desc = "Ghost counter settings")
public GhostCounterConfig ghostCounter = new GhostCounterConfig();

@Expose
@ConfigOption(name = "Quiver", desc = "")
@Accordion
public QuiverConfig quiverConfig = new QuiverConfig();

@Expose
@ConfigOption(name = "Summonings", desc = "")
@Accordion
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package at.hannibal2.skyhanni.config.features.combat;

import at.hannibal2.skyhanni.config.FeatureToggle;
import com.google.gson.annotations.Expose;
import io.github.notenoughupdates.moulconfig.annotations.Accordion;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider;
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;

public class QuiverConfig {
@Expose
@ConfigOption(name = "Quiver Display", desc = "")
@Accordion
public QuiverDisplayConfig quiverDisplay = new QuiverDisplayConfig();

@Expose
@ConfigOption(
name = "Low Quiver Alert",
desc = "Notifies you when your quiver\n" +
"reaches an amount of arrows."
)
@ConfigEditorBoolean
@FeatureToggle
public boolean lowQuiverNotification = true;

@Expose
@ConfigOption(
name = "Reminder After Run",
desc = "Reminds you to buy arrows after\n" +
"a Dungeons/Kuudra run if you're low."
)
@ConfigEditorBoolean
@FeatureToggle
public boolean reminderAfterRun = true;

@Expose
@ConfigOption(name = "Low Quiver Amount", desc = "Amount at which to notify you.")
@ConfigEditorSlider(minValue = 50, maxValue = 500, minStep = 50)
public int lowQuiverAmount = 100;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package at.hannibal2.skyhanni.config.features.combat;

import at.hannibal2.skyhanni.config.FeatureToggle;
import at.hannibal2.skyhanni.config.core.config.Position;
import com.google.gson.annotations.Expose;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDropdown;
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
import io.github.notenoughupdates.moulconfig.observer.Property;

public class QuiverDisplayConfig {
@Expose
@ConfigOption(name = "Enable", desc = "Show the number of arrows you have.")
@ConfigEditorBoolean
@FeatureToggle
public boolean enabled = true;

@Expose
public Position quiverDisplayPos = new Position(260, 80);

@Expose
@ConfigOption(name = "Show arrow icon", desc = "Displays an icon next to the Quiver Display.")
@ConfigEditorBoolean
public Property<Boolean> showIcon = Property.of(true);

@Expose
@ConfigOption(
name = "When to show",
desc = "Decides in what conditions to show the display."
)
@ConfigEditorDropdown
public Property<ShowWhen> whenToShow = Property.of(ShowWhen.ONLY_BOW_HAND);

public enum ShowWhen {
ALWAYS("Always"),
ONLY_BOW_INVENTORY("Bow in inventory"),
ONLY_BOW_HAND("Bow in hand"),

;
private final String str;

ShowWhen(String str) {
this.str = str;
}

@Override
public String toString() {
return str;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ public class DevConfig {
@ConfigEditorBoolean
public boolean worldEdit = false;

@Expose
@ConfigOption(name = "Bow Sound distance", desc = "The distance in blocks where the sound of shooting a bow will be used for the QuiverAPI.")
@ConfigEditorSlider(minValue = 0, maxValue = 50, minStep = 1)
public int bowSoundDistance = 5;

@Expose
@ConfigOption(name = "Unknown Lines warning", desc = "Gives a chat warning when unknown lines are found in the scoreboard." +
"\nCustom Scoreboard debug option")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,4 @@ public String toString() {
@ConfigEditorBoolean
@FeatureToggle
public boolean shiftClickBrewing = false;

@Expose
@ConfigOption(name = "Low Quiver Alert", desc = "Notifies you when your Quiver runs out of arrows.")
@ConfigEditorBoolean
@FeatureToggle
public boolean quiverAlert = false;

}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static class ArrowsStorage {
public String currentArrow = null;

@Expose
public Map<NEUInternalName, Float> arrowAmount = new HashMap<>();
public Map<NEUInternalName, Integer> arrowAmount = new HashMap<>();
hannibal002 marked this conversation as resolved.
Show resolved Hide resolved
}

@Expose
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ class OwnInventoryData {
if (packet is S2FPacketSetSlot) {
val windowId = packet.func_149175_c()
if (windowId == 0) {
val slot = packet.func_149173_d()
val item = packet.func_149174_e() ?: return
DelayedRun.runNextTick {
OwnInventoryItemUpdateEvent(item).postAndCatch()
OwnInventoryItemUpdateEvent(item, slot).postAndCatch()
}
}
}
Expand Down
Loading
Loading