mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Stops shields getting broken by pillows and disablers. (#75759)
## About The Pull Request See the title. Doing so by adding a new arg for damage type to `check_shields()` and `hit_reaction()`. The other way would had involved a couple istype checks for item or projectile damage type, but this is a longer term solution and can tackle more than just that. ## Why It's Good For The Game Fixes #74876. ## Changelog 🆑 fix: Stops shields getting broken by pillows and disablers. /🆑
This commit is contained in:
@@ -144,7 +144,7 @@
|
||||
* This proc fires when we're hit, and is responsible for checking if we're charged, then deducting one + returning that we're blocking if so.
|
||||
* It then runs the callback in [/datum/component/shielded/var/on_hit_effects] which handles the messages/sparks (so the visuals)
|
||||
*/
|
||||
/datum/component/shielded/proc/on_hit_react(datum/source, mob/living/carbon/human/owner, atom/movable/hitby, attack_text, final_block_chance, damage, attack_type)
|
||||
/datum/component/shielded/proc/on_hit_react(datum/source, mob/living/carbon/human/owner, atom/movable/hitby, attack_text, final_block_chance, damage, attack_type, damage_type)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
COOLDOWN_START(src, recently_hit_cd, recharge_start_delay)
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
* - final_block_chance: The probability of blocking the target with the source
|
||||
* - attack_type: The type of attack that was blocked
|
||||
*/
|
||||
/datum/element/light_eater/proc/on_hit_reaction(obj/item/source, mob/living/carbon/human/owner, atom/movable/hitby, attack_text, final_block_chance, damage, attack_type)
|
||||
/datum/element/light_eater/proc/on_hit_reaction(obj/item/source, mob/living/carbon/human/owner, atom/movable/hitby, attack_text, final_block_chance, damage, attack_type, damage_type)
|
||||
SIGNAL_HANDLER
|
||||
if(prob(final_block_chance))
|
||||
eat_lights(hitby, source)
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/staff/bostaff/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
/obj/item/staff/bostaff/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, damage_type = BRUTE)
|
||||
if(!HAS_TRAIT(src, TRAIT_WIELDED))
|
||||
return ..()
|
||||
return FALSE
|
||||
|
||||
Reference in New Issue
Block a user