Removed the DiseaseGene

This commit is contained in:
Vegapnk 2024-07-03 10:20:57 +02:00
parent bccd258d13
commit c90c9e2c02
4 changed files with 5 additions and 23 deletions

View file

@ -87,7 +87,9 @@ namespace RJW_Genes.Genes.Diseases.Patches
private static bool IsGeneticDiseaseGene(GeneDef geneDef)
{
return geneDef.geneClass.FullName.Contains("DiseaseGene");
if (geneDef == null) return false;
GeneticDiseaseExtension diseaseExt = geneDef.GetModExtension<GeneticDiseaseExtension>();
return diseaseExt != null;
}
private static float LookupDiseaseInfectionChance(GeneDef geneDef)