mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-27 17:41:50 +00:00
* Surgery computers tell which tool to use. (#70973) ## About The Pull Request  All surgery step names, displayed in the surgical computer, will now show which tool to use for that step in parentheses. In cases where multiple tools have a 100% success chance, all are listed; if no tool has a 100% chance then the "correct" one is shown. Surgery computers will never display "alternate" tools for surgeries (those with a lower success chance), but this shouldn't be a problem. Surgical computers are _usually_ in places with surgical tools at hand, and NanoTrasen wouldn't want to encourage doing brain surgery with a screwdriver. Y'know, probably. ## Why It's Good For The Game Firstly, this change is particularly helpful to new players. If you have little experience with surgery, it's not always clear which tool you're meant to use for which step. This is especially true for some of the odder surgeries - if you didn't already know, it's not clear at all that "brainwash" means "use a hemostat". While there are certainly guides on the wiki, it's nice to have as much information provided in-game as possible. Secondly, this change brings consistency. A _small_ number of surgical steps (healing broken bones, namely) already do this! I see no reason why this shouldn't be extended to the remaining surgical steps, especially because it's not particularly obtrusive to the surgery computer interface. ## Changelog 🆑 qol: Made surgical computers tell you what tool to use for the current surgical step. /🆑 Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com> * Surgery computers tell which tool to use. Co-authored-by: lizardqueenlexi <105025397+lizardqueenlexi@users.noreply.github.com> Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
87 lines
2.6 KiB
Plaintext
87 lines
2.6 KiB
Plaintext
/datum/surgery/dissection
|
|
name = "Dissection"
|
|
target_mobtypes = list(
|
|
/mob/living/carbon/human,
|
|
/mob/living/carbon/alien,
|
|
)
|
|
possible_locs = list(BODY_ZONE_CHEST)
|
|
requires_real_bodypart = TRUE
|
|
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 (scalpel)"
|
|
time = 16 SECONDS
|
|
implements = list(
|
|
TOOL_SCALPEL = 100,
|
|
/obj/item/melee/energy/sword = 75,
|
|
/obj/item/knife = 65,
|
|
/obj/item/shard = 45,
|
|
/obj/item = 30,
|
|
)
|
|
|
|
/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)
|
|
|
|
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
|