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

[OPToxic] Obsolete StatDefOf.ToxicResistance #90

Open
BlueEagle421 opened this issue Apr 9, 2024 · 0 comments
Open

[OPToxic] Obsolete StatDefOf.ToxicResistance #90

BlueEagle421 opened this issue Apr 9, 2024 · 0 comments

Comments

@BlueEagle421
Copy link

BlueEagle421 commented Apr 9, 2024

OPToxicGas class in OPToxic namespace currently uses StatDefOf.ToxicResistance to determine hediff.Severity multiplier. In 1.4 ToxicEnvironmentResistance StatDef was introduced for toxic gases and other toxic environmental damage. Seems more suitable to use that def instead.

ToxicResistance is related only to toxic fallout and seems obsolete for this use case.

In method DoOPToxicGas the severity multiplier could be calculated like this:

float multiplier = 1f - pawn.GetStatValue(StatDefOf.ToxicEnvironmentResistance);

Instead of:

float multiplier = 1f - pawn.GetStatValue(StatDefOf.ToxicResistance);
@BlueEagle421 BlueEagle421 changed the title Obsolete StatDefOf.ToxicResistance [OPToxic] Obsolete StatDefOf.ToxicResistance Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant