mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +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:
@@ -128,8 +128,17 @@
|
||||
qdel(shield)
|
||||
UnregisterSignal(mod.wearer, COMSIG_HUMAN_CHECK_SHIELDS)
|
||||
|
||||
/obj/item/mod/module/energy_shield/proc/shield_reaction(mob/living/carbon/human/owner, atom/movable/hitby, damage = 0, attack_text = "the attack", attack_type = MELEE_ATTACK, armour_penetration = 0)
|
||||
if(SEND_SIGNAL(mod, COMSIG_ITEM_HIT_REACT, owner, hitby, attack_text, 0, damage, attack_type) & COMPONENT_HIT_REACTION_BLOCK)
|
||||
/obj/item/mod/module/energy_shield/proc/shield_reaction(mob/living/carbon/human/owner,
|
||||
atom/movable/hitby,
|
||||
damage = 0,
|
||||
attack_text = "the attack",
|
||||
attack_type = MELEE_ATTACK,
|
||||
armour_penetration = 0,
|
||||
damage_type = BRUTE
|
||||
)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(SEND_SIGNAL(mod, COMSIG_ITEM_HIT_REACT, owner, hitby, attack_text, 0, damage, attack_type, damage_type) & COMPONENT_HIT_REACTION_BLOCK)
|
||||
drain_power(use_power_cost)
|
||||
return SHIELD_BLOCK
|
||||
return NONE
|
||||
|
||||
Reference in New Issue
Block a user