From ef838d1fd31d760057cd2087970c8a123459dcd8 Mon Sep 17 00:00:00 2001 From: Vegapnk Date: Wed, 3 Jul 2024 17:07:42 +0200 Subject: [PATCH] Spread from dead pawns possible --- CHANGELOG.md | 1 + .../Patches/Patch_AftersexUtility_TransferGeneticDiseases.cs | 5 +++++ 2 files changed, 6 insertions(+) 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}");