mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
Fixes some shielded component jank (#79674)
## About The Pull Request If you attempted to use the shielded component properly (applying it in `Init`), it would not work because the equipped signal was improperly passing its arguments to `set_wearer`. The only reason why this worked now is that every consumer added the component after it was `equipped`... usually in `equipped`. This also meant shielded items that added it in equipped were open to an exploit, allowing you to reset the charges by unequip / re-equip. ## Changelog 🆑 Melbert fix: Fixes some potential exploits and issues involving shielded equipment. /🆑
This commit is contained in:
@@ -207,12 +207,18 @@
|
||||
var/lose_multiple_charges = TRUE
|
||||
var/show_charge_as_alpha = TRUE
|
||||
|
||||
/obj/item/clothing/suit/armor/vest/ctf/equipped(mob/user, slot)
|
||||
/obj/item/clothing/suit/armor/vest/ctf/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!slot || slot & ITEM_SLOT_HANDS)
|
||||
return
|
||||
AddComponent(/datum/component/shielded, max_charges = max_charges, recharge_start_delay = recharge_start_delay, charge_increment_delay = charge_increment_delay, \
|
||||
charge_recovery = charge_recovery, lose_multiple_charges = lose_multiple_charges, show_charge_as_alpha = show_charge_as_alpha, shield_icon = team_shield_icon)
|
||||
AddComponent( \
|
||||
/datum/component/shielded, \
|
||||
max_charges = max_charges, \
|
||||
recharge_start_delay = recharge_start_delay, \
|
||||
charge_increment_delay = charge_increment_delay, \
|
||||
charge_recovery = charge_recovery, \
|
||||
lose_multiple_charges = lose_multiple_charges, \
|
||||
show_charge_as_alpha = show_charge_as_alpha, \
|
||||
shield_icon = team_shield_icon, \
|
||||
)
|
||||
|
||||
// LIGHT SHIELDED VEST
|
||||
|
||||
|
||||
Reference in New Issue
Block a user