Skip to content

Operations That Cannot Fail Should Use Lowest Quality Medicine #35

Description

@maarxx

Operations That Cannot Fail Should Use Lowest Quality Medicine

Currently I think Operation: Anesthesia is treated as any other Operation and uses the highest allowed medicine for such.

But in reality, Anesthesia gains no benefit (I don't think?) from higher quality medicine, and should always try to use lowest / use herbal.

EDIT 2023

There are now more operations which cannot fail and should use the worst medicine, most notably "Implant Xenogerm".

https://discord.com/channels/214523379766525963/215496692047413249/1086128101643255908

Some surgeries cannot fail, like anesthetize and extract hemogen, how is that represented in the code/xml? I cannot find it. My best guess, is it because those recipes don't target a part ... ? It looks like all the failures target a part ... ?

I actually ... I think the answer is the same, right? I see you linked SurgeryOutcomeBase as it is on SurgeryFlesh but RemoveBodyPart and Anesthetize are both ParentName="SurgeryFlesh" and the former can fail and the latter can't and ... as best I can tell ... it's because Anesthetize doesn't target a part ... ? All the bad outcomes are applyEffectsToPart ? This seems true for all SurgeryFlesh except for Biotech fertility surgeries which have a separate addsHediffOnFailure and a separate SurgeryOutcome_FailureWithHediff for Sterilized ?

Like, from mod code, looking at just the RecipeDef with public access, I'm trying to figure out if it can fail, and I think it's:

recipe.IsSurgery && (recipe.addsHediffOnFailure != null || recipe.targetsBodyPart)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions