From 561cfe93f93aa847b635c9d03c898be5de82c68a Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Fri, 15 Mar 2024 22:18:26 -0400 Subject: [PATCH] [MIRROR] now spiders get extra damage by fly swatter (#1458) * now young spiders get extra damage by fly swatter (#82010) ## About The Pull Request Closes https://github.com/tgstation/tgstation/issues/81981 ## Why It's Good For The Game Allows flyswatter to act as we would imagine. Takes 1 to 4 hits depending on its type. Makes list static so we don't have to make it every flyswatter. ## Changelog :cl: fix: now young spiders get extra damage by fly swatter /:cl: --------- Co-authored-by: Jacquerel Co-authored-by: san7890 * now spiders get extra damage by fly swatter --------- Co-authored-by: Bilbo367 <163439532+Bilbo367@users.noreply.github.com> Co-authored-by: Jacquerel Co-authored-by: san7890 --- code/game/objects/items/weaponry.dm | 30 +++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index f7219921765..c2f654f8553 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -791,26 +791,28 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 hitsound = 'sound/effects/snap.ogg' w_class = WEIGHT_CLASS_SMALL /// Things in this list will be instantly splatted. Flyman weakness is handled in the flyman species weakness proc. - var/list/splattable + var/static/list/splattable /// Things in this list which take a lot more damage from the fly swatter, but not be necessarily killed by it. - var/list/strong_against + var/static/list/strong_against /// How much extra damage the fly swatter does against mobs it is strong against var/extra_strength_damage = 24 /obj/item/melee/flyswatter/Initialize(mapload) . = ..() - splattable = typecacheof(list( - /mob/living/basic/ant, - /mob/living/basic/butterfly, - /mob/living/basic/cockroach, - /mob/living/basic/spider/growing/spiderling, - /mob/living/basic/bee, - /obj/effect/decal/cleanable/ants, - /obj/item/queen_bee, - )) - strong_against = typecacheof(list( - /mob/living/basic/spider/giant, - )) + if (isnull(splattable)) + splattable = typecacheof(list( + /mob/living/basic/ant, + /mob/living/basic/butterfly, + /mob/living/basic/cockroach, + /mob/living/basic/spider/growing/spiderling, + /mob/living/basic/bee, + /obj/effect/decal/cleanable/ants, + /obj/item/queen_bee, + )) + if (isnull(strong_against)) + strong_against = typecacheof(list( + /mob/living/basic/spider, + )) /obj/item/melee/flyswatter/afterattack(atom/target, mob/user, proximity_flag)