mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Whole bunch of code cleanup, mostly using and whitespace
This commit is contained in:
parent
f5170ca700
commit
1907820265
37 changed files with 228 additions and 327 deletions
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ namespace RJW_Menstruation
|
|||
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;
|
||||
|
@ -275,7 +275,7 @@ namespace RJW_Menstruation
|
|||
public string GetIngredients()
|
||||
{
|
||||
string res = "";
|
||||
if (!cums.NullOrEmpty()) for(int i=0; i<cums.Count; i++)
|
||||
if (!cums.NullOrEmpty()) for (int i = 0; i < cums.Count; i++)
|
||||
{
|
||||
res += cums[i];
|
||||
if (i < cums.Count - 1) res += ", ";
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -1,20 +1,17 @@
|
|||
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
|
||||
|
@ -232,7 +229,7 @@ namespace RJW_Menstruation
|
|||
|
||||
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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
@ -1088,7 +1088,7 @@ namespace RJW_Menstruation
|
|||
|
||||
foreach (Cum cum in eligibleCum)
|
||||
{
|
||||
if(cum.FertVolume > mostCum)
|
||||
if (cum.FertVolume > mostCum)
|
||||
{
|
||||
mostCum = cum.FertVolume;
|
||||
mostCummer = cum.pawn;
|
||||
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
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
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -2,10 +2,8 @@
|
|||
using HugsLib;
|
||||
using RimWorld;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using Verse;
|
||||
using rjw;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
@ -67,9 +66,9 @@ namespace RJW_Menstruation
|
|||
|
||||
if (childNodes.Count >= 1) foreach (XmlNode node in childNodes)
|
||||
{
|
||||
#if DEBUG
|
||||
#if DEBUG
|
||||
Log.Message(xmlRoot.Name + "HybridInfo: " + node.Name + " " + node.InnerText);
|
||||
#endif
|
||||
#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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
@ -27,7 +24,7 @@ namespace RJW_Menstruation
|
|||
{
|
||||
raceList.Clear();
|
||||
if (!VariousDefOf.AllRaces.NullOrEmpty())
|
||||
foreach(ThingDef def in VariousDefOf.AllRaces)
|
||||
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));
|
||||
|
@ -132,15 +129,15 @@ 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)
|
||||
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();
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -396,7 +393,7 @@ 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;
|
||||
}
|
||||
|
@ -407,7 +404,7 @@ namespace RJW_Menstruation
|
|||
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,12 +461,12 @@ 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)));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
@ -164,7 +162,7 @@ namespace RJW_Menstruation
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -306,7 +304,7 @@ 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);
|
||||
|
@ -414,7 +412,7 @@ namespace RJW_Menstruation
|
|||
}
|
||||
res /= iterations;
|
||||
|
||||
return (float)res*(max-min) + min;
|
||||
return (float)res * (max - min) + min;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 += ", ";
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue