RimWorld

RimWorld

Immortals
Kaz 2 Oct, 2020 @ 11:12pm
[Bug] Config settings for non-lethal hediffs do not work as expected. Potential fix Included
@fridgeBaron It appears that individual hediff settings for non-lethal hediffs do not work correctly. Specifically, for the burn hediff, unchecking "Have to cure this condition before revive" causes burns to not heal at all even though they should. The "Can immortals have this condition" check mark does appear to work however.

I've lurked in the Source folder and found a vague potential suspect on line 845 of Source\Settings.cs. It looks like the logic for the canGet hediffSetting is included in a set of braces that the other two, needToCure and healHediff, are not. Perhaps that is the issue? Code reproduced below:

Line 811
if (hediff.lethalSeverity != -1_
{
...
}
else Line 845
{
checkBool = hediffSetting.canGet;
editListing.CheckboxLabeled("IH_editCanGet".Translate(), ref hediffSetting.canGet);
if (checkBool != hediffSetting.canGet)
hediffSetting.changed = true;
}
checkBool = hediffSetting.needToCure;
editListing.CheckboxLabeled("IH_editCureDead".Translate(), ref hediffSetting.needToCure);
if (checkBool != hediffSetting.needToCure)
hediffSetting.changed = true;

checkBool = hediffSetting.healHediff;
editListing.CheckboxLabeled("IH_editHealHediff".Translate(), ref hediffSetting.healHediff);
if (checkBool != hediffSetting.healHediff)
hediffSetting.changed = true;





RW Version: 1.2.2753
Modslist:
Harmony
ModManager
Immortals
< >
Showing 1-1 of 1 comments
Kaz 4 Oct, 2020 @ 2:51pm 
Actually it appears that lethal hediffs config settings are also not applying as expected. I didn't test very thoroughly though and I do not know if it is properly the same issue.
< >
Showing 1-1 of 1 comments
Per page: 1530 50