diff --git a/1.5/Assemblies/RJW_Menstruation.dll b/1.5/Assemblies/RJW_Menstruation.dll index 10ddb96..dc9122f 100644 Binary files a/1.5/Assemblies/RJW_Menstruation.dll and b/1.5/Assemblies/RJW_Menstruation.dll differ diff --git a/1.5/source/RJW_Menstruation/RJW_Menstruation/Compatibility/VECompatibility.cs b/1.5/source/RJW_Menstruation/RJW_Menstruation/Compatibility/VECompatibility.cs deleted file mode 100644 index b8ab374..0000000 --- a/1.5/source/RJW_Menstruation/RJW_Menstruation/Compatibility/VECompatibility.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Linq; -using VanillaGenesExpanded; -using Verse; - -namespace RJW_Menstruation -{ - public static class VECompatibility - { - public static ThingDef VEGeneBloodDef(Pawn pawn) - { - if (!ModsConfig.BiotechActive) return null; - foreach(Gene gene in pawn.genes.GenesListForReading.Where(gene => gene.Active)) - { - ThingDef bloodDef = gene.def.GetModExtension()?.customBloodThingDef; - if (bloodDef != null) return bloodDef; - } - return null; - } - } -} diff --git a/1.5/source/RJW_Menstruation/RJW_Menstruation/Configurations.cs b/1.5/source/RJW_Menstruation/RJW_Menstruation/Configurations.cs index 5fcb4f9..72724c0 100644 --- a/1.5/source/RJW_Menstruation/RJW_Menstruation/Configurations.cs +++ b/1.5/source/RJW_Menstruation/RJW_Menstruation/Configurations.cs @@ -122,7 +122,6 @@ namespace RJW_Menstruation public static bool HARActivated = false; - public static bool VEFActivated = false; public static bool AnimalGeneticsActivated = false; public enum DetailLevel @@ -278,7 +277,6 @@ namespace RJW_Menstruation if (!ModsConfig.BiotechActive && Configurations.PregnancySource == Configurations.PregnancyType.Biotech) Configurations.PregnancySource = Configurations.PregnancyType.MultiplePregnancy; Configurations.HARActivated = ModsConfig.IsActive("erdelf.HumanoidAlienRaces"); - Configurations.VEFActivated = ModsConfig.IsActive("oskarpotocki.vanillafactionsexpanded.core"); Configurations.AnimalGeneticsActivated = ModsConfig.IsActive("Mlie.AnimalGenetics"); } diff --git a/1.5/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs b/1.5/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs index d70909d..ffb4296 100644 --- a/1.5/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs +++ b/1.5/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs @@ -554,7 +554,8 @@ namespace RJW_Menstruation { try { - return Utility.BloodDef(Pawn).graphicData.color; + Color c = Pawn.RaceProps.BloodDef.graphicData.color; + return c; } catch { diff --git a/1.5/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PregeneratedBabies.cs b/1.5/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PregeneratedBabies.cs index e687cb7..ef877e1 100644 --- a/1.5/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PregeneratedBabies.cs +++ b/1.5/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PregeneratedBabies.cs @@ -161,13 +161,6 @@ namespace RJW_Menstruation } } } - - public void Miscarried() - { - if (babies == null) return; - foreach (Pawn baby in babies) - baby.Destroy(DestroyMode.Vanish); - } } [HarmonyPatch(typeof(PregnancyUtility), nameof(PregnancyUtility.ApplyBirthOutcome_NewTemp))] diff --git a/1.5/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs b/1.5/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs index e8d6939..a84bb1a 100644 --- a/1.5/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs +++ b/1.5/source/RJW_Menstruation/RJW_Menstruation/Hediff_MultiplePregnancy.cs @@ -38,9 +38,6 @@ namespace RJW_Menstruation public override void Miscarry() { this.GetMenstruationCompFromPregnancy().Pregnancy = null; - if (babies != null) - foreach (var baby in babies) - baby.Destroy(DestroyMode.Vanish); base.Miscarry(); } diff --git a/1.5/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs b/1.5/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs index f9525df..7f5468f 100644 --- a/1.5/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs +++ b/1.5/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs @@ -14,11 +14,9 @@ namespace RJW_Menstruation { public static void Postfix(Hediff_Pregnant __instance) { - HediffComp_PregeneratedBabies babiesComp = __instance.TryGetComp(); - if (babiesComp != null) babiesComp.Miscarried(); - - HediffComp_Menstruation menstruationComp = __instance.GetMenstruationCompFromPregnancy(); - if (menstruationComp != null) menstruationComp.Pregnancy = null; + HediffComp_Menstruation comp = __instance.GetMenstruationCompFromPregnancy(); + if (comp == null) return; + comp.Pregnancy = null; } } diff --git a/1.5/source/RJW_Menstruation/RJW_Menstruation/RJW_Menstruation.csproj b/1.5/source/RJW_Menstruation/RJW_Menstruation/RJW_Menstruation.csproj index eaddf37..cef7a71 100644 --- a/1.5/source/RJW_Menstruation/RJW_Menstruation/RJW_Menstruation.csproj +++ b/1.5/source/RJW_Menstruation/RJW_Menstruation/RJW_Menstruation.csproj @@ -61,7 +61,6 @@ - @@ -160,10 +159,6 @@ ..\..\..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.UIModule.dll False - - ..\..\..\..\..\..\..\..\workshop\content\294100\2023507013\1.5\Assemblies\VFECore.dll - False - diff --git a/1.5/source/RJW_Menstruation/RJW_Menstruation/Utility.cs b/1.5/source/RJW_Menstruation/RJW_Menstruation/Utility.cs index 87401eb..dfa13d5 100644 --- a/1.5/source/RJW_Menstruation/RJW_Menstruation/Utility.cs +++ b/1.5/source/RJW_Menstruation/RJW_Menstruation/Utility.cs @@ -457,21 +457,5 @@ namespace RJW_Menstruation return Color.white; } } - public static ThingDef BloodDef(Pawn pawn) - { - if (pawn == null) return ThingDefOf.Filth_Blood; - ThingDef bloodDef = null; - if (Configurations.VEFActivated) bloodDef = VECompatibility.VEGeneBloodDef(pawn); - if (bloodDef != null) return bloodDef; - if (pawn.Dead && pawn.IsShambler) return MutantDefOf.Shambler.bloodDef; - if (pawn.IsMutant) - { - ThingDef mutantBloodDef = pawn.mutant.Def.bloodDef; - if (mutantBloodDef != null) return mutantBloodDef; - } - bloodDef = pawn.RaceProps?.BloodDef; - if (bloodDef != null) return bloodDef; - return ThingDefOf.Filth_Blood; - } } } diff --git a/changelogs.txt b/changelogs.txt index cbe7819..69522ab 100644 --- a/changelogs.txt +++ b/changelogs.txt @@ -3,7 +3,6 @@ Version 1.5.0.0 - Updated Traditional Chinese translation by Hydrogen. - Added Russian translation by Angra Mainyu. - Inactive genes will no longer be applied to wombs. - - Menstrual blood will now use blood colors from Vanilla Expanded Genes. - Fix babies becoming the wrong pawnkind in some scenarios. Version 1.0.9.4