Skip to content

Races with isFlesh = false getting infection messages #63

@cnsguy

Description

@cnsguy

Androids from Android Tiers can get a message about their injuries getting infected (but don't get the actual infection). I believe a harmony patch similar to this could get rid of the entire call, so no more annoying messages:

internal class Infection_Patch
{
    [HarmonyPatch(typeof(HediffComp_Infecter), "CheckMakeInfection")]
    class NoInfection_Patch
    {
        [HarmonyPrefix]
        public static bool Prefix(HediffWithComps ___parent)
        {
            if (___parent.pawn.RaceProps.IsFlesh)
                return false;

            return true;
       }
    }
}

Unfortunately from what I could tell, CE overrides CheckMakeInfection, leading to the patch never being called in the first place. If something like this ever gets upstreamed, I'll nag the CE devs about fixing it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions