Skip to content

Commit

Permalink
[MIRROR] Clowns can no longer kill themselves with holographic eswords (
Browse files Browse the repository at this point in the history
#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 <[email protected]>
Co-authored-by: Nick <[email protected]>
  • Loading branch information
3 people authored Apr 5, 2024
1 parent f33235d commit c45d1d4
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion code/datums/components/transforming.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand All @@ -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)
Expand Down Expand Up @@ -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

/*
Expand Down

0 comments on commit c45d1d4

Please sign in to comment.