Files
Bubberstation/code/modules/surgery/autopsy.dm
SkyratBot 18fc2d9b16 [MIRROR] Oldstation now has their own RND [MDB IGNORE] (#23567)
* Oldstation now has their own RND

* Update oldstation_fluff.dm

* Update techweb_types.dm

* beaker capacity

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-09-07 22:36:11 -04:00

58 lines
2.3 KiB
Plaintext

/datum/surgery/autopsy
name = "Autopsy"
surgery_flags = SURGERY_IGNORE_CLOTHES | SURGERY_REQUIRE_RESTING | SURGERY_REQUIRE_LIMB | SURGERY_MORBID_CURIOSITY
possible_locs = list(BODY_ZONE_CHEST)
steps = list(
/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/autopsy,
/datum/surgery_step/close,
)
/datum/surgery/autopsy/can_start(mob/user, mob/living/patient)
. = ..()
if(patient.stat != DEAD)
return FALSE
if(HAS_TRAIT_FROM(patient, TRAIT_DISSECTED, AUTOPSY_TRAIT))
return FALSE
return TRUE
/datum/surgery_step/autopsy
name = "Perform Autopsy (autopsy scanner)"
implements = list(/obj/item/autopsy_scanner = 100)
time = 10 SECONDS
success_sound = 'sound/machines/printer.ogg'
/datum/surgery_step/autopsy/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(
user,
target,
span_notice("You begins performing an autopsy on [target]..."),
span_notice("[user] uses [tool] to perform an autopsy on [target]."),
span_notice("[user] uses [tool] on [target]'s chest."),
)
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, 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)
return ..()
/datum/surgery_step/autopsy/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(
user,
target,
span_warning("You screw up, bruising [target]'s chest!"),
span_warning("[user] screws up, brusing [target]'s chest!"),
span_warning("[user] screws up!"),
)
target.adjustBruteLoss(5)