175 lines
9.7 KiB
C#
175 lines
9.7 KiB
C#
using RimWorld;
|
|
using rjw;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Verse;
|
|
|
|
namespace RJW_Menstruation
|
|
{
|
|
public static class VariousDefOf
|
|
{
|
|
|
|
public static readonly ThingDef CumFilth = DefDatabase<ThingDef>.GetNamed("FilthCum");
|
|
public static readonly ThingDef GirlCumFilth = DefDatabase<ThingDef>.GetNamed("FilthGirlCum");
|
|
public static readonly ThingDef Tampon = DefDatabase<ThingDef>.GetNamed("Absorber_Tampon");
|
|
public static readonly ThingDef Tampon_Dirty = DefDatabase<ThingDef>.GetNamed("Absorber_Tampon_Dirty");
|
|
public static readonly ThingDef FilthMixture = DefDatabase<ThingDef>.GetNamed("FilthMixture");
|
|
public static readonly ThingDef Scyther = DefDatabase<ThingDef>.GetNamed("Mech_Scyther");
|
|
public static readonly HediffDef RJW_IUD = DefDatabase<HediffDef>.GetNamed("RJW_IUD");
|
|
public static readonly HediffDef Hediff_MenstrualCramp = DefDatabase<HediffDef>.GetNamed("Hediff_MenstrualCramp");
|
|
public static readonly HediffDef Hediff_Estrus = DefDatabase<HediffDef>.GetNamed("Hediff_Estrus");
|
|
public static readonly HediffDef Hediff_Estrus_Concealed = DefDatabase<HediffDef>.GetNamed("Hediff_Estrus_Concealed");
|
|
public static readonly HediffDef Hediff_AffectedByPheromones = DefDatabase<HediffDef>.GetNamed("Hediff_AffectedByPheromones");
|
|
public static readonly HediffDef Hediff_ASA = DefDatabase<HediffDef>.GetNamed("Hediff_ASA");
|
|
public static readonly StatDef MaxAbsorbable = DefDatabase<StatDef>.GetNamed("MaxAbsorbable");
|
|
public static readonly NeedDef SexNeed = DefDatabase<NeedDef>.GetNamed("Sex");
|
|
public static readonly JobDef VaginaWashing = DefDatabase<JobDef>.GetNamed("VaginaWashing");
|
|
public static readonly JobDef Job_LactateSelf = DefDatabase<JobDef>.GetNamed("LactateSelf");
|
|
public static readonly ThoughtDef LeakingFluids = DefDatabase<ThoughtDef>.GetNamed("LeakingFluids");
|
|
public static readonly ThoughtDef CameInsideF = DefDatabase<ThoughtDef>.GetNamed("CameInsideF");
|
|
public static readonly ThoughtDef CameInsideFLowFert = DefDatabase<ThoughtDef>.GetNamed("CameInsideFLowFert");
|
|
public static readonly ThoughtDef CameInsideFFetish = DefDatabase<ThoughtDef>.GetNamed("CameInsideFFetish");
|
|
public static readonly ThoughtDef CameInsideFFetishSafe = DefDatabase<ThoughtDef>.GetNamed("CameInsideFFetishSafe");
|
|
public static readonly ThoughtDef HaterCameInsideFSafe = DefDatabase<ThoughtDef>.GetNamed("HaterCameInsideFSafe");
|
|
public static readonly ThoughtDef HaterCameInsideF = DefDatabase<ThoughtDef>.GetNamed("HaterCameInsideF");
|
|
public static readonly ThoughtDef HaterCameInsideFEstrus = DefDatabase<ThoughtDef>.GetNamed("HaterCameInsideFEstrus");
|
|
public static readonly ThoughtDef CameInsideM = DefDatabase<ThoughtDef>.GetNamed("CameInsideM");
|
|
public static readonly ThoughtDef HaterCameInsideM = DefDatabase<ThoughtDef>.GetNamed("HaterCameInsideM");
|
|
public static readonly ThoughtDef UnwantedPregnancy = DefDatabase<ThoughtDef>.GetNamed("UnwantedPregnancy");
|
|
public static readonly ThoughtDef UnwantedPregnancyMild = DefDatabase<ThoughtDef>.GetNamed("UnwantedPregnancyMild");
|
|
public static readonly ThoughtDef TookContraceptivePill = DefDatabase<ThoughtDef>.GetNamed("TookContraceptivePill");
|
|
public static readonly ThoughtDef HateTookContraceptivePill = DefDatabase<ThoughtDef>.GetNamed("HateTookContraceptivePill");
|
|
public static readonly ThoughtDef EggRestorationReceived = DefDatabase<ThoughtDef>.GetNamed("EggRestorationReceived");
|
|
public static readonly CompProperties_Menstruation HumanVaginaCompProperties = Genital_Helper.average_vagina.CompProps<CompProperties_Menstruation>();
|
|
public static readonly KeyBindingDef OpenStatusWindowKey = DefDatabase<KeyBindingDef>.GetNamed("OpenStatusWindow");
|
|
public static readonly RecordDef AmountofCreampied = DefDatabase<RecordDef>.GetNamed("AmountofCreampied");
|
|
public static readonly RecordDef AmountofFertilizedEggs = DefDatabase<RecordDef>.GetNamed("AmountofFertilizedEggs");
|
|
public static readonly TaleDef TaleCameInside = DefDatabase<TaleDef>.GetNamed("CameInside");
|
|
|
|
private static List<ThingDef> allraces = null;
|
|
private static List<PawnKindDef> allkinds = null;
|
|
private static HashSet<HediffDef> allvaginas = null;
|
|
private static HashSet<HediffDef> allanuses = null;
|
|
private static HashSet<HediffDef> allbreasts = null;
|
|
private static HashSet<GeneDef> egglayergenes = null;
|
|
|
|
public static List<ThingDef> AllRaces
|
|
{
|
|
get
|
|
{
|
|
if (allraces != null) return allraces;
|
|
allraces = DefDatabase<ThingDef>.AllDefsListForReading.Where(thingdef => thingdef.race?.IsFlesh ?? false).ToList();
|
|
|
|
return allraces;
|
|
}
|
|
}
|
|
public static List<PawnKindDef> AllKinds
|
|
{
|
|
get
|
|
{
|
|
if (allkinds != null) return allkinds;
|
|
allkinds = DefDatabase<PawnKindDef>.AllDefsListForReading.Where(pawnkinddef => pawnkinddef.race != null).ToList();
|
|
|
|
return allkinds;
|
|
}
|
|
}
|
|
public static HashSet<HediffDef> AllVaginas
|
|
{
|
|
get
|
|
{
|
|
if (allvaginas != null) return allvaginas;
|
|
allvaginas = new HashSet<HediffDef>();
|
|
|
|
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;
|
|
}
|
|
}
|
|
public static HashSet<HediffDef> AllAnuses
|
|
{
|
|
get
|
|
{
|
|
if (allanuses != null) return allanuses;
|
|
allanuses = new HashSet<HediffDef>();
|
|
|
|
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;
|
|
}
|
|
}
|
|
public static HashSet<HediffDef> AllBreasts
|
|
{
|
|
get
|
|
{
|
|
if (allbreasts != null) return allbreasts;
|
|
allbreasts = new HashSet<HediffDef>();
|
|
|
|
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;
|
|
}
|
|
}
|
|
public static HashSet<GeneDef> EggLayerGenes
|
|
{
|
|
get
|
|
{
|
|
if (egglayergenes != null) return egglayergenes;
|
|
egglayergenes = DefDatabase<GeneDef>.AllDefsListForReading.Where(geneDef => geneDef.GetModExtension<MenstruationModExtension>()?.disableCycle ?? false).ToHashSet();
|
|
|
|
return egglayergenes;
|
|
}
|
|
}
|
|
|
|
// Defs from Milkable Colonists
|
|
public static readonly HediffDef Hediff_Lactating_Drug = DefDatabase<HediffDef>.GetNamedSilentFail("Lactating_Drug");
|
|
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_Heavy_Lactating_Permanent = DefDatabase<HediffDef>.GetNamedSilentFail("Heavy_Lactating_Permanent");
|
|
public static readonly JobDef Job_LactateSelf_MC = DefDatabase<JobDef>.GetNamedSilentFail("LactateSelf_MC");
|
|
|
|
// Defs from Sexperience Ideology
|
|
public static readonly PreceptDef Pregnancy_Elevated = DefDatabase<PreceptDef>.GetNamedSilentFail("Pregnancy_Elevated");
|
|
public static readonly PreceptDef Pregnancy_Holy = DefDatabase<PreceptDef>.GetNamedSilentFail("Pregnancy_Holy");
|
|
public static readonly PreceptDef Pregnancy_Required = DefDatabase<PreceptDef>.GetNamedSilentFail("Pregnancy_Required");
|
|
// Related thoughts
|
|
public static readonly ThoughtDef CameInsideMIdeo = DefDatabase<ThoughtDef>.GetNamed("CameInsideMIdeo");
|
|
public static readonly ThoughtDef CameInsideFIdeo = DefDatabase<ThoughtDef>.GetNamed("CameInsideFIdeo");
|
|
public static readonly ThoughtDef HaterCameInsideFIdeo = DefDatabase<ThoughtDef>.GetNamed("HaterCameInsideFIdeo");
|
|
public static readonly ThoughtDef HateTookContraceptivePillIdeo = DefDatabase<ThoughtDef>.GetNamed("HateTookContraceptivePillIdeo");
|
|
}
|
|
|
|
}
|