Whole bunch of code cleanup, mostly using and whitespace

This commit is contained in:
lutepickle 2022-07-12 15:49:55 -07:00
parent f5170ca700
commit 1907820265
37 changed files with 228 additions and 327 deletions

View file

@ -1,13 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI;
using RimWorld;
using Milk;
using Milk;
using RJW_Menstruation;
using Verse;
namespace MilkModule
{
@ -51,7 +44,7 @@ namespace MilkModule
if (pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Heavy_Lactating_Permanent))
{
result = pawn.TryGetComp<CompHyperMilkableHuman>();
}
else
{
@ -125,6 +118,6 @@ namespace MilkModule
//
//
//}
}

View file

@ -1,14 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Reflection;
using HarmonyLib;
using Verse;
using RimWorld;
using HarmonyLib;
using Milk;
using RJW_Menstruation;
using System.Reflection;
using Verse;
namespace MilkModule
{

View file

@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해

View file

@ -79,7 +79,7 @@ namespace RJW_Menstruation
return NippleTransitionVariance * NippleTransitionSpeed;
}
}
public static void SettoDefault()
{
ImplantationChanceAdjust = ImplantationChanceAdjustDefault;
@ -152,14 +152,14 @@ namespace RJW_Menstruation
{
List<HybridInformations> removeList = new List<HybridInformations>();
if (!HybridOverride.NullOrEmpty())
foreach(HybridInformations o in HybridOverride)
foreach (HybridInformations o in HybridOverride)
{
if (o.IsNull) removeList.Add(o);
if (o.DefName == def.defName) return true;
}
if (!removeList.NullOrEmpty())
{
foreach(HybridInformations o in removeList)
foreach (HybridInformations o in removeList)
{
HybridOverride.Remove(o);
}
@ -226,7 +226,7 @@ namespace RJW_Menstruation
base.ExposeData();
}
}
@ -300,7 +300,7 @@ namespace RJW_Menstruation
{
wombsection.CheckboxLabeled(Translations.Option18_Label, ref Configurations.DrawEggOverlay, Translations.Option18_Desc);
}
wombsection.CheckboxLabeled(Translations.Option10_Label, ref Configurations.DrawVaginaStatus, Translations.Option10_Desc);
wombsection.CheckboxLabeled(Translations.Option29_Label, ref Configurations.AllowShrinkIcon, Translations.Option29_Desc);
if (wombsection.ButtonText(Translations.Option11_Label + ": " + Configurations.LevelString(Configurations.infoDetail)))
@ -353,17 +353,17 @@ namespace RJW_Menstruation
}
Adjust = (int)(Configurations.NippleTransitionVariance * 1000);
wombsection.Label(Translations.Option24_Label + " " + Configurations.NippleTransitionVariance* 100 + " / 100", -1,Translations.Option24_Desc);
Adjust = (int)wombsection.Slider(Adjust,0,1000);
wombsection.Label(Translations.Option24_Label + " " + Configurations.NippleTransitionVariance * 100 + " / 100", -1, Translations.Option24_Desc);
Adjust = (int)wombsection.Slider(Adjust, 0, 1000);
Configurations.NippleTransitionVariance = (float)Adjust / 1000;
Adjust = (int)(Configurations.NipplePermanentTransitionVariance * 1000);
wombsection.Label(Translations.Option25_Label + " " + Configurations.NipplePermanentTransitionVariance*100 + " / 100", -1, Translations.Option25_Desc);
wombsection.Label(Translations.Option25_Label + " " + Configurations.NipplePermanentTransitionVariance * 100 + " / 100", -1, Translations.Option25_Desc);
Adjust = (int)wombsection.Slider(Adjust, 0, 1000);
Configurations.NipplePermanentTransitionVariance = (float)Adjust / 1000;
Adjust = (int)(Configurations.NippleMaximumTransition * 1000);
wombsection.Label(Translations.Option26_Label + " " + Configurations.NippleMaximumTransition* 100 + " / 100", -1, Translations.Option26_Desc);
wombsection.Label(Translations.Option26_Label + " " + Configurations.NippleMaximumTransition * 100 + " / 100", -1, Translations.Option26_Desc);
Adjust = (int)wombsection.Slider(Adjust, 0, 1000);
Configurations.NippleMaximumTransition = (float)Adjust / 1000;

View file

@ -178,7 +178,7 @@ namespace RJW_Menstruation
cumthickness = cumthickness.LerpMultiple(DecayResist, 0.3f, speed);
}
public void MergeWithCum(float volumein, float fertility, ThingDef updatefilthDef = null)
public void MergeWithCum(float volumein, float fertility, ThingDef updatefilthDef = null)
{
if (updatefilthDef != null) filthDef = updatefilthDef;
volume += volumein;
@ -210,11 +210,11 @@ namespace RJW_Menstruation
totalleak -= volume;
return totalleak;
}
public float DismishForce(float portion, float leakfactor = 1.0f)
{
float totalleak = volume;
volume *= Math.Max(0, 1 - (portion * (1 - DecayResist/10)) * leakfactor);
volume *= Math.Max(0, 1 - (portion * (1 - DecayResist / 10)) * leakfactor);
CutMinor();
totalleak -= volume;
return totalleak;
@ -227,9 +227,9 @@ namespace RJW_Menstruation
List<IngestionOutcomeDoer> doers = DNA.ingestionOutcomeDoers;
if (!doers.NullOrEmpty()) for (int i = 0; i < doers.Count; i++)
{
doers[i].DoIngestionOutcome(pawn, CumThing);
}
{
doers[i].DoIngestionOutcome(pawn, CumThing);
}
}
protected void CutMinor()
@ -250,7 +250,7 @@ namespace RJW_Menstruation
cums = new List<string>();
}
public CumMixture(Pawn pawn, float volume, List<string> cums, Color color, ThingDef mixtureDef, bool pure)
public CumMixture(Pawn pawn, float volume, List<string> cums, Color color, ThingDef mixtureDef, bool pure)
{
this.pawn = pawn;
this.volume = volume;
@ -263,7 +263,7 @@ namespace RJW_Menstruation
public void Dispose()
{
cums.Clear();
}
public override void ExposeData()
@ -275,11 +275,11 @@ namespace RJW_Menstruation
public string GetIngredients()
{
string res = "";
if (!cums.NullOrEmpty()) for(int i=0; i<cums.Count; i++)
{
res += cums[i];
if (i < cums.Count - 1) res += ", ";
}
if (!cums.NullOrEmpty()) for (int i = 0; i < cums.Count; i++)
{
res += cums[i];
if (i < cums.Count - 1) res += ", ";
}
return res;
}
}

View file

@ -1,8 +1,7 @@
using System;
using System.Collections.Generic;
using RimWorld;
using Verse;
using RimWorld;
using rjw;
using System.Collections.Generic;
using Verse;
namespace RJW_Menstruation
{
@ -11,7 +10,7 @@ namespace RJW_Menstruation
protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested)
{
foreach (HediffComp_Menstruation comp in pawn.GetMenstruationComps())
if(comp.curStage.Equals(HediffComp_Menstruation.Stage.Follicular)
if (comp.curStage.Equals(HediffComp_Menstruation.Stage.Follicular)
|| comp.curStage.Equals(HediffComp_Menstruation.Stage.Luteal)
|| comp.curStage.Equals(HediffComp_Menstruation.Stage.ClimactericFollicular)
|| comp.curStage.Equals(HediffComp_Menstruation.Stage.ClimactericLuteal)
@ -30,15 +29,15 @@ namespace RJW_Menstruation
protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested)
{
foreach (HediffComp_Menstruation comp in pawn.GetMenstruationComps())
if (comp.curStage.Equals(HediffComp_Menstruation.Stage.Follicular)
|| comp.curStage.Equals(HediffComp_Menstruation.Stage.ClimactericFollicular)
|| comp.curStage.Equals(HediffComp_Menstruation.Stage.Anestrus)
)
{
comp.SetEstrus(comp.Props.eggLifespanDays);
comp.curStage = HediffComp_Menstruation.Stage.Ovulatory;
comp.eggstack += ingested.stackCount - 1;
}
if (comp.curStage.Equals(HediffComp_Menstruation.Stage.Follicular)
|| comp.curStage.Equals(HediffComp_Menstruation.Stage.ClimactericFollicular)
|| comp.curStage.Equals(HediffComp_Menstruation.Stage.Anestrus)
)
{
comp.SetEstrus(comp.Props.eggLifespanDays);
comp.curStage = HediffComp_Menstruation.Stage.Ovulatory;
comp.eggstack += ingested.stackCount - 1;
}
}
}

View file

@ -1,10 +1,10 @@
using Verse;
using rjw;
using rjw;
using rjw.Modules.Interactions.Contexts;
using rjw.Modules.Interactions.Enums;
using rjw.Modules.Interactions.Rules.PartKindUsageRules;
using rjw.Modules.Shared;
using System.Collections.Generic;
using Verse;
namespace RJW_Menstruation.Interactions
{

View file

@ -1,21 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using HugsLib;
using RimWorld;
using UnityEngine;
using HugsLib;
using rjw;
using System;
using System.Collections.Generic;
using UnityEngine;
using Verse;
namespace RJW_Menstruation
{
public class CompProperties_Breast : HediffCompProperties
{
public string BreastTex = "Breasts/Breast";
public ColorInt BlacknippleColor = new ColorInt(55,20,0);
public ColorInt BlacknippleColor = new ColorInt(55, 20, 0);
public Color BlackNippleColor
{
@ -24,7 +21,7 @@ namespace RJW_Menstruation
return BlacknippleColor.ToColor;
}
}
public CompProperties_Breast()
{
@ -174,7 +171,7 @@ namespace RJW_Menstruation
Scribe_Values.Look(ref originareola, "originareola", originareola, true);
Scribe_Values.Look(ref originnipple, "originnipple", originnipple, true);
Scribe_Values.Look(ref pregnant, "pregnant", pregnant, true);
}
public override void CompPostTick(ref float severityAdjustment) { }
@ -216,7 +213,7 @@ namespace RJW_Menstruation
)
youngestAge = parent.pawn.ageTracker.BirthAbsTicks - child.ageTracker.BirthAbsTicks;
}
}
}
return youngestAge;
}
@ -229,10 +226,10 @@ namespace RJW_Menstruation
{
ageOfLastBirth = CalculateLastBirth();
}
if (alphaPermanent < 0f)
{
alphaPermanent = (Utility.RandGaussianLike(0.0f, 0.3f) + Rand.Range(0.0f,0.5f))/2;
alphaPermanent = (Utility.RandGaussianLike(0.0f, 0.3f) + Rand.Range(0.0f, 0.5f)) / 2;
originalpha = alphaPermanent;
alpha = alphaPermanent;
alphaCurrent = alphaPermanent;
@ -256,7 +253,7 @@ namespace RJW_Menstruation
HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(action, TICKINTERVAL, parent.pawn);
}
public void Transition()
{
@ -391,9 +388,9 @@ namespace RJW_Menstruation
{
return "Increase: " + breastSizeIncreased +
"\n" + debugGrowthStatus +
"\nAlpha: " + alpha +
"\nNippleSize: " + nippleSize +
"\nAreolaSize: " + areolaSize +
"\nAlpha: " + alpha +
"\nNippleSize: " + nippleSize +
"\nAreolaSize: " + areolaSize +
"\nAlphaCurrent: " + alphaCurrent +
"\nNippleSizeCurrent: " + nippleSizeCurrent +
"\nAreolaSizeCurrent: " + areolaSizeCurrent +
@ -403,7 +400,7 @@ namespace RJW_Menstruation
"\nAlphaMax: " + MaxAlpha +
"\nNippleSizeMax: " + MaxNipple +
"\nAreolaSizeMax: " + MaxAreola +
"\nPermanentAlpha:" + alphaPermanent +
"\nPermanentAlpha:" + alphaPermanent +
"\nPermanentNipple:" + nippleSizePermanent +
"\nPermanentAreola:" + areolaSizePermanent;
}

View file

@ -1,10 +1,4 @@
using HugsLib;
using RimWorld;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using RimWorld;
using Verse;
namespace RJW_Menstruation

View file

@ -206,10 +206,10 @@ namespace RJW_Menstruation
{
if (cums.NullOrEmpty()) yield return Translations.Info_noCum;
else foreach (Cum cum in cums)
{
if (!cum.notcum) yield return String.Format(cum.pawn?.Label + ": {0:0.##}ml", cum.Volume);
else yield return String.Format(cum.notcumLabel + ": {0:0.##}ml", cum.Volume);
}
{
if (!cum.notcum) yield return String.Format(cum.pawn?.Label + ": {0:0.##}ml", cum.Volume);
else yield return String.Format(cum.notcumLabel + ": {0:0.##}ml", cum.Volume);
}
}
}
public Color GetCumMixtureColor
@ -219,7 +219,7 @@ namespace RJW_Menstruation
Color mixedcolor = Color.white;
if (cums.NullOrEmpty()) return mixedcolor;
float mixedsofar = 0;
foreach (Cum cum in cums)
{
@ -285,7 +285,7 @@ namespace RJW_Menstruation
}
public virtual string GetCurStageDesc
{
get
get
{
switch (CurrentVisibleStage)
{
@ -302,7 +302,7 @@ namespace RJW_Menstruation
case Stage.Recover:
return Translations.Stage_Recover_Desc;
case Stage.None:
case Stage.Young:
case Stage.Young:
return Translations.Stage_None_Desc;
case Stage.ClimactericFollicular:
return Translations.Stage_Follicular_Desc + " " + Translations.Stage_Climacteric_Desc;
@ -814,7 +814,7 @@ namespace RJW_Menstruation
/// <param name="mixtureDef"></param>
/// <param name="portion"></param>
/// <returns></returns>
public CumMixture MixtureOut(ThingDef mixtureDef ,float portion = 0.1f)
public CumMixture MixtureOut(ThingDef mixtureDef, float portion = 0.1f)
{
if (cums.NullOrEmpty()) return null;
Color color = GetCumMixtureColor;
@ -848,7 +848,7 @@ namespace RJW_Menstruation
cums.Clear();
}
/// <summary>
/// Fertilize eggs and return the result
/// </summary>
@ -878,7 +878,7 @@ namespace RJW_Menstruation
loaded = true;
return;
}
if (cycleSpeed < 0f) cycleSpeed = Utility.RandGaussianLike(0.8f, 1.2f);
if (cycleVariability < 0f) cycleVariability = MenstruationUtility.RandomVariabilityPercent();
if (currentIntervalHours < 0)
@ -1085,10 +1085,10 @@ namespace RJW_Menstruation
float mostCum = 0;
Pawn mostCummer = null;
foreach (Cum cum in eligibleCum)
{
if(cum.FertVolume > mostCum)
if (cum.FertVolume > mostCum)
{
mostCum = cum.FertVolume;
mostCummer = cum.pawn;
@ -1098,7 +1098,7 @@ namespace RJW_Menstruation
return mostCummer;
}
protected bool Implant()
{
if (eggs.NullOrEmpty()) return false;
@ -1279,7 +1279,7 @@ namespace RJW_Menstruation
protected virtual void FollicularAction(bool climacteric)
{
if(climacteric && !Configurations.EnableMenopause)
if (climacteric && !Configurations.EnableMenopause)
{
RemoveClimactericEffect();
StayCurrentStage();
@ -1293,7 +1293,7 @@ namespace RJW_Menstruation
{
GoNextStage(Stage.Ovulatory);
}
else if(climacteric && ovarypower < OvaryPowerThreshold / 3 && Rand.Range(0.0f, 1.0f) < 0.2f) //skips ovulatory
else if (climacteric && ovarypower < OvaryPowerThreshold / 3 && Rand.Range(0.0f, 1.0f) < 0.2f) //skips ovulatory
{
GoNextStage(Stage.ClimactericLuteal);
}
@ -1318,11 +1318,11 @@ namespace RJW_Menstruation
{
eggnum = Rand.ByCurve(parent.pawn.RaceProps.litterSizeCurve);
}
catch(NullReferenceException)
catch (NullReferenceException)
{
eggnum = 1;
}
catch(ArgumentException e)
catch (ArgumentException e)
{
Log.Warning($"Invalid litterSizeCurve for {parent.pawn.RaceProps}: {e}");
eggnum = 1;
@ -1410,7 +1410,7 @@ namespace RJW_Menstruation
curStageHrs += Configurations.CycleAcceleration;
StayCurrentStage();
}
}
protected virtual void BleedingAction(bool climacteric)
@ -1467,7 +1467,7 @@ namespace RJW_Menstruation
Breast.BirthTransition();
}
GoNextStage(Stage.Recover);
}
}
}
protected virtual void RecoverAction()
@ -1659,7 +1659,7 @@ namespace RJW_Menstruation
actionref = action;
return actionref;
}

View file

@ -1,12 +1,10 @@
using System;
using RimWorld;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse;
using rjw;
using UnityEngine;
using Verse;
namespace RJW_Menstruation
{
@ -103,7 +101,7 @@ namespace RJW_Menstruation
if (!fucker.RaceHasPregnancy() || !fucked.RaceHasPregnancy()) return false;
if (!Genital_Helper.has_penis_fertile(fucker, fucker.GetGenitalsList())) return false;
if (xxx.is_human(fucked) && xxx.is_human(fucker) && !RJWPregnancySettings.humanlike_pregnancy_enabled) return false;
if (xxx.is_animal(fucker) != xxx.is_animal(fucked) && !RJWPregnancySettings.bestial_pregnancy_enabled) return false;
@ -203,7 +201,7 @@ namespace RJW_Menstruation
else return ContentFinder<Texture2D>.Get("Womb/Empty", true);
}
switch(comp.curStage)
switch (comp.curStage)
{
case HediffComp_Menstruation.Stage.Follicular:
case HediffComp_Menstruation.Stage.ClimactericFollicular:
@ -279,7 +277,7 @@ namespace RJW_Menstruation
{
var hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault((Hediff h) => h.def.defName.ToLower().Contains("anus"));
if (hediff == null) return ContentFinder<Texture2D>.Get(("Genitals/Anal00"), true);
string icon;
float severity;
HediffComp_Anus comp = hediff.GetAnusComp();

View file

@ -75,7 +75,7 @@ namespace RJW_Menstruation
{
if (babies.NullOrEmpty())
return "Null";
string res = "";
var babiesdistinct = babies.Distinct(new RaceComparer());
@ -155,7 +155,7 @@ namespace RJW_Menstruation
baby.relations.AddDirectRelation(PawnRelationDefOf.Sibling, sibling);
}
siblings.Add(baby);
PostBirth(mother, father, baby);
}
@ -302,7 +302,7 @@ namespace RJW_Menstruation
protected void Train(Pawn baby, Pawn mother)
{
if (xxx.is_human(baby) || baby.Faction != Faction.OfPlayer) return;
if (xxx.is_human(mother) && baby.Faction == Faction.OfPlayer && baby.training.CanAssignToTrain(TrainableDefOf.Obedience, out _).Accepted)
{
baby.training.Train(TrainableDefOf.Obedience, mother);
@ -357,7 +357,7 @@ namespace RJW_Menstruation
kind: BabyPawnKindDecider(mother, father),
//fixedIdeo: mother.Ideo,
//forbidAnyTitle: true,
forceNoBackstory:true
forceNoBackstory: true
);
int division = 1;
@ -368,7 +368,7 @@ namespace RJW_Menstruation
string firstheadpath = null;
string firstHARcrown = null;
int traitSeed = Rand.Int;
List <Trait> parentTraits = GetInheritableTraits(mother, father);
List<Trait> parentTraits = GetInheritableTraits(mother, father);
while (Rand.Chance(Configurations.EnzygoticTwinsChance) && division < Configurations.MaxEnzygoticTwins) division++;
for (int i = 0; i < division; i++)
{
@ -638,7 +638,7 @@ namespace RJW_Menstruation
parentTraitPool.RemoveAll(x => x.ScenForced);
int numberInherited;
if (parentTraitPool != null)
numberInherited = System.Math.Min(parentTraitPool.Count(), Rand.RangeInclusive(0,2)); // Not 3; give a better chance for a natural trait to appear
numberInherited = System.Math.Min(parentTraitPool.Count(), Rand.RangeInclusive(0, 2)); // Not 3; give a better chance for a natural trait to appear
else
numberInherited = 0;
@ -669,7 +669,7 @@ namespace RJW_Menstruation
if (!selectedTraits.Any(x => comparer.Equals(x, trait) || // skipping traits conflicting with already added
x.def.ConflictsWith(trait)))
selectedTraits.Add(new Trait(trait.def, trait.Degree, false));
}
pawn.story.traits.allTraits = selectedTraits;

View file

@ -1,24 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using RimWorld;
using Verse;
using rjw;
namespace RJW_Menstruation
{
public class IngestionOutcomeDoer_GiveHediff_StackCount : IngestionOutcomeDoer_GiveHediff
{
protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested)
{
Hediff hediff = HediffMaker.MakeHediff(hediffDef, pawn);
float effect = ((!(severity > 0f)) ? hediffDef.initialSeverity : severity) * ingested.stackCount;
AddictionUtility.ModifyChemicalEffectForToleranceAndBodySize(pawn, toleranceChemical, ref effect);
hediff.Severity = effect;
pawn.health.AddHediff(hediff);
}
{
protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested)
{
Hediff hediff = HediffMaker.MakeHediff(hediffDef, pawn);
float effect = ((!(severity > 0f)) ? hediffDef.initialSeverity : severity) * ingested.stackCount;
AddictionUtility.ModifyChemicalEffectForToleranceAndBodySize(pawn, toleranceChemical, ref effect);
hediff.Severity = effect;
pawn.health.AddHediff(hediff);
}
}

View file

@ -1,6 +1,6 @@
using System.Collections.Generic;
using RimWorld;
using System.Collections.Generic;
using System.Linq;
using RimWorld;
using Verse;
using Verse.AI;
@ -108,7 +108,7 @@ namespace RJW_Menstruation
protected virtual void Finish()
{
if(pawn.CurJobDef == JobDefOf.Wait_MaintainPosture)
if (pawn.CurJobDef == JobDefOf.Wait_MaintainPosture)
{
pawn.jobs.EndCurrentJob(JobCondition.InterruptForced);
}

View file

@ -1,9 +1,9 @@
using System.Collections.Generic;
using System.Linq;
using HarmonyLib;
using Verse;
using HarmonyLib;
using RimWorld;
using RimWorld.Planet;
using System.Collections.Generic;
using System.Linq;
using Verse;
namespace RJW_Menstruation.Patch
{
@ -26,8 +26,8 @@ namespace RJW_Menstruation.Patch
public static void Prefix()
{
GetCriticalPawnReason_Patch.cummedPawns.Clear();
// foreach(Pawn p in PawnsFinder.All_AliveOrDead)
foreach(Pawn p in PawnsFinder.AllMapsCaravansAndTravelingTransportPods_Alive_OfPlayerFaction.Union(PawnsFinder.AllMapsCaravansAndTravelingTransportPods_Alive_PrisonersOfColony))
// foreach(Pawn p in PawnsFinder.All_AliveOrDead)
foreach (Pawn p in PawnsFinder.AllMapsCaravansAndTravelingTransportPods_Alive_OfPlayerFaction.Union(PawnsFinder.AllMapsCaravansAndTravelingTransportPods_Alive_PrisonersOfColony))
{
foreach (HediffComp_Menstruation comp in p.GetMenstruationComps())
GetCriticalPawnReason_Patch.cummedPawns.UnionWith(comp.GetCummersAndFertilizers());

View file

@ -100,7 +100,7 @@ namespace RJW_Menstruation
Dialog_WombStatus.ToggleWindow(pawn, comp);
}
};
return gizmo;
}

View file

@ -2,10 +2,8 @@
using HugsLib;
using RimWorld;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using Verse;
using rjw;
namespace RJW_Menstruation
{

View file

@ -2,12 +2,12 @@
using rjw;
using rjw.Modules.Interactions.Enums;
using rjw.Modules.Interactions.Objects;
using Verse;
using UnityEngine;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using UnityEngine;
using Verse;
namespace RJW_Menstruation
{
@ -130,7 +130,7 @@ namespace RJW_Menstruation
if (Configurations.EnableBirthVaginaMorph)
{
Hediff vagina = mother.health.hediffSet.hediffs.FirstOrFallback(x => x.def.defName.ToLower().Contains("vagina"));
float morph = Mathf.Max(baby.BodySize - Mathf.Pow(vagina.Severity * mother.BodySize,2), 0f);
float morph = Mathf.Max(baby.BodySize - Mathf.Pow(vagina.Severity * mother.BodySize, 2), 0f);
vagina.Severity += morph * Configurations.VaginaMorphPower;
}
}
@ -197,7 +197,7 @@ namespace RJW_Menstruation
{
__result *= (1f + GetNetFertility(fucker, fucked) / 40);
}
else if(xxx.is_animal(fucker) && fucked.IsInEstrus(true) && MenstruationUtility.CanFertilize(fucker, fucked))
else if (xxx.is_animal(fucker) && fucked.IsInEstrus(true) && MenstruationUtility.CanFertilize(fucker, fucked))
{
__result *= 1.25f;
}
@ -217,9 +217,9 @@ namespace RJW_Menstruation
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
{
bool first_fuckability = true;
foreach(CodeInstruction instruction in instructions)
foreach (CodeInstruction instruction in instructions)
{
if(instruction.LoadsField(MinimumFuckabilityToHookup))
if (instruction.LoadsField(MinimumFuckabilityToHookup))
{
// The first load will be for the estrus-haver considering a partner, the second for a pawn considering the estrus-haver
yield return new CodeInstruction(first_fuckability ? OpCodes.Ldarg_0 : OpCodes.Ldarg_1);
@ -255,7 +255,7 @@ namespace RJW_Menstruation
// Like in the last one, we switch the arguments around for the second load
bool first_attractiveness = true;
bool first_relationship = true;
foreach(CodeInstruction instruction in instructions)
foreach (CodeInstruction instruction in instructions)
{
// Get where the compiler decided to index the pawn at
if (pawn_index == null && instruction.opcode == OpCodes.Stloc_S) // the first stloc.s in the IL is the pawn being loaded out of the list
@ -273,7 +273,7 @@ namespace RJW_Menstruation
yield return CodeInstruction.Call(typeof(FindBestPartner_Patch), nameof(AttractivenessThreshold));
first_attractiveness = false;
}
}
else if (instruction.LoadsField(MinimumRelationshipToHookup))
{
if (pawn_index?.LocalType != typeof(Pawn))

View file

@ -1,11 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse;
using RimWorld;
using rjw;
using System.Collections.Generic;
using Verse;
namespace RJW_Menstruation
@ -23,7 +19,7 @@ namespace RJW_Menstruation
BodyPartRecord part = Genital_Helper.get_breastsBPR(pawn);
if (part != null)
{
if (pawn.GetBreastComp() != null) yield return part;
}
}

View file

@ -22,14 +22,14 @@ namespace RJW_Menstruation
public static object GetPropertyValue(this Type type, string name)
{
BindingFlags flags = BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
PropertyInfo propertyInfo = type?.GetProperty(name,flags);
PropertyInfo propertyInfo = type?.GetProperty(name, flags);
return propertyInfo?.GetValue(null);
}
public static object GetPropertyValue(this object obj, string name)
{
BindingFlags flags = BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
PropertyInfo propertyInfo = obj?.GetType().GetProperty(name,flags);
PropertyInfo propertyInfo = obj?.GetType().GetProperty(name, flags);
return propertyInfo?.GetValue(obj);
}

View file

@ -1,11 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using UnityEngine;
using Verse;
using UnityEngine;
namespace RJW_Menstruation
{

View file

@ -1,8 +1,7 @@
using System;
using System.Xml;
using System.Collections.Generic;
using RimWorld;
using RimWorld;
using rjw;
using System.Collections.Generic;
using System.Xml;
using UnityEngine;
using Verse;
@ -64,14 +63,14 @@ namespace RJW_Menstruation
{
DirectXmlCrossRefLoader.RegisterObjectWantsCrossRef(this, "thingDef", xmlRoot.Name);
XmlNodeList childNodes = xmlRoot.ChildNodes;
if (childNodes.Count >= 1) foreach (XmlNode node in childNodes)
{
#if DEBUG
{
#if DEBUG
Log.Message(xmlRoot.Name + "HybridInfo: " + node.Name + " " + node.InnerText);
#endif
hybridInfo.Add(node.Name, ParseHelper.FromString<float>(node.InnerText));
}
#endif
hybridInfo.Add(node.Name, ParseHelper.FromString<float>(node.InnerText));
}
}
}
@ -211,7 +210,7 @@ namespace RJW_Menstruation
public virtual void WearEffect()
{
absorbedfluids += 0.1f;
if(dirty) wearhours++;
if (dirty) wearhours++;
}
public override Color DrawColorTwo => fluidColor;
@ -232,7 +231,7 @@ namespace RJW_Menstruation
public override void WearEffect()
{
if(dirty) wearhours++;
if (dirty) wearhours++;
absorbedfluids += 0.5f;
}

View file

@ -99,23 +99,23 @@ namespace RJW_Menstruation
public static readonly string Option23_Label_1 = "Option23_Label_1".Translate();
public static readonly string Option23_Label_2 = "Option23_Label_2".Translate();
public static readonly string Option24_Label = "Option24_Label".Translate();
public static readonly string Option24_Desc = "Option24_Desc".Translate();
public static readonly string Option24_Desc = "Option24_Desc".Translate();
public static readonly string Option25_Label = "Option25_Label".Translate();
public static readonly string Option25_Desc = "Option25_Desc".Translate();
public static readonly string Option25_Desc = "Option25_Desc".Translate();
public static readonly string Option26_Label = "Option26_Label".Translate();
public static readonly string Option26_Desc = "Option26_Desc".Translate();
public static readonly string Option26_Desc = "Option26_Desc".Translate();
public static readonly string Option27_Label = "Option27_Label".Translate();
public static readonly string Option27_Desc = "Option27_Desc".Translate();
public static readonly string Option27_Desc = "Option27_Desc".Translate();
public static readonly string Option28_Label = "Option28_Label".Translate();
public static readonly string Option28_Tooltip = "Option28_Tooltip".Translate();
public static readonly string Option29_Label = "Option29_Label".Translate();
public static readonly string Option29_Desc = "Option29_Desc".Translate();
public static readonly string Option29_Desc = "Option29_Desc".Translate();
public static readonly string Option30_Label = "Option30_Label".Translate();
public static readonly string Option30_Desc = "Option30_Desc".Translate();
public static readonly string Option30_Desc = "Option30_Desc".Translate();
public static readonly string Option31_Label = "Option31_Label".Translate();
public static readonly string Option31_Desc = "Option31_Desc".Translate();
public static readonly string Option31_Desc = "Option31_Desc".Translate();
public static readonly string Option32_Label = "Option32_Label".Translate();
public static readonly string Option32_Desc = "Option32_Desc".Translate();
public static readonly string Option32_Desc = "Option32_Desc".Translate();
public static readonly string Option_EnableGatherCumGizmo_Label = "Option_EnableGatherCumGizmo_Label".Translate();
public static readonly string Option_EstrusOverride_Label = "Option_EstrusOverride_Label".Translate();
public static readonly string Option_EstrusOverride_Desc = "Option_EstrusOverride_Desc".Translate();

View file

@ -1,10 +1,7 @@
using System;
using RimWorld;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using rjw;
using UnityEngine;
using Verse;
using Verse.Sound;
@ -26,8 +23,8 @@ namespace RJW_Menstruation
public void BuildRaceList()
{
raceList.Clear();
if (!VariousDefOf.AllRaces.NullOrEmpty())
foreach(ThingDef def in VariousDefOf.AllRaces)
if (!VariousDefOf.AllRaces.NullOrEmpty())
foreach (ThingDef def in VariousDefOf.AllRaces)
{
if (def.race == null || Configurations.IsOverrideExist(def)) continue;
raceList.Add(new FloatMenuOption(def.label, delegate { AddHybridOverride(def); }, def.uiIcon, Color.white));
@ -130,17 +127,17 @@ namespace RJW_Menstruation
}
Rect outRect = new Rect(inRect.x, inRect.y + 30f, inRect.width, inRect.height - 30f);
Rect mainRect = new Rect(inRect.x, inRect.y + 30f, inRect.width - 30f, Math.Max(24f*Configurations.HybridOverride?.Count() ?? 1,10f));
Rect mainRect = new Rect(inRect.x, inRect.y + 30f, inRect.width - 30f, Math.Max(24f * Configurations.HybridOverride?.Count() ?? 1, 10f));
Listing_Standard listmain = new Listing_Standard();
Widgets.BeginScrollView(outRect, ref scroll, mainRect);
listmain.Begin(mainRect);
if (!Configurations.HybridOverride.NullOrEmpty())
foreach(HybridInformations extension in Configurations.HybridOverride)
if (!Configurations.HybridOverride.NullOrEmpty())
foreach (HybridInformations extension in Configurations.HybridOverride)
{
if (extension.GetDef != null) DoRow(listmain.GetRect(24f),extension);
if (extension.GetDef != null) DoRow(listmain.GetRect(24f), extension);
}
Widgets.EndScrollView();
listmain.End();
@ -258,7 +255,7 @@ namespace RJW_Menstruation
SoundDefOf.TabClose.PlayOneShotOnCamera();
Find.WindowStack.Add(new Dialog_EditHybrid(info));
}
}
@ -272,7 +269,7 @@ namespace RJW_Menstruation
{
raceList.Clear();
if (VariousDefOf.AllRaces.NullOrEmpty()) return;
foreach (ThingDef def in VariousDefOf.AllRaces)
{
if (def.race != null)
@ -317,7 +314,7 @@ namespace RJW_Menstruation
info.hybridExtension.Add(element);
removeList.Remove(element);
}
foreach (HybridExtensionExposable element in removeList)
{
info.hybridExtension.Remove(element);
@ -326,7 +323,7 @@ namespace RJW_Menstruation
float additionalHeight = 0f;
if (!info.hybridExtension.NullOrEmpty()) foreach(HybridExtensionExposable e in info.hybridExtension)
if (!info.hybridExtension.NullOrEmpty()) foreach (HybridExtensionExposable e in info.hybridExtension)
{
additionalHeight += (e.hybridInfo?.Count() ?? 1) * rowH;
}
@ -349,7 +346,7 @@ namespace RJW_Menstruation
}
Widgets.EndScrollView();
listmain.End();
}
@ -369,7 +366,7 @@ namespace RJW_Menstruation
if (Widgets.ButtonText(buttonRect, "Add"))
{
List<FloatMenuOption> list = new List<FloatMenuOption>();
if (!VariousDefOf.AllRaces.NullOrEmpty()) foreach(ThingDef def in VariousDefOf.AllRaces)
if (!VariousDefOf.AllRaces.NullOrEmpty()) foreach (ThingDef def in VariousDefOf.AllRaces)
{
if (def.race != null)
{
@ -385,7 +382,7 @@ namespace RJW_Menstruation
list.SortBy(x => x.Label);
Find.WindowStack.Add(new FloatMenu(list));
}
}
buttonRect.x -= 80f;
@ -396,18 +393,18 @@ namespace RJW_Menstruation
if (!extension.hybridInfo.EnumerableNullOrEmpty())
{
totalWeight = 0;
foreach(KeyValuePair<string,float> element in extension.hybridInfo)
foreach (KeyValuePair<string, float> element in extension.hybridInfo)
{
totalWeight += element.Value;
}
List<string> keys = new List<string>(extension.hybridInfo.Keys);
foreach (string key in keys)
{
DoSubRow(sublist.GetRect(rowH), key, extension, removeelements);
}
}
if(!removeelements.NullOrEmpty()) foreach(string key in removeelements)
if (!removeelements.NullOrEmpty()) foreach (string key in removeelements)
{
extension.hybridInfo.Remove(key);
}
@ -418,7 +415,7 @@ namespace RJW_Menstruation
}
protected void DoSubRow(Rect rect, string key, HybridExtensionExposable extension , List<string> removeelements)
protected void DoSubRow(Rect rect, string key, HybridExtensionExposable extension, List<string> removeelements)
{
bool isPawnKind = false;
int value = (int)extension.hybridInfo.TryGetValue(key);
@ -464,15 +461,15 @@ namespace RJW_Menstruation
}
label += ": " + key;
Widgets.Label(rect, " - " + label);
Widgets.TextFieldNumeric(buttonRect, ref value, ref valuestr,0,9999999);
Widgets.TextFieldNumeric(buttonRect, ref value, ref valuestr, 0, 9999999);
extension.hybridInfo.SetOrAdd(key, value);
buttonRect.x -= 80f;
Widgets.Label(buttonRect, String.Format("{0,0:P2}", value / totalWeight));
Widgets.DrawHighlightIfMouseover(rect);
TooltipHandler.TipRegion(rect, Translations.CustomHybrid_Tooltip(info.GetDef?.label ?? "Undefined", extension.GetDef?.label ?? "Undefined", label, String.Format("{0,0:0.########%}", value/totalWeight)));
TooltipHandler.TipRegion(rect, Translations.CustomHybrid_Tooltip(info.GetDef?.label ?? "Undefined", extension.GetDef?.label ?? "Undefined", label, String.Format("{0,0:0.########%}", value / totalWeight)));
}
}

View file

@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using RimWorld;
using RimWorld;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using Verse;
@ -229,7 +229,7 @@ namespace RJW_Menstruation
if (pawn.story != null) GUI.Label(pawnLabel2Rect, pawn.ageTracker.AgeBiologicalYears + ", " + pawn.story.Title, fontstylecenter);
GUI.color = Color.white;
float wombrecth = 0;
if (Configurations.DrawWombStatus)
{
@ -248,7 +248,7 @@ namespace RJW_Menstruation
}
Rect wombInfoRect = new Rect(0f, mainRect.yMax - wombrecth - fontheight - 2, wombRectWidth, fontheight - 4f);
Rect progressRect = new Rect(wombInfoRect.x,wombInfoRect.yMax,wombRectWidth, 4f);
Rect progressRect = new Rect(wombInfoRect.x, wombInfoRect.yMax, wombRectWidth, 4f);
buttonstyle.normal.textColor = Color.white;
//boxstyle.normal.background = Texture2D.whiteTexture;
buttonstyle.alignment = TextAnchor.MiddleLeft;
@ -285,7 +285,7 @@ namespace RJW_Menstruation
cumlistRect = new Rect(pawnRectWidth, fontheight, 150f, mainRect.yMax - wombRectHeight - fontheight);
}
Rect infoRect = new Rect(0, pawnRectHeight + 2*fontheight, pawnRectWidth, pawnRect.yMax + 2*fontheight - wombInfoRect.y);
Rect infoRect = new Rect(0, pawnRectHeight + 2 * fontheight, pawnRectWidth, pawnRect.yMax + 2 * fontheight - wombInfoRect.y);
DrawInfos(infoRect);
@ -368,7 +368,7 @@ namespace RJW_Menstruation
GUI.color = new Color(1.00f, 0.47f, 0.47f, 1);
GUI.Box(rect, "", boxstyle);
pawn.DrawBreastIcon(BreastIconRect, Mouse.IsOver(BreastIconRect) && Input.GetMouseButton(0));
@ -387,11 +387,11 @@ namespace RJW_Menstruation
float statvalue;
const float height = 24f;
statvalue = pawn.GetStatValue(xxx.sex_drive_stat);
FillableBarLabeled(lineRect, " " + xxx.sex_drive_stat.LabelCap.CapitalizeFirst() + " " + statvalue.ToStringPercent(), statvalue/2 ,TextureCache.SlaaneshTexture,Texture2D.blackTexture, xxx.sex_drive_stat.description);
FillableBarLabeled(lineRect, " " + xxx.sex_drive_stat.LabelCap.CapitalizeFirst() + " " + statvalue.ToStringPercent(), statvalue / 2, TextureCache.SlaaneshTexture, Texture2D.blackTexture, xxx.sex_drive_stat.description);
lineRect.y += height;
statvalue = pawn.GetStatValue(xxx.vulnerability_stat);
FillableBarLabeled(lineRect, " " + xxx.vulnerability_stat.LabelCap.CapitalizeFirst() + " " + statvalue.ToStringPercent(), statvalue/2, TextureCache.KhorneTexture,Texture2D.blackTexture, xxx.vulnerability_stat.description);
FillableBarLabeled(lineRect, " " + xxx.vulnerability_stat.LabelCap.CapitalizeFirst() + " " + statvalue.ToStringPercent(), statvalue / 2, TextureCache.KhorneTexture, Texture2D.blackTexture, xxx.vulnerability_stat.description);
lineRect.y += height;
statvalue = pawn.GetStatValue(xxx.sex_stat);
@ -417,7 +417,7 @@ namespace RJW_Menstruation
statvalue = pawn.records.GetValue(xxx.EarnedMoneyByWhore);
lineRect.y += height;
FillableBarLabeled(lineRect, " " + VariousDefOf.RJW_EarnedMoneyByWhore.label.CapitalizeFirst() + " " + statvalue, statvalue / 10000, TextureCache.GhalmarazTexture, Texture2D.blackTexture);
lineRect.y += height;
}
else
@ -428,7 +428,7 @@ namespace RJW_Menstruation
statvalue = Configurations.ImplantationChance * comp.ImplantFactor;
float fertchance = comp.GetFertilityChance();
FillableBarLabeled(lineRect, " " + xxx.reproduction.LabelCap.CapitalizeFirst() + " " + statvalue.ToStringPercent(), statvalue, TextureCache.FertilityTexture, Texture2D.blackTexture, Translations.FertilityDesc(String.Format("{0:0.##}", fertchance*100)));
FillableBarLabeled(lineRect, " " + xxx.reproduction.LabelCap.CapitalizeFirst() + " " + statvalue.ToStringPercent(), statvalue, TextureCache.FertilityTexture, Texture2D.blackTexture, Translations.FertilityDesc(String.Format("{0:0.##}", fertchance * 100)));
Rect overayRect = new Rect(lineRect.x, lineRect.y, lineRect.width * Math.Min(1.0f, fertchance), lineRect.height);
GUI.DrawTexture(overayRect, TextureCache.FertChanceTex);
lineRect.y += height;
@ -436,7 +436,7 @@ namespace RJW_Menstruation
private void FillableBarLabeled(Rect rect, string label, float fillPercent, Texture2D filltexture, Texture2D bgtexture, string tooltip = null)
{
Widgets.FillableBar(rect, Math.Min(fillPercent,1.0f), filltexture, bgtexture, true);
Widgets.FillableBar(rect, Math.Min(fillPercent, 1.0f), filltexture, bgtexture, true);
GUI.Label(rect, label, fontstyleleft);
Widgets.DrawHighlightIfMouseover(rect);
if (tooltip != null) TooltipHandler.TipRegion(rect, tooltip);

View file

@ -37,7 +37,7 @@ namespace RJW_Menstruation
Widgets.FillableBar(progressRect, comp.StageProgress, comp.GetStageTexture);
}

View file

@ -1,13 +1,11 @@
using RimWorld;
using rjw;
using System;
using System.Linq;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using Verse;
using Verse.Sound;
using System.Threading;
using System.Threading.Tasks;
namespace RJW_Menstruation
@ -16,7 +14,7 @@ namespace RJW_Menstruation
{
public static Color blood = new Color(0.78f, 0, 0);
//public static Color nippleblack = new Color(0.215f, 0.078f, 0); // 81,20,0
public static ColorInt white = new ColorInt(255,255,255,255);
public static ColorInt white = new ColorInt(255, 255, 255, 255);
@ -52,7 +50,7 @@ namespace RJW_Menstruation
public static System.Random random = new System.Random(Environment.TickCount);
public static float GetCumVolume(this Pawn pawn)
{
@ -97,7 +95,7 @@ namespace RJW_Menstruation
var hedifflist = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_breastsBPR(pawn))?.FindAll((Hediff h) => h is Hediff_PartBaseNatural || h is Hediff_PartBaseArtifical);
HediffComp_Breast result;
if (hedifflist.NullOrEmpty()) return null;
foreach(Hediff h in hedifflist)
foreach (Hediff h in hedifflist)
{
result = h.TryGetComp<HediffComp_Breast>();
if (result != null) return result;
@ -161,10 +159,10 @@ namespace RJW_Menstruation
Log.Error("Baby not exist: baby was not created or removed. Remove pregnancy.");
comp.Pregnancy.Miscarry();
return null;
}
}
}
public static void DrawBreastIcon(this Pawn pawn, Rect rect , bool drawOrigin = false)
public static void DrawBreastIcon(this Pawn pawn, Rect rect, bool drawOrigin = false)
{
var hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_breastsBPR(pawn)).FirstOrDefault((Hediff h) => h.def.defName.ToLower().Contains("breast"));
Texture2D breast, nipple, areola;
@ -209,7 +207,7 @@ namespace RJW_Menstruation
nippleicon = icon + "_Nipple0" + GetNippleIndex(nipplesize);
areolaicon = icon + "_Areola0" + GetAreolaIndex(areolasize);
breast = ContentFinder<Texture2D>.Get(icon, false);
areola = ContentFinder<Texture2D>.Get(areolaicon, false);
@ -306,12 +304,12 @@ namespace RJW_Menstruation
}
}
public static void DrawMilkBottle(Rect rect, Pawn pawn, JobDef milkjob,float fullness)
public static void DrawMilkBottle(Rect rect, Pawn pawn, JobDef milkjob, float fullness)
{
Texture2D texture;
Rect buttonrect = new Rect(rect.x, rect.y, rect.height, rect.height);
if (fullness <= 0.0f) return;
if (fullness < 0.3f) texture = ContentFinder<Texture2D>.Get("Milk/Milkbottle_Small", false);
else if (fullness < 0.7f) texture = ContentFinder<Texture2D>.Get("Milk/Milkbottle_Medium", false);
else texture = ContentFinder<Texture2D>.Get("Milk/Milkbottle_Large", false);
@ -414,7 +412,7 @@ namespace RJW_Menstruation
}
res /= iterations;
return (float)res*(max-min) + min;
return (float)res * (max - min) + min;
}
@ -423,7 +421,7 @@ namespace RJW_Menstruation
float tmult = Mathf.Pow(1 - t, num);
return tmult * a + (1 - tmult) * b;
}
public static float VariationRange(this float num, float variant)
{
return num * Rand.Range(1.0f - variant, 1.0f + variant);

View file

@ -1,8 +1,7 @@
using RimWorld;
using rjw;
using System.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using Verse;
namespace RJW_Menstruation
@ -56,7 +55,7 @@ namespace RJW_Menstruation
get
{
if (allraces != null) return allraces;
List<ThingDef> allThings = DefDatabase<ThingDef>.AllDefsListForReading;
allraces = allThings.FindAll(x => x.race != null && x.race.IsFlesh);
return allraces;

View file

@ -1,13 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using RimWorld;
using RJWSexperience;
using RJW_Menstruation;
using System.Collections.Generic;
using UnityEngine;
using Verse;
namespace RJW_Menstruation.Sexperience
{
@ -34,8 +27,8 @@ namespace RJW_Menstruation.Sexperience
if (res && other is GatheredCumMixture mixture)
{
GatheredCumMixture othercum = mixture;
cumColor = Colors.CMYKLerp(cumColor,othercum.cumColor,count/(amount+count));
if (!othercum.ingredients.NullOrEmpty()) for (int i=0; i<othercum.ingredients.Count; i++)
cumColor = Colors.CMYKLerp(cumColor, othercum.cumColor, count / (amount + count));
if (!othercum.ingredients.NullOrEmpty()) for (int i = 0; i < othercum.ingredients.Count; i++)
{
if (!ingredients.Contains(othercum.ingredients[i])) ingredients.Add(othercum.ingredients[i]);
}
@ -46,7 +39,7 @@ namespace RJW_Menstruation.Sexperience
public override string GetInspectString()
{
string res = "";
if (!ingredients.NullOrEmpty()) for(int i=0; i<ingredients.Count; i++)
if (!ingredients.NullOrEmpty()) for (int i = 0; i < ingredients.Count; i++)
{
res += ingredients[i];
if (i != ingredients.Count - 1) res += ", ";

View file

@ -1,13 +1,8 @@
using System;
using RJWSexperience;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HarmonyLib;
using Verse;
using Verse.AI;
using RimWorld;
using RJWSexperience;
namespace RJW_Menstruation.Sexperience
{

View file

@ -1,14 +1,7 @@
using System;
using HarmonyLib;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using RimWorld;
using UnityEngine;
using RJWSexperience;
using rjw;
using HarmonyLib;
using Verse;
namespace RJW_Menstruation.Sexperience
@ -32,7 +25,7 @@ namespace RJW_Menstruation.Sexperience
defaultLabel = label,
defaultDesc = description,
icon = icon,
isActive = delegate() { return comp.DoCleanWomb; },
isActive = delegate () { return comp.DoCleanWomb; },
toggleAction = delegate
{
comp.DoCleanWomb = !comp.DoCleanWomb;

View file

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HarmonyLib;
using HarmonyLib;
using System.Reflection;
using Verse;

View file

@ -1,16 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RJW_Menstruation;
using HarmonyLib;
using rjw;
using HarmonyLib;
using RimWorld;
using UnityEngine;
using Verse;
using Verse.Sound;
using UnityEngine;
using RJWSexperience;
namespace RJW_Menstruation.Sexperience
{
@ -24,7 +16,7 @@ namespace RJW_Menstruation.Sexperience
Rect buttonRect = new Rect(rect.x, rect.yMax - ICONSIZE, ICONSIZE, ICONSIZE).ContractedBy(2f);
if (__instance.Comp.DoCleanWomb)
{
Widgets.DrawTextureFitted(buttonRect,TextureCache.GatherCum_Bucket,1.0f);
Widgets.DrawTextureFitted(buttonRect, TextureCache.GatherCum_Bucket, 1.0f);
TooltipHandler.TipRegion(buttonRect, Translations.Dialog_DoCleanWomb_Tooltip);
}
else

View file

@ -1,14 +1,10 @@
using System;
using HarmonyLib;
using RimWorld;
using RJWSexperience;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI;
using RimWorld;
using HarmonyLib;
using UnityEngine;
using RJWSexperience;
using Verse;
namespace RJW_Menstruation.Sexperience
{
@ -20,17 +16,17 @@ namespace RJW_Menstruation.Sexperience
var targets = GenUI.TargetsAt(clickPos, TargetingParameters.ForBuilding());
if (pawn.GetMenstruationComps().Any(comp => comp.TotalCumPercent > 0.001f))
foreach (LocalTargetInfo t in targets)
{
if (t.Thing is Building building)
foreach (LocalTargetInfo t in targets)
{
if (building is Building_CumBucket)
if (t.Thing is Building building)
{
opts.AddDistinct(MakeMenu(pawn, building));
break;
if (building is Building_CumBucket)
{
opts.AddDistinct(MakeMenu(pawn, building));
break;
}
}
}
}
}
public static FloatMenuOption MakeMenu(Pawn pawn, LocalTargetInfo target)

View file

@ -1,15 +1,9 @@
using System;
using System.Collections.Generic;
using HarmonyLib;
using rjw;
using RJWSexperience;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse;
using Verse.AI;
using rjw;
using RJW_Menstruation;
using HarmonyLib;
using RJWSexperience;
namespace RJW_Menstruation.Sexperience
{

View file

@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해

View file

@ -1,9 +1,4 @@
using RimWorld;
using rjw;
using System.Linq;
using System;
using System.Collections.Generic;
using Verse;
using Verse;
namespace RJW_Menstruation.Sexperience
{