diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b18307..09b506c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Infections can be - Chances are adjustable per XML per Gene By turning their spread off, you effectively have a set of normal negative genes. +Dead pawns can spread diseases, but cannot receive them. For all you necros out there. *Why???* diff --git a/Source/Genes/Diseases/Patches/Patch_AftersexUtility_TransferGeneticDiseases.cs b/Source/Genes/Diseases/Patches/Patch_AftersexUtility_TransferGeneticDiseases.cs index d7a2e07..6bf8e88 100644 --- a/Source/Genes/Diseases/Patches/Patch_AftersexUtility_TransferGeneticDiseases.cs +++ b/Source/Genes/Diseases/Patches/Patch_AftersexUtility_TransferGeneticDiseases.cs @@ -43,6 +43,11 @@ namespace RJW_Genes.Genes.Diseases.Patches ModLog.Debug($"{infected} is immune to genetic diseases"); return; } + if (infected.Dead) + { + // Dead people can spread, but not receive, diseases. + return; + } foreach (GeneDef disease in GetGeneticDiseaseGenes(infector)) { ModLog.Debug($"Found genetic disease {disease} in {infector}, trying to infect {infected}");