mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Compare commits
11 commits
07c5d0344f
...
9a3826994c
Author | SHA1 | Date | |
---|---|---|---|
|
9a3826994c | ||
|
f1b9d77ef0 | ||
|
cf6fd77ea8 | ||
|
4a41bb69f4 | ||
|
cdfe9b44b8 | ||
|
b21fc85a29 | ||
|
48f020d832 | ||
|
23ae342722 | ||
|
509eeabddc | ||
|
6fabfd6aaf | ||
|
ebbbf8ee7f |
7 changed files with 28 additions and 61 deletions
|
@ -276,7 +276,10 @@ namespace RJW_Menstruation
|
||||||
float res = 0;
|
float res = 0;
|
||||||
if (VariousDefOf.Hediff_Heavy_Lactating_Permanent != null)
|
if (VariousDefOf.Hediff_Heavy_Lactating_Permanent != null)
|
||||||
{
|
{
|
||||||
if (pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Heavy_Lactating_Permanent)) milkcomp = pawn.AllComps.FirstOrDefault(x => x.GetType().ToString().ToLower().Contains("hypermilkable"));
|
if (pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Heavy_Lactating_Permanent)
|
||||||
|
|| pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Lactating_Permanent)
|
||||||
|
|| pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Lactating_Natural)
|
||||||
|
|| pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Lactating_Drug)) milkcomp = pawn.AllComps.FirstOrDefault(x => x.GetType().ToString().ToLower().Contains("milkablehuman"));
|
||||||
else milkcomp = pawn.AllComps.FirstOrDefault(x => x.GetType().ToString().ToLower().Contains("milkable"));
|
else milkcomp = pawn.AllComps.FirstOrDefault(x => x.GetType().ToString().ToLower().Contains("milkable"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -158,7 +158,7 @@ namespace RJW_Menstruation
|
||||||
public static readonly HediffDef Hediff_Lactating_Natural = DefDatabase<HediffDef>.GetNamedSilentFail("Lactating_Natural");
|
public static readonly HediffDef Hediff_Lactating_Natural = DefDatabase<HediffDef>.GetNamedSilentFail("Lactating_Natural");
|
||||||
public static readonly HediffDef Hediff_Lactating_Permanent = DefDatabase<HediffDef>.GetNamedSilentFail("Lactating_Permanent");
|
public static readonly HediffDef Hediff_Lactating_Permanent = DefDatabase<HediffDef>.GetNamedSilentFail("Lactating_Permanent");
|
||||||
public static readonly HediffDef Hediff_Heavy_Lactating_Permanent = DefDatabase<HediffDef>.GetNamedSilentFail("Heavy_Lactating_Permanent");
|
public static readonly HediffDef Hediff_Heavy_Lactating_Permanent = DefDatabase<HediffDef>.GetNamedSilentFail("Heavy_Lactating_Permanent");
|
||||||
public static readonly JobDef Job_LactateSelf_MC = DefDatabase<JobDef>.GetNamedSilentFail("LactateSelf_MC");
|
public static readonly JobDef Job_LactateSelf_MC = DefDatabase<JobDef>.GetNamedSilentFail("MilkSelf");
|
||||||
|
|
||||||
// Defs from Sexperience Ideology
|
// Defs from Sexperience Ideology
|
||||||
public static readonly PreceptDef Pregnancy_Elevated = DefDatabase<PreceptDef>.GetNamedSilentFail("Pregnancy_Elevated");
|
public static readonly PreceptDef Pregnancy_Elevated = DefDatabase<PreceptDef>.GetNamedSilentFail("Pregnancy_Elevated");
|
||||||
|
|
Binary file not shown.
|
@ -16,19 +16,8 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
public static void CopyHARProperties(Pawn baby, Pawn original)
|
public static void CopyHARProperties(Pawn baby, Pawn original)
|
||||||
{
|
{
|
||||||
AlienPartGenerator.AlienComp babyHARComp = baby?.TryGetComp<AlienPartGenerator.AlienComp>();
|
if (!baby.HasComp<AlienPartGenerator.AlienComp>() || !original.HasComp<AlienPartGenerator.AlienComp>()) return;
|
||||||
AlienPartGenerator.AlienComp originalHARComp = original?.TryGetComp<AlienPartGenerator.AlienComp>();
|
AlienPartGenerator.AlienComp.CopyAlienData(original, baby);
|
||||||
if (babyHARComp == null || originalHARComp == null) return;
|
|
||||||
|
|
||||||
babyHARComp.addonVariants = new List<int>(originalHARComp.addonVariants);
|
|
||||||
foreach (KeyValuePair<string, AlienPartGenerator.ExposableValueTuple<Color, Color>> channel in originalHARComp.ColorChannels)
|
|
||||||
{
|
|
||||||
babyHARComp.OverwriteColorChannel(channel.Key, channel.Value.first, channel.Value.second);
|
|
||||||
}
|
|
||||||
babyHARComp.headVariant = originalHARComp.headVariant;
|
|
||||||
babyHARComp.bodyVariant = originalHARComp.bodyVariant;
|
|
||||||
babyHARComp.headMaskVariant = originalHARComp.headMaskVariant;
|
|
||||||
babyHARComp.bodyMaskVariant = originalHARComp.bodyMaskVariant;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1517,7 +1517,7 @@ namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
// ~1.5 per hour times acceleration
|
// ~1.5 per hour times acceleration
|
||||||
float bledAmount = Utility.VariationRange(0.03f * Configurations.BleedingAmount * Configurations.CycleAcceleration * HoursBetweenSimulations, 0.5f);
|
float bledAmount = Utility.VariationRange(0.03f * Configurations.BleedingAmount * Configurations.CycleAcceleration * HoursBetweenSimulations, 0.5f);
|
||||||
CumIn(Pawn, bledAmount, Translations.Menstrual_Blood, -5.0f, Pawn.RaceProps?.BloodDef ?? ThingDefOf.Filth_Blood);
|
CumIn(Pawn, bledAmount, Translations.Menstrual_Blood, -5.0f, Utility.BloodDef(Pawn));
|
||||||
Cum blood = GetNotCum(Translations.Menstrual_Blood);
|
Cum blood = GetNotCum(Translations.Menstrual_Blood);
|
||||||
if (blood != null) blood.Color = BloodColor;
|
if (blood != null) blood.Color = BloodColor;
|
||||||
}
|
}
|
||||||
|
|
|
@ -457,6 +457,7 @@ namespace RJW_Menstruation
|
||||||
return Color.white;
|
return Color.white;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ThingDef BloodDef(Pawn pawn)
|
public static ThingDef BloodDef(Pawn pawn)
|
||||||
{
|
{
|
||||||
if (pawn == null) return ThingDefOf.Filth_Blood;
|
if (pawn == null) return ThingDefOf.Filth_Blood;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using RimWorld;
|
using RimWorld;
|
||||||
using rjw;
|
using rjw;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Verse;
|
using Verse;
|
||||||
|
@ -74,26 +75,27 @@ namespace RJW_Menstruation
|
||||||
return allkinds;
|
return allkinds;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private static HashSet<HediffDef> GetCompHashSet(Type type)
|
||||||
|
{
|
||||||
|
HashSet<HediffDef> set = new HashSet<HediffDef>();
|
||||||
|
foreach (HediffDef hediffDef in DefDatabase<HediffDef>.AllDefsListForReading)
|
||||||
|
{
|
||||||
|
if (hediffDef.comps.NullOrEmpty()) continue;
|
||||||
|
foreach (HediffCompProperties comp in hediffDef.comps)
|
||||||
|
if (comp.compClass == type || (comp.compClass?.IsSubclassOf(type) ?? false))
|
||||||
|
{
|
||||||
|
set.Add(hediffDef);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return set;
|
||||||
|
}
|
||||||
public static HashSet<HediffDef> AllVaginas
|
public static HashSet<HediffDef> AllVaginas
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (allvaginas != null) return allvaginas;
|
if (allvaginas != null) return allvaginas;
|
||||||
allvaginas = new HashSet<HediffDef>();
|
allvaginas = GetCompHashSet(typeof(HediffComp_Menstruation));
|
||||||
|
|
||||||
foreach(HediffDef hediffDef in DefDatabase<HediffDef>.AllDefsListForReading)
|
|
||||||
{
|
|
||||||
if (hediffDef.comps.NullOrEmpty()) continue;
|
|
||||||
foreach (HediffCompProperties comp in hediffDef.comps)
|
|
||||||
{
|
|
||||||
if (comp.compClass == typeof(HediffComp_Menstruation) || (comp.compClass?.IsSubclassOf(typeof(HediffComp_Menstruation)) ?? false))
|
|
||||||
{
|
|
||||||
allvaginas.Add(hediffDef);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return allvaginas;
|
return allvaginas;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,21 +104,7 @@ namespace RJW_Menstruation
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (allanuses != null) return allanuses;
|
if (allanuses != null) return allanuses;
|
||||||
allanuses = new HashSet<HediffDef>();
|
allanuses = GetCompHashSet(typeof(HediffComp_Anus));
|
||||||
|
|
||||||
foreach (HediffDef hediffDef in DefDatabase<HediffDef>.AllDefsListForReading)
|
|
||||||
{
|
|
||||||
if (hediffDef.comps.NullOrEmpty()) continue;
|
|
||||||
foreach (HediffCompProperties comp in hediffDef.comps)
|
|
||||||
{
|
|
||||||
if (comp.compClass == typeof(HediffComp_Anus) || (comp.compClass?.IsSubclassOf(typeof(HediffComp_Anus)) ?? false))
|
|
||||||
{
|
|
||||||
allanuses.Add(hediffDef);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return allanuses;
|
return allanuses;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,21 +113,7 @@ namespace RJW_Menstruation
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (allbreasts != null) return allbreasts;
|
if (allbreasts != null) return allbreasts;
|
||||||
allbreasts = new HashSet<HediffDef>();
|
allbreasts = GetCompHashSet(typeof(HediffComp_Breast));
|
||||||
|
|
||||||
foreach(HediffDef hediffDef in DefDatabase<HediffDef>.AllDefsListForReading)
|
|
||||||
{
|
|
||||||
if (hediffDef.comps.NullOrEmpty()) continue;
|
|
||||||
foreach(HediffCompProperties comp in hediffDef.comps)
|
|
||||||
{
|
|
||||||
if (comp.compClass == typeof(HediffComp_Breast) || (comp.compClass?.IsSubclassOf(typeof(HediffComp_Breast)) ?? false))
|
|
||||||
{
|
|
||||||
allbreasts.Add(hediffDef);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return allbreasts;
|
return allbreasts;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue