From c45d1d496d0ebeb1ae379a33fb0586be9b0ebc72 Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Fri, 5 Apr 2024 16:24:44 +0300 Subject: [PATCH] [MIRROR] Clowns can no longer kill themselves with holographic eswords (#2731) * Clowns can no longer kill themselves with holographic eswords (#82402) ## About The Pull Request Currently clowns (or any clumsy mob) can kill themselves with holographic eswords by opening and closing them repeatedly. The damage done is normal brute damage instead of stamina. This PR fixes that, and adds some extra options to the `/datum/component/transforming` component to adjust the amount of damage dealt to clumsy users. It also makes the damage type inherited from the parent of the component. ## Why It's Good For The Game Fixes #82398 Doesn't make sense for a supposedly harmless holographic esword to be able to hurt someone, even if they're clumsy. Also allows for more control over the transforming component. ## Changelog :cl: fix: Holographic energy swords have undergone some more rigorous safety inspections, and should no longer be a danger to clumsy crew members. /:cl: * Clowns can no longer kill themselves with holographic eswords --------- Co-authored-by: NovaBot <154629622+NovaBot13@users.noreply.github.com> Co-authored-by: Nick <42454181+Momo8289@users.noreply.github.com> --- code/datums/components/transforming.dm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/code/datums/components/transforming.dm b/code/datums/components/transforming.dm index 3c3fec196c2..e51c784657b 100644 --- a/code/datums/components/transforming.dm +++ b/code/datums/components/transforming.dm @@ -34,6 +34,8 @@ var/list/attack_verb_simple_on /// Whether clumsy people need to succeed an RNG check to turn it on without hurting themselves var/clumsy_check + /// Amount of damage to deal to clumsy people + var/clumsy_damage /// If we get sharpened with a whetstone, save the bonus here for later use if we un/redeploy var/sharpened_bonus = 0 /// Dictate whether we change inhands or not @@ -51,6 +53,7 @@ hitsound_on = 'sound/weapons/blade1.ogg', w_class_on = WEIGHT_CLASS_BULKY, clumsy_check = TRUE, + clumsy_damage = 10, list/attack_verb_continuous_on, list/attack_verb_simple_on, inhand_icon_change = TRUE, @@ -69,6 +72,7 @@ src.hitsound_on = hitsound_on src.w_class_on = w_class_on src.clumsy_check = clumsy_check + src.clumsy_damage = clumsy_damage src.inhand_icon_change = inhand_icon_change if(attack_verb_continuous_on) @@ -266,8 +270,21 @@ span_warning("[user] triggers [parent] while holding it backwards and [hurt_self_verb_continuous] themself, like a doofus!"), span_warning("You trigger [parent] while holding it backwards and [hurt_self_verb_simple] yourself, like a doofus!"), ) - user.take_bodypart_damage(10) + var/obj/item/item_parent = parent + switch(item_parent.damtype) + if(STAMINA) + user.adjustStaminaLoss(clumsy_damage) + if(OXY) + user.adjustOxyLoss(clumsy_damage) + if(TOX) + user.adjustToxLoss(clumsy_damage) + if(BRUTE) + user.take_bodypart_damage(brute=clumsy_damage) + if(BURN) + user.take_bodypart_damage(burn=clumsy_damage) + return TRUE + return FALSE /*