Files
Bubberstation/code/datums/elements/corrupted_organ.dm
SmArtKar a4f0dcb76f Adds flaying, human butchering and limb surgeries (#94612)
## About The Pull Request

Merry Christmas!

This PR expands on the more gruesome areas of chef content, such as
cannibalism.
Human limbs can now be individually butchered for their meat and skin
with a knife or another butchering implement once the skin has been cut
and retracted (forks now can be used as bootleg retractors). If the limb
contains organs, those will need to be removed first, which also can be
quickly performed with a butchering tool at the cost of damaging the
inhards (head and chest will require the bone to be cut first, which can
be done with a butcher's cleaver if you don't have a saw)
You can also butcher humans whole by right clicking them with a
butchering implement on combat mode, which will attempt to gut/cut apart
the selected limb. Obviously this requires the limb to be prepped first,
so meat hooks/kitchenspikes now allow mobs strung on them to be operated
on without needing drapes. Its a pretty bad spot to be performing
surgeries at though, so beware! Torsos can only be butchered after all
other limbs have been. The gutting/butchering delay is based off the
owner's stat, halving if the limb is detached and doubling if the owner
is still alive and kicking.

<img width="392" height="265" alt="dreamseeker_D7QWbWKStd"
src="https://github.com/user-attachments/assets/050d7c25-3572-4b02-ae93-d8efefe54885"
/>

(The video is too large for github)
https://streamable.com/459a0y

After being butchered, most limbs will leave behind a nonfunctional
skeletal limb (with exceptions like jelly limbs with no skeleton inside)
which is always disabled. Skeleton chests husk their owner, so you'll
need to replace it first.
Gibbers now source their meat from the victim's limbs (and not their
species) at an RNG-based percentage based on the matter bin's tier.

As to allow individual limbs to be butchered, you can now perform (some)
surgeries on individual limbs. There are some obvious restrictions like
zombification or bioware surgeries, but most of the ones that make sense
can be performed on someone's chopped off head as long as you've got the
tools.
Wounds also contribute to surgeries now, major slash wounds count as
cut/open skin (and sealing the vessels would reduce their bleed rate),
and critical blunt wounds count as sawed bones.

I've refactored gibbers, butchering and meat spike code as well as fixed
some backend bugs while I was at it.

## Why It's Good For The Game

While rather gruesome, I feel like the freedom which these mechanics
provide fits us pretty well. We already have plenty of nasty stuff and
this doesn't really go that much further, and a chef serving their own
leg in their dish is pretty funny. (Also you can scrape plasma off
plasmamen bones)
2025-12-31 12:55:39 -06:00

68 lines
2.7 KiB
Plaintext

/// Component applying shared behaviour by cursed organs granted when sacrificed by a heretic
/// Mostly just does something spooky when it is removed
/datum/element/corrupted_organ
/datum/element/corrupted_organ/Attach(obj/item/organ/target, add_color = TRUE)
. = ..()
if (!istype(target) || (target.organ_flags & ORGAN_EXTERNAL))
return ELEMENT_INCOMPATIBLE
RegisterSignal(target, COMSIG_ORGAN_SURGICALLY_REMOVED, PROC_REF(on_removed))
var/atom/atom_parent = target
if(add_color)
atom_parent.add_atom_colour(COLOR_VOID_PURPLE, FIXED_COLOUR_PRIORITY)
atom_parent.add_filter(name = "ray", priority = 1, params = list(
type = "rays",
size = 12,
color = COLOR_VOID_PURPLE,
density = 12
))
var/ray_filter = atom_parent.get_filter("ray")
animate(ray_filter, offset = 100, time = 2 MINUTES, loop = -1, flags = ANIMATION_PARALLEL) // Absurdly long animate so nobody notices it hitching when it loops
animate(offset = 0, time = 2 MINUTES) // I sure hope duration of animate doesnt have any performance effect
/datum/element/corrupted_organ/Detach(datum/source)
UnregisterSignal(source, list(COMSIG_ORGAN_SURGICALLY_REMOVED))
return ..()
/// When we're taken out of someone, do something spooky
/datum/element/corrupted_organ/proc/on_removed(atom/organ, mob/living/remover, mob/living/carbon/loser)
SIGNAL_HANDLER
if (loser?.has_reagent(/datum/reagent/water/holywater) || loser?.can_block_magic(MAGIC_RESISTANCE|MAGIC_RESISTANCE_HOLY) || prob(20))
return
if (prob(75))
organ.AddComponent(\
/datum/component/haunted_item,\
haunt_color = "#00000000", \
aggro_radius = 4, \
spawn_message = span_revenwarning("[organ] hovers ominously into the air, pulsating with unnatural vigour!"), \
despawn_message = span_revenwarning("[organ] falls motionless to the ground."), \
)
return
var/turf/origin_turf = get_turf(organ)
playsound(organ, 'sound/effects/magic/forcewall.ogg', vol = 100)
new /obj/effect/temp_visual/curse_blast(origin_turf)
organ.visible_message(span_revenwarning("[organ] explodes in a burst of dark energy!"))
for(var/mob/living/target in range(1, origin_turf))
var/armor = target.run_armor_check(attack_flag = BOMB)
target.apply_damage(30, damagetype = BURN, blocked = armor, spread_damage = TRUE)
qdel(organ)
/obj/effect/temp_visual/curse_blast
icon = 'icons/effects/64x64.dmi'
pixel_x = -16
pixel_y = -16
icon_state = "curse"
duration = 0.3 SECONDS
/obj/effect/temp_visual/curse_blast/Initialize(mapload)
. = ..()
animate(src, transform = matrix() * 0.2, time = 0, flags = ANIMATION_PARALLEL)
animate(transform = matrix() * 2, time = duration, easing = QUAD_EASING|EASE_IN)
animate(src, alpha = 255, time = 0, flags = ANIMATION_PARALLEL)
animate(alpha = 255, time = 0.2 SECONDS)
animate(alpha = 0, time = 0.1 SECONDS)