Files
its-helviandGitHub 26787f1ed2 Fixes operating consoles (#6958)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
<img width="216" alt="Screenshot 2025-01-03 at 11 07 31 PM"
src="https://github.com/user-attachments/assets/a33b7cdc-937c-4247-89bf-4cbec5cf681f"
/>

tgui is loud and it is demanding to know why I would sin against both
nature and god so thoughtlessly
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game

<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

- Surgical consoles should now actually work instead of not recognizing
nearby operating tables.
- Surgical consoles should no longer spam users with organ removal
prompts after opening someone's ribcage.
- Surgery steps now have proper-ish names. 
- I have tried to test this extensively but probably missed something
with surgery on alien species. Hopefully not.

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑
fix: NanoTrasen's engineering teams have concluded an investigation on
the newest line of Vey-Med patient monitoring consoles, augmented with
D-class drone personalities, reportedly "going on strike" mid-surgery.
This has been fixed violently.
fix: Said drone personalities also reportedly urged surgeons to perform
heart transplants and pneumonectomies on healthy patients. This has also
been fixed. Violently.
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
2025-01-10 08:28:09 -08:00

112 lines
5.1 KiB
Plaintext

//////////////////////////////////////////////////////////////////
// SLIME CORE EXTRACTION //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/slime
is_valid_target(mob/living/simple_mob/slime/target)
return istype(target, /mob/living/simple_mob/slime/)
/datum/surgery_step/slime/can_use(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
return target.stat == 2
/datum/surgery_step/slime/cut_flesh
step_name = "Incise"
allowed_tools = list(
/obj/item/surgical/scalpel = 100,
/obj/item/surgical/scalpel_bronze = 90,
/obj/item/surgical/scalpel_primitive = 80,
/obj/item/material/knife = 75,
/obj/item/material/shard = 50,
)
min_duration = 30
max_duration = 50
/datum/surgery_step/slime/cut_flesh/can_use(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
return ..() && istype(target) && target.core_removal_stage == 0
/datum/surgery_step/slime/cut_flesh/begin_step(mob/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting through [target]'s flesh with \the [tool].", \
"You start cutting through [target]'s flesh with \the [tool].")
/datum/surgery_step/slime/cut_flesh/end_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
user.visible_message("<font color=#4F49AF>[user] cuts through [target]'s flesh with \the [tool].</font>", \
"<font color=#4F49AF>You cut through [target]'s flesh with \the [tool], revealing its silky innards.</font>")
target.core_removal_stage = 1
/datum/surgery_step/slime/cut_flesh/fail_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
user.visible_message("<font color='red'>[user]'s hand slips, tearing [target]'s flesh with \the [tool]!</font>", \
"<font color='red'>Your hand slips, tearing [target]'s flesh with \the [tool]!</font>")
/datum/surgery_step/slime/cut_innards
step_name = "Expose core"
allowed_tools = list(
/obj/item/surgical/scalpel = 100, \
/obj/item/surgical/scalpel_bronze = 90, \
/obj/item/surgical/scalpel_primitive = 80, \
/obj/item/material/knife = 75, \
/obj/item/material/shard = 50, \
)
min_duration = 30
max_duration = 50
/datum/surgery_step/slime/cut_innards/can_use(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
return ..() && istype(target) && target.core_removal_stage == 1
/datum/surgery_step/slime/cut_innards/begin_step(mob/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting [target]'s silky innards apart with \the [tool].", \
"You start cutting [target]'s silky innards apart with \the [tool].")
/datum/surgery_step/slime/cut_innards/end_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
user.visible_message("<font color=#4F49AF>[user] cuts [target]'s innards apart with \the [tool], exposing the cores.</font>", \
"<font color=#4F49AF>You cut [target]'s innards apart with \the [tool], exposing the cores.</font>")
target.core_removal_stage = 2
/datum/surgery_step/slime/cut_innards/fail_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
user.visible_message("<font color='red'>[user]'s hand slips, tearing [target]'s innards with \the [tool]!</font>", \
"<font color='red'>Your hand slips, tearing [target]'s innards with \the [tool]!</font>")
/datum/surgery_step/slime/saw_core
step_name = "Extract core"
allowed_tools = list(
/obj/item/surgical/circular_saw = 100, \
/obj/item/surgical/saw_bronze = 90, \
/obj/item/surgical/saw_primitive = 80, \
/obj/item/material/knife/machete/hatchet = 75
)
min_duration = 50
max_duration = 70
/datum/surgery_step/slime/saw_core/can_use(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
return ..() && (istype(target) && target.core_removal_stage == 2 && target.cores > 0) //This is being passed a human as target, unsure why.
/datum/surgery_step/slime/saw_core/begin_step(mob/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting out one of [target]'s cores with \the [tool].", \
"You start cutting out one of [target]'s cores with \the [tool].")
/datum/surgery_step/slime/saw_core/end_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
target.cores--
user.visible_message("<font color=#4F49AF>[user] cuts out one of [target]'s cores with \the [tool].</font>",, \
"<font color=#4F49AF>You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.</font>")
if(target.cores >= 0)
new target.coretype(target.loc)
if(target.cores <= 0)
target.icon_state = "slime extracted"
/datum/surgery_step/slime/saw_core/fail_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
var/datum/gender/T = GLOB.gender_datums[user.get_visible_gender()]
user.visible_message("<font color='red'>[user]'s hand slips, causing [T.him] to miss the core!</font>", \
"<font color='red'>Your hand slips, causing you to miss the core!</font>")