Dissection experiments are handled by autopsy surgery. Removes redundant dissection surgery. You can repeat an autopsy on someone who has come back to life. (#77386)

## About The Pull Request

TRAIT_DISSECTED has had the surgical speed boost moved over to
TRAIT_SURGICALLY_ANALYZED.

TRAIT_DISSECTED now tracks if we can do an autopsy on the same body
again, and blocks further autopsies if it is on the mob. A mob that
comes back to life loses TRAIT_DISSECTED. This allows for mobs to be
autopsied once again.

Since it is completely redundant now (and was the whole time TBH),
dissections have been removed in favour of just having the experiment
track autopsies.

Fixes https://github.com/tgstation/tgstation/issues/76775

## Why It's Good For The Game

Today I showed up to a round where someone autopsied all the bodies in
the morgue, not realizing they were using the wrong surgery. Since I
couldn't _redo_ the surgery, this rendered all these bodies useless.
This was not out of maliciousness, they just didn't know better. There
are two autopsies in the surgery list, but only one is valid for the
experiment and doing the wrong one blocks _both surgeries_. Dissection
is completely useless outside of experiments. This same issue also
prevents additional autopsies on the same person, even if they had come
back to life and died again after you had done the initial autopsy.
Surely you would want to do more than one autopsy, right? That's two
separate deaths!

This resolves that by giving you a method of redoing any screwups on the
same corpse if necessary. It only matters if the experiment is available
anyway, so there isn't much reason to punish players unduly just because
they weren't aware science hadn't hit a button on their side (especially
since it isn't communicated to the coroner in any way to begin with). It
also removes a completely useless surgery and ties in the experiment to
what the coroner is already going to be doing. They can dissect their
corpses to their hearts content without worrying about retribution from
science for doing so.

In addition, someone repeatedly dying can continue to have autopsies
done on them over the course of the round. The surgery bonus only
applies once, so the only reason to do autopsies after the first is to
discover what might have killed someone. No reason this should block
further surgeries, just block surgeries when the person remains a
corpse.

## Changelog
🆑
fix: You can do autopsies on people who were revived and died again
after they had already been dissected.
qol: Autopsies have become the surgery needed to complete the dissection
experiments. As a result, the dissection surgery has been removed as it
is now redundant.
qol: A coroner knows whether someone has been autopsied and recently
dissected (and thus hasn't been revived) by examining them.
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
This commit is contained in:
necromanceranne
2023-08-08 11:39:20 +01:00
committed by GitHub
co-authored by Jacquerel
parent ccbb446893
commit 95ec0e6545
15 changed files with 74 additions and 142 deletions
@@ -1,5 +1,5 @@
// /obj/machinery/computer/operating signals
/// Fired when a dissection surgery completes.
/// Fired when a autopsy surgery completes.
/// (mob/living/target)
#define COMSIG_OPERATING_COMPUTER_DISSECTION_COMPLETE "operating_computer_dissection_complete"
#define COMSIG_OPERATING_COMPUTER_AUTOPSY_COMPLETE "operating_computer_autopsy_complete"
+4 -1
View File
@@ -328,6 +328,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_NOSOFTCRIT "nosoftcrit"
#define TRAIT_MINDSHIELD "mindshield"
#define TRAIT_DISSECTED "dissected"
#define TRAIT_SURGICALLY_ANALYZED "surgically_analyzed"
/// Lets the user succumb even if they got NODEATH
#define TRAIT_SUCCUMB_OVERRIDE "succumb_override"
/// Can hear observers
@@ -563,7 +564,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
/// Projectile with this trait will always hit the defined zone of a struck living mob.
#define TRAIT_ALWAYS_HIT_ZONE "always_hit_zone"
/// Mobs with this trait do care about a few grizzly things, such as digging up graves. They also really do not like bringing people back to life or tending wounds, but love autopies, dissections and amputations.
/// Mobs with this trait do care about a few grisly things, such as digging up graves. They also really do not like bringing people back to life or tending wounds, but love autopsies and amputations.
#define TRAIT_MORBID "morbid"
// METABOLISMS
@@ -1101,6 +1102,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define HALLUCINATION_TRAIT "hallucination_trait"
/// Trait given by simple/basic mob death
#define BASIC_MOB_DEATH_TRAIT "basic_mob_death"
/// Trait given to mobs that have been autopsied
#define AUTOPSY_TRAIT "autopsy_trait"
/**
+1
View File
@@ -93,6 +93,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_NOSOFTCRIT" = TRAIT_NOSOFTCRIT,
"TRAIT_MINDSHIELD" = TRAIT_MINDSHIELD,
"TRAIT_DISSECTED" = TRAIT_DISSECTED,
"TRAIT_SURGICALLY_ANALYZED" = TRAIT_SURGICALLY_ANALYZED,
"TRAIT_SIXTHSENSE" = TRAIT_SIXTHSENSE,
"TRAIT_FEARLESS" = TRAIT_FEARLESS,
"TRAIT_PARALYSIS_L_ARM" = TRAIT_PARALYSIS_L_ARM,
@@ -27,7 +27,7 @@
experiment_handler = AddComponent( \
/datum/component/experiment_handler, \
allowed_experiments = list(/datum/experiment/dissection), \
allowed_experiments = list(/datum/experiment/autopsy), \
config_flags = EXPERIMENT_CONFIG_ALWAYS_ACTIVE, \
config_mode = EXPERIMENT_CONFIG_ALTCLICK, \
)
@@ -55,7 +55,7 @@
if(istype(parent, /obj/machinery/destructive_scanner))
RegisterSignal(parent, COMSIG_MACHINERY_DESTRUCTIVE_SCAN, PROC_REF(try_run_destructive_experiment))
if(istype(parent, /obj/machinery/computer/operating))
RegisterSignal(parent, COMSIG_OPERATING_COMPUTER_DISSECTION_COMPLETE, PROC_REF(try_run_dissection_experiment))
RegisterSignal(parent, COMSIG_OPERATING_COMPUTER_AUTOPSY_COMPLETE, PROC_REF(try_run_autopsy_experiment))
// Determine UI display mode
switch(config_mode)
@@ -166,15 +166,14 @@
playsound(src, 'sound/machines/buzz-sigh.ogg', 25)
our_scanner.say("The scan did not result in anything.")
/// Hooks on a successful dissection experiment
/datum/component/experiment_handler/proc/try_run_dissection_experiment(obj/source, mob/living/target)
/// Hooks on a successful autopsy experiment
/datum/component/experiment_handler/proc/try_run_autopsy_experiment(obj/source, mob/living/target)
SIGNAL_HANDLER
if (action_experiment(source, target))
playsound(source, 'sound/machines/ping.ogg', 25)
else
playsound(source, 'sound/machines/buzz-sigh.ogg', 25)
source.say("The dissection did not result in anything, either prior dissections have not been complete, or this one has already been researched.")
source.say("New unique autopsy successfully catalogued.")
/**
* Announces a message to all experiment handlers
@@ -0,0 +1,39 @@
/datum/experiment/autopsy
name = "Autopsy Experiment"
description = "An experiment requiring a autopsy surgery to progress"
exp_tag = "Autopsy"
performance_hint = "Perform a autopsy surgery while connected to an operating computer."
/datum/experiment/autopsy/is_complete()
return completed
/datum/experiment/autopsy/perform_experiment_actions(datum/component/experiment_handler/experiment_handler, mob/target)
if (is_valid_autopsy(target))
completed = TRUE
return TRUE
else
return FALSE
/datum/experiment/autopsy/proc/is_valid_autopsy(mob/target)
return TRUE
/datum/experiment/autopsy/human
name = "Human Autopsy Experiment"
description = "We don't want to invest in a station that doesn't know their coccyx from their cochlea. Send us back data dissecting a human to receive more funding."
/datum/experiment/autopsy/human/is_valid_autopsy(mob/target)
return ishumanbasic(target)
/datum/experiment/autopsy/nonhuman
name = "Non-human Autopsy Experiment"
description = "When we asked for a tail bone, we didn't mean...look, just send us back data from something OTHER than a human. It could be a monkey for all we care, just send us research."
/datum/experiment/autopsy/nonhuman/is_valid_autopsy(mob/target)
return ishuman(target) && !ishumanbasic(target)
/datum/experiment/autopsy/xenomorph
name = "Xenomorph Autopsy Experiment"
description = "Our understanding of the xenomorph only scratches the surface. Send us research from dissecting a xenomorph."
/datum/experiment/autopsy/xenomorph/is_valid_autopsy(mob/target)
return isalien(target)
@@ -1,39 +0,0 @@
/datum/experiment/dissection
name = "Dissection Experiment"
description = "An experiment requiring a dissection surgery to progress"
exp_tag = "Dissection"
performance_hint = "Perform a dissection surgery while connected to an operating computer."
/datum/experiment/dissection/is_complete()
return completed
/datum/experiment/dissection/perform_experiment_actions(datum/component/experiment_handler/experiment_handler, mob/target)
if (is_valid_dissection(target))
completed = TRUE
return TRUE
else
return FALSE
/datum/experiment/dissection/proc/is_valid_dissection(mob/target)
return TRUE
/datum/experiment/dissection/human
name = "Human Dissection Experiment"
description = "We don't want to invest in a station that doesn't know their coccyx from their cochlea. Send us back data dissecting a human to receive more funding."
/datum/experiment/dissection/human/is_valid_dissection(mob/target)
return ishumanbasic(target)
/datum/experiment/dissection/nonhuman
name = "Non-human Dissection Experiment"
description = "When we asked for a tail bone, we didn't mean...look, just send us back data from something OTHER than a human. It could be a monkey for all we care, just send us research."
/datum/experiment/dissection/nonhuman/is_valid_dissection(mob/target)
return ishuman(target) && !ishumanbasic(target)
/datum/experiment/dissection/xenomorph
name = "Xenomorph Dissection Experiment"
description = "Our understanding of the xenomorph only scratches the surface. Send us research from dissecting a xenomorph."
/datum/experiment/dissection/xenomorph/is_valid_dissection(mob/target)
return isalien(target)
+2
View File
@@ -821,6 +821,8 @@
if(health <= HEALTH_THRESHOLD_DEAD && !HAS_TRAIT(src, TRAIT_NODEATH))
death()
return
if(HAS_TRAIT_FROM(src, TRAIT_DISSECTED, AUTOPSY_TRAIT))
REMOVE_TRAIT(src, TRAIT_DISSECTED, AUTOPSY_TRAIT)
if(health <= hardcrit_threshold && !HAS_TRAIT(src, TRAIT_NOHARDCRIT))
set_stat(HARD_CRIT)
else if(HAS_TRAIT(src, TRAIT_KNOCKEDOUT))
@@ -361,6 +361,14 @@
if (!isnull(trait_exam))
. += trait_exam
if(isliving(user))
var/mob/living/morbid_weirdo = user
if(HAS_MIND_TRAIT(morbid_weirdo, TRAIT_MORBID))
if(HAS_TRAIT(src, TRAIT_DISSECTED))
msg += "[span_notice("[t_He] appears to have been dissected. Useless for examination... <b><i>for now.</i></b>")]\n"
if(HAS_TRAIT(src, TRAIT_SURGICALLY_ANALYZED))
msg += "[span_notice("A skilled hand has mapped this one's internal intricacies. It will be far easier to perform future experimentations upon [t_him]. <b><i>Exquisite.</i></b>")]\n"
var/perpname = get_face_name(get_id_name(""))
if(perpname && (HAS_TRAIT(user, TRAIT_SECURITY_HUD) || HAS_TRAIT(user, TRAIT_MEDICAL_HUD)))
var/datum/record/crew/target_record = find_record(perpname)
+3 -3
View File
@@ -403,7 +403,7 @@
"soda_dispenser",
)
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
required_experiments = list(/datum/experiment/dissection/human)
required_experiments = list(/datum/experiment/autopsy/human)
/datum/techweb_node/adv_biotech
id = "adv_biotech"
@@ -425,7 +425,7 @@
"smoke_machine",
)
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000)
required_experiments = list(/datum/experiment/dissection/nonhuman)
required_experiments = list(/datum/experiment/autopsy/nonhuman)
discount_experiments = list(/datum/experiment/scanning/random/material/meat = 4000)
/datum/techweb_node/xenoorgan_biotech
@@ -443,7 +443,7 @@
discount_experiments = list(
/datum/experiment/scanning/random/cytology/easy = 1000,
/datum/experiment/scanning/points/slime/hard = 5000,
/datum/experiment/dissection/xenomorph = 5000,
/datum/experiment/autopsy/xenomorph = 5000,
)
/datum/techweb_node/bio_process
+6 -1
View File
@@ -34,8 +34,13 @@
display_pain(target, "You feel a burning sensation in your chest!")
/datum/surgery_step/autopsy/success(mob/user, mob/living/carbon/target, target_zone, obj/item/autopsy_scanner/tool, datum/surgery/surgery, default_display_results = FALSE)
ADD_TRAIT(target, TRAIT_DISSECTED, REF(src))
ADD_TRAIT(target, TRAIT_DISSECTED, AUTOPSY_TRAIT)
if(!HAS_TRAIT(src, TRAIT_SURGICALLY_ANALYZED))
ADD_TRAIT(target, TRAIT_SURGICALLY_ANALYZED, AUTOPSY_TRAIT)
tool.scan_cadaver(user, target)
var/obj/machinery/computer/operating/operating_computer = surgery.locate_operating_computer(get_turf(target))
if (!isnull(operating_computer))
SEND_SIGNAL(operating_computer, COMSIG_OPERATING_COMPUTER_AUTOPSY_COMPLETE, target)
if(HAS_MIND_TRAIT(user, TRAIT_MORBID) && ishuman(user))
var/mob/living/carbon/human/morbid_weirdo = user
morbid_weirdo.add_mood_event("morbid_dissection_success", /datum/mood_event/morbid_dissection_success)
-85
View File
@@ -1,85 +0,0 @@
/datum/surgery/dissection
name = "Dissection"
target_mobtypes = list(
/mob/living/carbon/human,
/mob/living/carbon/alien,
)
surgery_flags = SURGERY_REQUIRE_RESTING | SURGERY_REQUIRE_LIMB | SURGERY_REQUIRES_REAL_LIMB | SURGERY_MORBID_CURIOSITY
possible_locs = list(BODY_ZONE_CHEST)
steps = list(
/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/clamp_bleeders,
/datum/surgery_step/dissection,
/datum/surgery_step/close,
)
/datum/surgery/dissection/can_start(mob/user, mob/living/patient)
. = ..()
// This isn't a real advanced tech, but it doesn't make sense using it without an operating computer
if (isnull(locate_operating_computer(get_turf(patient))))
return FALSE
if (HAS_TRAIT(patient, TRAIT_DISSECTED))
return FALSE
if (patient.stat != DEAD)
return FALSE
return TRUE
/datum/surgery_step/dissection
name = "dissect (autopsy scanner)"
time = 16 SECONDS
implements = list(
/obj/item/autopsy_scanner = 100,
)
/datum/surgery_step/dissection/preop(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery)
var/ending = "..."
if (isnull(surgery.locate_operating_computer(get_turf(target))))
ending = "<b>, but without a linked operating computer, you won't get any research!</b>"
display_results(
user,
target,
span_notice("You start to dissect [target][ending]"),
span_notice("[user] starts to dissect [target]..."),
span_notice("[user] begins to start poking around inside your corpse...hey, wait a minute!"),
)
/datum/surgery_step/dissection/success(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results)
ADD_TRAIT(target, TRAIT_DISSECTED, REF(src))
var/obj/machinery/computer/operating/operating_computer = surgery.locate_operating_computer(get_turf(target))
if (!isnull(operating_computer))
SEND_SIGNAL(operating_computer, COMSIG_OPERATING_COMPUTER_DISSECTION_COMPLETE, target)
if(HAS_MIND_TRAIT(user, TRAIT_MORBID) && ishuman(user))
var/mob/living/carbon/human/morbid_weirdo = user
morbid_weirdo.add_mood_event("morbid_dissection_success", /datum/mood_event/morbid_dissection_success)
return TRUE
/datum/surgery_step/dissection/failure(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery, fail_prob)
display_results(
user,
target,
span_notice("You mess up, damaging some of the internal organs!"),
span_notice("[user] messes up, damaging some of the internal organs!"),
span_notice("[user] messes up, damaging some of your internal organs!"),
)
target.adjustOrganLoss(pick(
ORGAN_SLOT_APPENDIX,
ORGAN_SLOT_BRAIN,
ORGAN_SLOT_HEART,
ORGAN_SLOT_LIVER,
ORGAN_SLOT_LUNGS,
ORGAN_SLOT_STOMACH,
), 20)
return FALSE
/datum/surgery_step/dissection/tool_check(mob/user, obj/item/tool)
return implement_type != /obj/item || tool.get_sharpness() > 0
+1 -1
View File
@@ -87,7 +87,7 @@
if(tool)
speed_mod = tool.toolspeed
if(HAS_TRAIT(target, TRAIT_DISSECTED))
if(HAS_TRAIT(target, TRAIT_SURGICALLY_ANALYZED))
speed_mod *= SURGERY_SPEED_DISSECTION_MODIFIER
if(check_morbid_curiosity(user, tool, surgery))
+1 -1
View File
@@ -581,7 +581,7 @@
*
* Bonuses if the surgery is being done by a morbid user and it is of their interest.
*
* Morbid users are interested in; dissections, autospies, revival surgery, plastic surgery, organ/feature manipulations, amputations
* Morbid users are interested in; autospies, revival surgery, plastic surgery, organ/feature manipulations, amputations
*
* Otherwise, normal tool.
*/
+1 -2
View File
@@ -3509,7 +3509,7 @@
#include "code\modules\experisci\experiment\experiments.dm"
#include "code\modules\experisci\experiment\physical_experiments.dm"
#include "code\modules\experisci\experiment\handlers\experiment_handler.dm"
#include "code\modules\experisci\experiment\types\dissection_experiment.dm"
#include "code\modules\experisci\experiment\types\autopsy_experiment.dm"
#include "code\modules\experisci\experiment\types\experiment.dm"
#include "code\modules\experisci\experiment\types\exploration.dm"
#include "code\modules\experisci\experiment\types\ordnance.dm"
@@ -5117,7 +5117,6 @@
#include "code\modules\surgery\core_removal.dm"
#include "code\modules\surgery\coronary_bypass.dm"
#include "code\modules\surgery\dental_implant.dm"
#include "code\modules\surgery\dissection.dm"
#include "code\modules\surgery\ear_surgery.dm"
#include "code\modules\surgery\eye_surgery.dm"
#include "code\modules\surgery\gastrectomy.dm"