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

Operations That Cannot Fail Should Use Lowest Quality Medicine #35

Open
maarxx opened this issue Dec 5, 2020 · 3 comments
Open

Operations That Cannot Fail Should Use Lowest Quality Medicine #35

maarxx opened this issue Dec 5, 2020 · 3 comments

Comments

@maarxx
Copy link

maarxx commented Dec 5, 2020

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)
@maarxx
Copy link
Author

maarxx commented Dec 8, 2020

Addressed in #36

@maarxx maarxx changed the title Operation: Anesthesia Should Always Use Lowest Medicine Operations That Cannot Fail Should Use Lowest Quality Medicine Apr 29, 2023
@maarxx
Copy link
Author

maarxx commented Apr 29, 2023

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

@maarxx
Copy link
Author

maarxx commented Apr 29, 2023

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant