Skip to content

Commit

Permalink
Add Galvaniser and Unstable Dynamite Barrel Abilities (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
Derpy666 authored Feb 7, 2025
1 parent 0545f68 commit 93f1961
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ enum class ItemAbility(
STARBLADE("Starblade", 5f, set = Set.HEAVY, setAmount = 2),
BEWITCHED_BLOWPIPE("Bewitched Blowpipe", 5f),
BROKEN_FLASHLIGHT("Broken Flashlight", 10f),
GALVANISER("Galvaniser", 20f, set = Set.DIGITAL, setAmount = 3),
UNSTABLE_DYNAMITE_BARREL("Unstable Dynamite Barrel", 15f, set = Set.DEMOLITIONIST, setAmount = 2),

// No Display
LASER_POINT_MINIGUN("Laser Point Minigun", 0.5f, set = Set.HEAVY, setAmount = 2),
Expand Down Expand Up @@ -114,11 +116,13 @@ enum class ItemAbility(
}

fun onSound() {
val debounceTime = lastClicked.timeDelta()
Debugger.ITEMABILITY.debug("§eReceived onSound as &&b$itemName")
if(!this.isOnCooldown()) {
val debounceTime = lastClicked.timeDelta()
Debugger.ITEMABILITY.debug("§eReceived onSound as &&b$itemName")

if (debounceTime < 500.milliseconds) {
activate()
if (debounceTime < 500.milliseconds) {
activate()
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ object ItemAbilityCooldown {
ItemAbility.BROKEN_FLASHLIGHT.onSound()
}

event.soundName == "block.conduit.deactivate" && event.pitch == 1.5f && event.volume == 3f -> {
ItemAbility.GALVANISER.onSound()
}

// Wasted Boomstick
event.soundName == "entity.blaze.shoot" && event.pitch == 1.5f && event.volume == 3f -> {
ItemAbility.WASTED_BOOMSTICK.onSound()
Expand Down Expand Up @@ -156,6 +160,7 @@ object ItemAbilityCooldown {
// Dynamite Barrel
event.soundName == "entity.generic.explode" && event.pitch == 1.5f && event.volume == 9999f -> {
ItemAbility.DYNAMITE_BARREL.onSound()
ItemAbility.UNSTABLE_DYNAMITE_BARREL.onSound()
}

// Laser Point Minigun
Expand Down

0 comments on commit 93f1961

Please sign in to comment.