mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Compare commits
11 commits
f00ec21f9e
...
9b09b7e36a
Author | SHA1 | Date | |
---|---|---|---|
|
9b09b7e36a | ||
|
b5bfec7498 | ||
|
16d17e01d7 | ||
|
514ffdf324 | ||
|
cdfe9b44b8 | ||
|
b21fc85a29 | ||
|
48f020d832 | ||
|
23ae342722 | ||
|
509eeabddc | ||
|
6fabfd6aaf | ||
|
ebbbf8ee7f |
6 changed files with 21 additions and 26 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");
|
||||||
|
|
|
@ -1013,7 +1013,7 @@ namespace RJW_Menstruation
|
||||||
float leakfactor = 1.0f;
|
float leakfactor = 1.0f;
|
||||||
float totalleak = 0f;
|
float totalleak = 0f;
|
||||||
float cumd = TotalCumPercent;
|
float cumd = TotalCumPercent;
|
||||||
List<string> filthlabels = new List<string>();
|
List<string> filthlabels = new List<string>(cums.Count);
|
||||||
BeforeCumOut(out Absorber absorber);
|
BeforeCumOut(out Absorber absorber);
|
||||||
if (cums.NullOrEmpty()) return;
|
if (cums.NullOrEmpty()) return;
|
||||||
if (TotalCum > Props.maxCumCapacity * Pawn.BodySize) leakfactor = Math.Min(1 + (TotalCum - Props.maxCumCapacity * Pawn.BodySize) / 10, 2f);
|
if (TotalCum > Props.maxCumCapacity * Pawn.BodySize) leakfactor = Math.Min(1 + (TotalCum - Props.maxCumCapacity * Pawn.BodySize) / 10, 2f);
|
||||||
|
@ -1045,10 +1045,10 @@ namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
if (cums.NullOrEmpty()) return 0;
|
if (cums.NullOrEmpty()) return 0;
|
||||||
float totalleak = 0;
|
float totalleak = 0;
|
||||||
List<string> filthlabels = new List<string>();
|
List<string> filthlabels = new List<string>(cums.Count);
|
||||||
float outcum = 0;
|
float outcum = 0;
|
||||||
float cumd = TotalCumPercent;
|
float cumd = TotalCumPercent;
|
||||||
HashSet<Cum> removecums = new HashSet<Cum>();
|
HashSet<Cum> removecums = new HashSet<Cum>(cums.Count);
|
||||||
foreach (Cum cum in cums)
|
foreach (Cum cum in cums)
|
||||||
{
|
{
|
||||||
float vd = cum.DismishForce(portion);
|
float vd = cum.DismishForce(portion);
|
||||||
|
@ -1079,8 +1079,8 @@ namespace RJW_Menstruation
|
||||||
if (cums.NullOrEmpty()) return null;
|
if (cums.NullOrEmpty()) return null;
|
||||||
Color color = GetCumMixtureColor;
|
Color color = GetCumMixtureColor;
|
||||||
float totalleak = 0;
|
float totalleak = 0;
|
||||||
List<string> cumlabels = new List<string>();
|
List<string> cumlabels = new List<string>(cums.Count);
|
||||||
HashSet<Cum> removecums = new HashSet<Cum>();
|
HashSet<Cum> removecums = new HashSet<Cum>(cums.Count);
|
||||||
bool pure = true;
|
bool pure = true;
|
||||||
foreach (Cum cum in cums)
|
foreach (Cum cum in cums)
|
||||||
{
|
{
|
||||||
|
@ -1370,7 +1370,7 @@ namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
if (eggs.NullOrEmpty()) return false;
|
if (eggs.NullOrEmpty()) return false;
|
||||||
|
|
||||||
HashSet<Egg> deadeggs = new HashSet<Egg>();
|
HashSet<Egg> deadeggs = new HashSet<Egg>(eggs.Count);
|
||||||
bool pregnant = false;
|
bool pregnant = false;
|
||||||
foreach (Egg egg in eggs)
|
foreach (Egg egg in eggs)
|
||||||
{
|
{
|
||||||
|
@ -1574,7 +1574,7 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
protected void EggDecay()
|
protected void EggDecay()
|
||||||
{
|
{
|
||||||
HashSet<Egg> deadeggs = new HashSet<Egg>();
|
HashSet<Egg> deadeggs = new HashSet<Egg>(eggs.Count);
|
||||||
foreach (Egg egg in eggs)
|
foreach (Egg egg in eggs)
|
||||||
{
|
{
|
||||||
egg.ageTicks += TickInterval * Configurations.CycleAcceleration;
|
egg.ageTicks += TickInterval * Configurations.CycleAcceleration;
|
||||||
|
|
|
@ -87,14 +87,10 @@ namespace RJW_Menstruation
|
||||||
PawnUtility.TrySpawnHatchedOrBornPawn(baby, mother);
|
PawnUtility.TrySpawnHatchedOrBornPawn(baby, mother);
|
||||||
|
|
||||||
Need_Sex sex_need = mother.needs?.TryGetNeed<Need_Sex>();
|
Need_Sex sex_need = mother.needs?.TryGetNeed<Need_Sex>();
|
||||||
if (mother.Faction != null && !(mother.Faction?.IsPlayer ?? false) && sex_need != null)
|
|
||||||
{
|
|
||||||
sex_need.CurLevel = 1.0f;
|
|
||||||
}
|
|
||||||
if (mother.Faction != null)
|
if (mother.Faction != null)
|
||||||
{
|
{
|
||||||
if (mother.Faction != baby.Faction)
|
if (!mother.Faction.IsPlayer && sex_need != null) sex_need.CurLevel = 1.0f;
|
||||||
baby.SetFaction(mother.Faction);
|
if (mother.Faction != baby.Faction) baby.SetFaction(mother.Faction);
|
||||||
}
|
}
|
||||||
if (mother.IsSlaveOfColony)
|
if (mother.IsSlaveOfColony)
|
||||||
{
|
{
|
||||||
|
@ -149,14 +145,10 @@ namespace RJW_Menstruation
|
||||||
PawnUtility.TrySpawnHatchedOrBornPawn(baby, mother);
|
PawnUtility.TrySpawnHatchedOrBornPawn(baby, mother);
|
||||||
|
|
||||||
Need_Sex sex_need = mother.needs?.TryGetNeed<Need_Sex>();
|
Need_Sex sex_need = mother.needs?.TryGetNeed<Need_Sex>();
|
||||||
if (mother.Faction != null && !(mother.Faction?.IsPlayer ?? false) && sex_need != null)
|
|
||||||
{
|
|
||||||
sex_need.CurLevel = 1.0f;
|
|
||||||
}
|
|
||||||
if (mother.Faction != null)
|
if (mother.Faction != null)
|
||||||
{
|
{
|
||||||
if (mother.Faction != baby.Faction)
|
if (!mother.Faction.IsPlayer && sex_need != null) sex_need.CurLevel = 1.0f;
|
||||||
baby.SetFaction(mother.Faction);
|
if (mother.Faction != baby.Faction) baby.SetFaction(mother.Faction);
|
||||||
}
|
}
|
||||||
|
|
||||||
Train(baby, mother);
|
Train(baby, mother);
|
||||||
|
|
|
@ -217,7 +217,7 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
if (info != null)
|
if (info != null)
|
||||||
{
|
{
|
||||||
res = info.GetHybridWith(opposite.def.defName) ?? null;
|
res = info.GetHybridWith(opposite.def.defName);
|
||||||
}
|
}
|
||||||
if (res != null) return res;
|
if (res != null) return res;
|
||||||
|
|
||||||
|
@ -226,14 +226,14 @@ namespace RJW_Menstruation
|
||||||
dna = first.def.GetModExtension<PawnDNAModExtension>();
|
dna = first.def.GetModExtension<PawnDNAModExtension>();
|
||||||
if (dna != null)
|
if (dna != null)
|
||||||
{
|
{
|
||||||
res = dna.GetHybridWith(second.def.defName) ?? null;
|
res = dna.GetHybridWith(second.def.defName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dna = second.def.GetModExtension<PawnDNAModExtension>();
|
dna = second.def.GetModExtension<PawnDNAModExtension>();
|
||||||
if (dna != null)
|
if (dna != null)
|
||||||
{
|
{
|
||||||
res = dna.GetHybridWith(first.def.defName) ?? null;
|
res = dna.GetHybridWith(first.def.defName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
public PawnKindDef GetHybridWith(string race)
|
public PawnKindDef GetHybridWith(string race)
|
||||||
{
|
{
|
||||||
return GetHybridExtension(race)?.ChooseOne() ?? null;
|
return GetHybridExtension(race)?.ChooseOne();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
public PawnKindDef GetHybridWith(string race)
|
public PawnKindDef GetHybridWith(string race)
|
||||||
{
|
{
|
||||||
return GetHybridExtension(race)?.ChooseOne() ?? null;
|
return GetHybridExtension(race)?.ChooseOne();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ExposeData()
|
public void ExposeData()
|
||||||
|
|
Loading…
Reference in a new issue