mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Compare commits
1 commit
07c5d0344f
...
ad0033f249
Author | SHA1 | Date | |
---|---|---|---|
|
ad0033f249 |
10 changed files with 5 additions and 60 deletions
Binary file not shown.
|
@ -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<GeneExtension>()?.customBloodThingDef;
|
|
||||||
if (bloodDef != null) return bloodDef;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -122,7 +122,6 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
|
|
||||||
public static bool HARActivated = false;
|
public static bool HARActivated = false;
|
||||||
public static bool VEFActivated = false;
|
|
||||||
public static bool AnimalGeneticsActivated = false;
|
public static bool AnimalGeneticsActivated = false;
|
||||||
|
|
||||||
public enum DetailLevel
|
public enum DetailLevel
|
||||||
|
@ -278,7 +277,6 @@ namespace RJW_Menstruation
|
||||||
if (!ModsConfig.BiotechActive && Configurations.PregnancySource == Configurations.PregnancyType.Biotech)
|
if (!ModsConfig.BiotechActive && Configurations.PregnancySource == Configurations.PregnancyType.Biotech)
|
||||||
Configurations.PregnancySource = Configurations.PregnancyType.MultiplePregnancy;
|
Configurations.PregnancySource = Configurations.PregnancyType.MultiplePregnancy;
|
||||||
Configurations.HARActivated = ModsConfig.IsActive("erdelf.HumanoidAlienRaces");
|
Configurations.HARActivated = ModsConfig.IsActive("erdelf.HumanoidAlienRaces");
|
||||||
Configurations.VEFActivated = ModsConfig.IsActive("oskarpotocki.vanillafactionsexpanded.core");
|
|
||||||
Configurations.AnimalGeneticsActivated = ModsConfig.IsActive("Mlie.AnimalGenetics");
|
Configurations.AnimalGeneticsActivated = ModsConfig.IsActive("Mlie.AnimalGenetics");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -554,7 +554,8 @@ namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return Utility.BloodDef(Pawn).graphicData.color;
|
Color c = Pawn.RaceProps.BloodDef.graphicData.color;
|
||||||
|
return c;
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|
|
@ -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))]
|
[HarmonyPatch(typeof(PregnancyUtility), nameof(PregnancyUtility.ApplyBirthOutcome_NewTemp))]
|
||||||
|
|
|
@ -38,9 +38,6 @@ namespace RJW_Menstruation
|
||||||
public override void Miscarry()
|
public override void Miscarry()
|
||||||
{
|
{
|
||||||
this.GetMenstruationCompFromPregnancy().Pregnancy = null;
|
this.GetMenstruationCompFromPregnancy().Pregnancy = null;
|
||||||
if (babies != null)
|
|
||||||
foreach (var baby in babies)
|
|
||||||
baby.Destroy(DestroyMode.Vanish);
|
|
||||||
base.Miscarry();
|
base.Miscarry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,9 @@ namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
public static void Postfix(Hediff_Pregnant __instance)
|
public static void Postfix(Hediff_Pregnant __instance)
|
||||||
{
|
{
|
||||||
HediffComp_PregeneratedBabies babiesComp = __instance.TryGetComp<HediffComp_PregeneratedBabies>();
|
HediffComp_Menstruation comp = __instance.GetMenstruationCompFromPregnancy();
|
||||||
if (babiesComp != null) babiesComp.Miscarried();
|
if (comp == null) return;
|
||||||
|
comp.Pregnancy = null;
|
||||||
HediffComp_Menstruation menstruationComp = __instance.GetMenstruationCompFromPregnancy();
|
|
||||||
if (menstruationComp != null) menstruationComp.Pregnancy = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,6 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Compatibility\AnimalGeneticsCompatibility.cs" />
|
<Compile Include="Compatibility\AnimalGeneticsCompatibility.cs" />
|
||||||
<Compile Include="Compatibility\HARCompatibility.cs" />
|
<Compile Include="Compatibility\HARCompatibility.cs" />
|
||||||
<Compile Include="Compatibility\VECompatibility.cs" />
|
|
||||||
<Compile Include="CompBiosculpterPod_EggRestorationCycle.cs" />
|
<Compile Include="CompBiosculpterPod_EggRestorationCycle.cs" />
|
||||||
<Compile Include="Configurations.cs" />
|
<Compile Include="Configurations.cs" />
|
||||||
<Compile Include="Cum.cs" />
|
<Compile Include="Cum.cs" />
|
||||||
|
@ -160,10 +159,6 @@
|
||||||
<HintPath>..\..\..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.UIModule.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.UIModule.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="VFECore">
|
|
||||||
<HintPath>..\..\..\..\..\..\..\..\workshop\content\294100\2023507013\1.5\Assemblies\VFECore.dll</HintPath>
|
|
||||||
<Private>False</Private>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
|
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
|
||||||
|
|
|
@ -457,21 +457,5 @@ namespace RJW_Menstruation
|
||||||
return Color.white;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ Version 1.5.0.0
|
||||||
- Updated Traditional Chinese translation by Hydrogen.
|
- Updated Traditional Chinese translation by Hydrogen.
|
||||||
- Added Russian translation by Angra Mainyu.
|
- Added Russian translation by Angra Mainyu.
|
||||||
- Inactive genes will no longer be applied to wombs.
|
- 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.
|
- Fix babies becoming the wrong pawnkind in some scenarios.
|
||||||
|
|
||||||
Version 1.0.9.4
|
Version 1.0.9.4
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue