Files
Bubberstation/code/modules/surgery/operations/operation_autopsy.dm
Aeri 9036e5bd26 Protean surgery and also spellcheck I guess (#5683)
# About The Pull Request
Restores Protean self-surgery, which was broken by the TG surgery system
rework. The rework introduced required_bodytype gating on all mechanical
surgery operations and an OPERATION_SELF_OPERABLE flag requirement for
self-targeting. Protean limbs use BODYTYPE_NANO, which was never added
to any of these checks, leaving Proteans unable to access the synth
flavored surgery operations they're intended to have and locked out of
self-surgery entirely.

The fix adds BODYTYPE_NANO to the required_bodytype of all six
preparatory mechanical operations in operation_generic_mechanic.dm
(unscrew shell, open hatch, screw shell, prepare electronics,
unwrench/wrench endoskeleton) and to the two prosthetic organ/feature
manipulation operations in operation_organ_manip.dm.

Synths were already handled by a prior Nova edit that added
BODYTYPE_SYNTHETIC; this PR extends the same treatment to Proteans and
logs it with a Bubber Edit comment.

As a drive-by shooting fix, I also changed a persistent "Orginal" [sic]
typo in BUBBER/NOVA EDIT comments across six surgery operation files.
These were copied verbatim from the original Nova edit and propagated
into every subsequent edit comment in the directory.

# Why It's Good For The Game
Proteans are a Bubberstation-original species with self-surgery as
intended functionality. The TG surgery rework silently broke this
without any corresponding fix being applied downstream. A surgeon could
still operate on a Protean using organic surgical tools but this is
sub-optimal and annoying.

# Proof Of Testing
Spawned as Protean, laid down on a table, applied surgical drapes,
worked through the full mechanical surgery chain on myself. Do you
really need a screenshot of me laying on a table?


🆑
fix: Protean self-surgery now works correctly after the TG surgery
rework broke it
fix: Surgeons can now use mechanical tools on Proteans as intended,
consistent with Synth behaviour
spellcheck: Fixed "Orginal" typo in NOVA/BUBBER EDIT comments across six
surgery operation files
/🆑
2026-05-26 21:08:50 -04:00

57 lines
2.5 KiB
Plaintext

/datum/surgery_operation/limb/autopsy
name = "autopsy"
rnd_name = "Androtomy (Dissection and Autopsy)"
desc = "Perform a detailed analysis of a deceased patient's body."
implements = list(/obj/item/autopsy_scanner = 1)
time = 10 SECONDS
success_sound = 'sound/machines/printer.ogg'
required_bodytype = (~BODYTYPE_ROBOTIC & ~BODYTYPE_SYNTHETIC) // BUBBER EDIT CHANGE - SYNTH FLAGS -Original: required_bodytype = ~BODYTYPE_ROBOTIC
operation_flags = OPERATION_MORBID | OPERATION_IGNORE_CLOTHES
all_surgery_states_required = SURGERY_SKIN_OPEN
/datum/surgery_operation/limb/autopsy/get_default_radial_image()
return image(/obj/item/autopsy_scanner)
/datum/surgery_operation/limb/autopsy/all_required_strings()
. = list()
. += "operate on chest (target chest)"
. += ..()
. += "the patient must be deceased"
. += "the patient must not have been autopsied prior"
/datum/surgery_operation/limb/autopsy/state_check(obj/item/bodypart/limb)
if(limb.body_zone != BODY_ZONE_CHEST)
return FALSE
if(limb.owner.stat != DEAD)
return FALSE
if(HAS_TRAIT_FROM(limb.owner, TRAIT_DISSECTED, AUTOPSY_TRAIT))
return FALSE
return TRUE
/datum/surgery_operation/limb/autopsy/on_preop(obj/item/bodypart/limb, mob/living/surgeon, obj/item/autopsy_scanner/tool, list/operation_args)
display_results(
surgeon,
limb.owner,
span_notice("You begin performing an autopsy on [limb.owner]..."),
span_notice("[surgeon] uses [tool] to perform an autopsy on [limb.owner]."),
span_notice("[surgeon] uses [tool] on [limb.owner]'s chest."),
)
/datum/surgery_operation/limb/autopsy/on_success(obj/item/bodypart/limb, mob/living/surgeon, obj/item/autopsy_scanner/tool, list/operation_args)
ADD_TRAIT(limb.owner, TRAIT_DISSECTED, AUTOPSY_TRAIT)
ADD_TRAIT(limb.owner, TRAIT_SURGICALLY_ANALYZED, AUTOPSY_TRAIT)
tool.scan_cadaver(surgeon, limb.owner)
var/obj/machinery/computer/operating/operating_computer = locate_operating_computer(limb)
if (!isnull(operating_computer))
SEND_SIGNAL(operating_computer, COMSIG_OPERATING_COMPUTER_AUTOPSY_COMPLETE, limb.owner)
if(HAS_MIND_TRAIT(surgeon, TRAIT_MORBID))
surgeon.add_mood_event("morbid_dissection_success", /datum/mood_event/morbid_dissection_success)
return ..()
/datum/surgery_operation/limb/autopsy/mechanic
name = "system failure analysis"
rnd_name = "System Failure Analysis (Dissection and Autopsy)"
desc = "Perform a detailed analysis of a robotic patient's deactivated systems."
required_bodytype = BODYTYPE_ROBOTIC
operation_flags = parent_type::operation_flags | OPERATION_MECHANIC