Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add surgical cleanliness and sanitation #2847

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sowelipililimute
Copy link
Contributor

@sowelipililimute sowelipililimute commented Feb 1, 2025

About the PR

  • surgical tools and gloves can now get dirty and require sanitization
  • soap can be used to sanitize surgical tools slowly

Why / Balance

  • surgery is very low-committal and LRP-feeling as it is, requiring tools to be sanitized makes more of a commitment required to do surgery well and adds a mechanical basis for surgeons to care about sanitation
  • this was balanced around the assumption that you'd probably want to change your gloves and tools after a part transplant, so all of the steps involved in a heart surgery add up to ~50 dirtiness, after which point poison damage will start to happen if all of that dirtiness went to a single pair of gloves and a tool
  • surgical steps have a maximum cap on how much poison damage they can do at once, in order to prevent a 5000 dirtiness scalpel from instantly round removing someone after an incision
  • cross-contamination between patients is a big no-no, and adds a ton of dirtiness to the calculations

Technical details

  • components
    • SurgeryCleansDirtComponent: add it to items to allow them to sanitize tools and gloves manually
    • SurgeryCrossContaminationComponent: keeps track of other patients' DNA that has been on this tool
    • SurgeryContaminableComponent: add it to mobs that need to react to having (un)sanitary surgery equipment used on them
    • SurgeryDirtinessComponent: keeps track of how dirty a component is after surgery
    • SurgeryStepDirtinessComponent: add it to surgery steps to adjust how much dirtiness they cause after a step is done
  • systems
    • SurgeryCleanSystem: new system that handles the examination of dirtied items and of scrubbing them with soap
    • SurgerySystem: augmented with sanitization checks after a step is completed in order to dirty involved tools and to deal damage if they're too dirty
  • base mob now has SurgeryContaminableComponent
  • base soap now has SurgeryCleansDirt
  • surgery steps now have SurgeryStepDirtiness

Media

grafik
grafik

mothdirty.mp4

Requirements

  • I have tested all added content and changes.
  • I have added media to this PR or it does not require an ingame showcase.

After This PR

This PR has follow-up opportunities, such as adding an autoclave or other methods for sanitizing tools and gloves faster than soaps do

Changelog

🆑

  • add: Surgical gloves and equipment can now get dirty and require sanitzation

@sowelipililimute sowelipililimute requested review from a team as code owners February 1, 2025 23:49
@github-actions github-actions bot added S: Needs Review size/L 256-1023 lines Changes: YML Changes any yml files Changes: C# Changes any cs files Changes: Localization Changes any ftl files labels Feb 1, 2025
@Avalon-Proto
Copy link
Contributor

Question - the advanced tools. As they are all energy based, should get dirty slower no? Or at the very least the searing tool and energy scalpel

@sowelipililimute
Copy link
Contributor Author

Question - the advanced tools. As they are all energy based, should get dirty slower no? Or at the very least the searing tool and energy scalpel

that could make sense

Content.Server/_DV/Surgery/SurgeryCleanSystem.cs Outdated Show resolved Hide resolved
Content.Server/_DV/Surgery/SurgeryCleanSystem.cs Outdated Show resolved Hide resolved
Content.Shared/_DV/Surgery/SurgeryDirtinessComponent.cs Outdated Show resolved Hide resolved
Content.Shared/_DV/Surgery/SurgeryContaminableComponent.cs Outdated Show resolved Hide resolved
Resources/Locale/en-US/_DV/surgery/cleanliness.ftl Outdated Show resolved Hide resolved
Copy link
Member

@deltanedas deltanedas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@Lyndomen
Copy link
Contributor

Lyndomen commented Feb 2, 2025

Direction review, 24 hours!

@sowelipililimute sowelipililimute force-pushed the work/jblackquill/surgical-cleanliness branch 3 times, most recently from 3ba9c77 to 1798497 Compare February 2, 2025 22:57
Lyndomen
Lyndomen previously approved these changes Feb 3, 2025
Copy link
Contributor

@Lyndomen Lyndomen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Direction Approved! We really appreciate your work here, and how toxin damage is now less of a boolean factor in the equation.

Copy link
Member

@deltanedas deltanedas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. move everything to shared, popups and doafter have shared systems
  2. make doafter time scale with dirtness or be repeating and only remove a small amount of dirt per shorter doafter. same time to clean near-sterile and filthy tools is bad

@sowelipililimute
Copy link
Contributor Author

move everything to shared, popups and doafter have shared systems

DNA is fully server-sided, and DNA needs to be tested for in order to see if there's something to be sanitized. most everything else is already in shared.

@deltanedas
Copy link
Member

deltanedas commented Feb 3, 2025

so have the dna specific part in server only

no reason for interaction and stuff to be in server

@sowelipililimute
Copy link
Contributor Author

so what exactly happens if client doesn't think the verb can be done but the server does because the server sees extant DNA that the client can't?

@sowelipililimute
Copy link
Contributor Author

make doafter time scale with dirtness or be repeating and only remove a small amount of dirt per shorter doafter. same time to clean near-sterile and filthy tools is bad

also i'm curious how you expect that to incorporate into the current model where it daisychains to the forensics scrubbing after completing the doafter

@deltanedas
Copy link
Member

doafter repeating can still be used regardless of the forensics code in server its a field on do after args

@sowelipililimute
Copy link
Contributor Author

i don't mean the normal forensics code that runs when you touch an item, i mean the fact that at the moment we want the sterilisation to daisychain to forensics because if you sterilise something medically you've probably nuked all the evidence too, and that's what it currently does

@deltanedas
Copy link
Member

yes you can still call that in a virtual method that does the forensic event on server

@sowelipililimute
Copy link
Contributor Author

not asking about moving it to shared, I'm asking about how I'm supposed to mix "a surgery doafter is partial and can take 10ticks vs forensics taking 100ticks in a single go"

@deltanedas
Copy link
Member

just have it remove forensics on first doafter, you can use soap to remove it anyway so theres no "exploit"

@sowelipililimute
Copy link
Contributor Author

relocated the logic into shared, it is now a repeating doafter

Content.Server/_DV/Surgery/SurgeryCleanSystem.cs Outdated Show resolved Hide resolved
Content.Server/_DV/Surgery/SurgeryCleanSystem.cs Outdated Show resolved Hide resolved
Content.Client/_DV/Surgery/SurgeryCleanSystem.cs Outdated Show resolved Hide resolved
Content.Shared/_DV/Surgery/SurgeryCleanedEvent.cs Outdated Show resolved Hide resolved
Content.Shared/_DV/Surgery/SurgeryContaminableComponent.cs Outdated Show resolved Hide resolved
Content.Shared/_DV/Surgery/SurgeryDirtinessComponent.cs Outdated Show resolved Hide resolved
Content.Shared/_DV/Surgery/SurgeryDirtinessComponent.cs Outdated Show resolved Hide resolved
Content.Shared/_DV/Surgery/SurgeryDirtinessEvent.cs Outdated Show resolved Hide resolved
@sowelipililimute sowelipililimute force-pushed the work/jblackquill/surgical-cleanliness branch from 6b25f10 to 76f281b Compare February 5, 2025 15:42
Copy link
Member

@deltanedas deltanedas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more comments still need changing to not be all on 1 line...

@sowelipililimute sowelipililimute force-pushed the work/jblackquill/surgical-cleanliness branch from 76f281b to bff75f6 Compare February 5, 2025 17:13
@sowelipililimute
Copy link
Contributor Author

that's all of them now for realsies

Copy link
Member

@deltanedas deltanedas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont trust the popups, ill test it out later

@sowelipililimute sowelipililimute force-pushed the work/jblackquill/surgical-cleanliness branch from bff75f6 to c293373 Compare February 5, 2025 20:21
Lyndomen
Lyndomen previously approved these changes Feb 5, 2025
@sowelipililimute
Copy link
Contributor Author

popups are fixed

@sowelipililimute sowelipililimute force-pushed the work/jblackquill/surgical-cleanliness branch from 1700b67 to 6416707 Compare February 5, 2025 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: C# Changes any cs files Changes: Localization Changes any ftl files Changes: YML Changes any yml files S: Needs Review size/L 256-1023 lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants