code:
using System;
using System.Collections.Generic;
using System.Linq;
using RimWorld;
using rjw;
using Verse;

namespace rjw.MainTab
{
	public class RJW_PawnTable_Animals : PawnTable_Animals
	{
		public RJW_PawnTable_Animals(PawnTableDef def, Func<IEnumerable<Pawn>> pawnsGetter, int uiWidth, int uiHeight) : base(def, pawnsGetter, uiWidth, uiHeight) { }

		//default sorting
		protected override IEnumerable<Pawn> LabelSortFunction(IEnumerable<Pawn> input)
		{
			//return input.OrderBy(p => p.Name);
			foreach (Pawn p in input)
				p.UpdatePermissions();
			return input.OrderByDescending(p => xxx.get_pawnname(p));
			//return input.OrderByDescending(p => (p.IsPrisonerOfColony || p.IsSlaveOfColony) != false).ThenBy(p => (p.Name.ToStringShort.Colorize(Color.yellow)));
			//return input.OrderBy(p => xxx.get_pawnname(p));
		}

		protected override IEnumerable<Pawn> PrimarySortFunction(IEnumerable<Pawn> input)
		{
			foreach (Pawn p in input)
				p.UpdatePermissions();
			return input;
			//return base.PrimarySortFunction(input);
		}

		//public IEnumerable<Pawn> FilterPawns
		//{
		//	get
		//	{
		//		ModLog.Message("FilterPawnsGet");
		//		var x = Find.CurrentMap.mapPawns.PawnsInFaction(Faction.OfPlayer).Where(p => xxx.is_animal(p));
		//		ModLog.Message("x: " + x);
		//		return x;
		//	}
		//}
	}
}


code:
using System;
using System.Collections.Generic;
using System.Linq;
using RimWorld;
using rjw;
using Verse;

namespace rjw.MainTab
{
	public class RJW_PawnTable_Humanlikes : PawnTable_PlayerPawns
	{
		public RJW_PawnTable_Humanlikes(PawnTableDef def, Func<IEnumerable<Pawn>> pawnsGetter, int uiWidth, int uiHeight) : base(def, pawnsGetter, uiWidth, uiHeight) { }

		//default sorting
		protected override IEnumerable<Pawn> LabelSortFunction(IEnumerable<Pawn> input)
		{
			//return input.OrderBy(p => p.Name);
			foreach (Pawn p in input)
				p.UpdatePermissions();
			return input.OrderByDescending(p => (p.IsPrisonerOfColony || p.IsSlaveOfColony) != false).ThenBy(p => xxx.get_pawnname(p));
			//return input.OrderByDescending(p => (p.IsPrisonerOfColony || p.IsSlaveOfColony) != false).ThenBy(p => (p.Name.ToStringShort.Colorize(Color.yellow)));
			//return input.OrderBy(p => xxx.get_pawnname(p));
		}

		protected override IEnumerable<Pawn> PrimarySortFunction(IEnumerable<Pawn> input)
		{
			foreach (Pawn p in input)
				p.UpdatePermissions();
			return input;
			//return base.PrimarySortFunction(input);
		}

		//public static IEnumerable<Pawn> FilterPawns()
		//{
		//	return Find.CurrentMap.mapPawns.PawnsInFaction(Faction.OfPlayer).Where(p => xxx.is_animal(p));
		//}
	}
}

repo_name: Euclidean/rjw

license: mit


code:
using System.Collections.Generic;
using System.Linq;
using HarmonyLib;
using RimWorld;
using Verse;

using Sex = rjw.GenderHelper.Sex;

namespace rjw
{
	// Less straightforward than part removal as this recipe can potentially be applied on pawn generation
	public class Recipe_InstallPart : Recipe_InstallArtificialBodyPart
	{
		protected virtual bool CanApplyOnPart(Pawn pawn, BodyPartRecord record)
		{
			if (record.parent != null && !pawn.health.hediffSet.GetNotMissingParts().Contains(record.parent))
			{
				return false;
			}
			return true;
		}

		public virtual bool ValidFor(Pawn pawn) => !xxx.is_slime(pawn);

		public override bool AvailableOnNow(Thing thing, BodyPartRecord part = null)
		{
			return base.AvailableOnNow(thing, part) && ValidFor((Pawn) thing);
		}

		public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
		{
			return MedicalRecipesUtility.GetFixedPartsToApplyOn(recipe, pawn, (BodyPartRecord record) => CanApplyOnPart(pawn, record));
		}

		public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill)
		{
			Sex before = GenderHelper.GetSex(pawn);

			if (billDoer != null && CheckSurgeryFail(billDoer, pawn, ingredients, part, bill))
			{
				return;
			}
			OnSurgerySuccess(pawn, part, billDoer, ingredients, bill);

			Hediff addedPartHediff = SexPartAdder.recipePartAdder(recipe, pawn, part, ingredients);
			pawn.health.AddHediff(addedPartHediff, part);

			if (billDoer != null)
			{
				if (IsViolationOnPawn(pawn, part, billDoer.Faction))
				{
					ReportViolation(pawn, billDoer, pawn.Faction, -80);
				}

				if (ModsConfig.IdeologyActive && !addedPartHediff.def.IsArtificialSexPart())
				{
					Find.HistoryEventsManager.RecordEvent(new HistoryEvent(HistoryEventDefOf.InstalledProsthetic, billDoer.Named(HistoryEventArgsNames.Doer)));
				}
			}

			if (!PawnGenerator.IsBeingGenerated(pawn))
			{
				// TODO: Incorporate sex changes into violation logic
				Sex after = GenderHelper.GetSex(pawn);
				GenderHelper.ChangeSex(pawn, before, after);
			}
		}

		protected override void OnSurgerySuccess(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill)
		{
			if (billDoer != null)
			{
				TaleRecorder.RecordTale(TaleDefOf.DidSurgery, billDoer, pawn);
				SurgeryHelper.RemoveAndSpawnSexParts(billDoer, pawn, part, isReplacement: true);
				MedicalRecipesUtility.SpawnNaturalPartIfClean(pawn, part, billDoer.Position, billDoer.Map);
				MedicalRecipesUtility.SpawnThingsFromHediffs(pawn, part, billDoer.Position, billDoer.Map);
			}
			pawn.health.RestorePart(part);
		}
	}

	public class Recipe_InstallGenitals : Recipe_InstallPart
	{
		public override bool ValidFor(Pawn p)
		{
			return base.ValidFor(p) && !Genital_Helper.genitals_blocked(p);
		}
	}

	public class Recipe_InstallBreasts : Recipe_InstallPart
	{
		public override bool ValidFor(Pawn p)
		{
			return base.ValidFor(p) && !Genital_Helper.breasts_blocked(p);
		}
	}

	public class Recipe_InstallAnus : Recipe_InstallPart
	{
		public override bool ValidFor(Pawn p)
		{
			return base.ValidFor(p) && !Genital_Helper.anus_blocked(p);
		}
	}
}


code:
using System.Collections.Generic;
using System.Linq;
using RimWorld;
using Verse;

namespace rjw
{
	public class Recipe_AddMultiPart : Recipe_InstallPart
	{
		// Record tale without removing pre-existing parts
		protected override void OnSurgerySuccess(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill)
		{
			if (billDoer != null)
			{
				TaleRecorder.RecordTale(TaleDefOf.DidSurgery, billDoer, pawn);
			}
		}

		protected override bool CanApplyOnPart(Pawn pawn, BodyPartRecord record)
		{
			return base.CanApplyOnPart(pawn, record) && !pawn.health.hediffSet.PartIsMissing(record);
		}
	}
}


code:
using RimWorld;
using System.Collections.Generic;
using Verse;

namespace rjw
{
	/// <summary>
	/// Removes heddifs (restraints/cocoon)
	/// </summary>
	public class Recipe_RemoveRestraints : Recipe_RemoveHediff
	{
		public override bool AvailableOnNow(Thing pawn, BodyPartRecord part = null)
		{
			return true;
		}

		public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
		{
			List<Hediff> allHediffs = pawn.health.hediffSet.hediffs;
			int i = 0;
			while (true)
			{
				if (i >= allHediffs.Count)
				{
					yield break;
				}
				if (allHediffs[i].def == recipe.removesHediff && allHediffs[i].Visible)
				{
					break;
				}
				i++;
			}

			yield return allHediffs[i].Part;
		}
	}
}


code:
using System.Collections.Generic;
using RimWorld;
using Verse;

namespace rjw
{
	public class Recipe_RemoveAnus : Recipe_RemovePart
	{
		protected override bool ValidFor(Pawn p)
		{
			return base.ValidFor(p) && Genital_Helper.has_anus(p) && !Genital_Helper.anus_blocked(p);
		}
	}
}


code:
using System.Collections.Generic;
using RimWorld;
using Verse;

namespace rjw
{
	public class Recipe_RemoveBreasts : Recipe_RemovePart
	{
		protected override bool ValidFor(Pawn p)
		{
			return base.ValidFor(p) && Genital_Helper.has_breasts(p) && !Genital_Helper.breasts_blocked(p);
		}
	}
}


code:
using System.Collections.Generic;
using RimWorld;
using Verse;

namespace rjw
{
	public class Recipe_RemoveGenitals : Recipe_RemovePart
	{
		protected override bool ValidFor(Pawn p)
		{
			return base.ValidFor(p) && Genital_Helper.has_genitals(p) && !Genital_Helper.genitals_blocked(p);
		}
	}
}


code:
using System.Collections.Generic;
using Multiplayer.API;
using RimWorld;
using Verse;

namespace rjw
{
	public class Recipe_RemovePart : Recipe_RemoveBodyPart
	{
		private const int HarvestGoodwillPenalty = -80;

		protected virtual bool ValidFor(Pawn p)
		{
			return !xxx.is_slime(p);//|| xxx.is_demon(p)
		}

		public override bool AvailableOnNow(Thing thing, BodyPartRecord part = null)
		{
			return base.AvailableOnNow(thing, part) && ValidFor((Pawn)thing);
		}

		public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
		{
			return MedicalRecipesUtility.GetFixedPartsToApplyOn(recipe, pawn);
		}

		public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill)
		{
			bool isHarvest = SurgeryHelper.IsHarvest(pawn, part);
			bool isViolation = isHarvest && IsViolationOnPawn(pawn, part, billDoer.Faction);

			if (billDoer != null)
			{
				if (CheckSurgeryFail(billDoer, pawn, ingredients, part, bill))
				{
					return;
				}
				OnSurgerySuccess(pawn, part, billDoer, ingredients, bill);
			}
			DamagePart(pawn, part);
			pawn.Drawer.renderer.SetAllGraphicsDirty();

			if (isHarvest)
			{
				ApplyThoughts(pawn, billDoer);
			}
			if (isViolation)
			{
				ReportViolation(pawn, billDoer, pawn.HomeFaction, HarvestGoodwillPenalty);
			}
		}

		protected override void OnSurgerySuccess(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill)
		{
			base.OnSurgerySuccess(pawn, part, billDoer, ingredients, bill);
			TaleRecorder.RecordTale(TaleDefOf.DidSurgery, billDoer, pawn);
			SurgeryHelper.RemoveAndSpawnSexParts(billDoer, pawn, part, isReplacement: false);
			MedicalRecipesUtility.SpawnNaturalPartIfClean(pawn, part, billDoer.Position, billDoer.Map);
			MedicalRecipesUtility.SpawnThingsFromHediffs(pawn, part, billDoer.Position, billDoer.Map);
		}

		public override string GetLabelWhenUsedOn(Pawn p, BodyPartRecord part)
		{
			return recipe.label.CapitalizeFirst();
		}

		[SyncMethod]
		public override void DamagePart(Pawn pawn, BodyPartRecord part)
		{
			if (part.IsCorePart)
			{
				float damageAmount = part.def.hitPoints * Rand.Range(.5f, 1.5f) / 20f;
				pawn.TakeDamage(new DamageInfo(DamageDefOf.SurgicalCut, damageAmount, 999f, -1f, null, part));
			}
			else
			{
				base.DamagePart(pawn, part);
			}
		}
	}
}


code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse;

namespace rjw
{
	public class PawnRelationWorker_Child_Beast : PawnRelationWorker_Child
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (!xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isChildOf(other, me);
		}
	}

	public class PawnRelationWorker_Sibling_Beast : PawnRelationWorker_Sibling
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (!xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isSiblingOf(other, me);
		}
	}
	public class PawnRelationWorker_HalfSibling_Beast : PawnRelationWorker_HalfSibling
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (!xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isHalfSiblingOf(other, me);
		}
	}
	public class PawnRelationWorker_Grandparent_Beast : PawnRelationWorker_Grandparent
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (!xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isGrandchildOf(me, other);
		}
	}
	public class PawnRelationWorker_Grandchild_Beast : PawnRelationWorker_Grandchild
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (!xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isGrandparentOf(me, other);  //if other isGrandchildOf of me, me is their grandparent
		}
	}
	public class PawnRelationWorker_NephewOrNiece_Beast : PawnRelationWorker_NephewOrNiece
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (!xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isUncleOrAuntOf(me, other);
		}
	}
	public class PawnRelationWorker_UncleOrAunt_Beast : PawnRelationWorker_UncleOrAunt
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (!xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isNephewOrNieceOf(me, other);
		}
	}

	public class PawnRelationWorker_Cousin_Beast : PawnRelationWorker_Cousin
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (!xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isCousinOf(me, other);
		}
	}

	public class PawnRelationWorker_GreatGrandparent_Beast : PawnRelationWorker_GreatGrandparent
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (!xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isGreatGrandChildOf(me, other);
		}
	}

	public class PawnRelationWorker_GreatGrandchild_Beast : PawnRelationWorker_GreatGrandchild
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (!xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isGreatGrandparentOf(me, other);
		}
	}

	public class PawnRelationWorker_GranduncleOrGrandaunt_Beast : PawnRelationWorker_GranduncleOrGrandaunt
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (!xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isGrandnephewOrGrandnieceOf(me, other);
		}
	}

	public class PawnRelationWorker_GrandnephewOrGrandniece_Beast : PawnRelationWorker_GrandnephewOrGrandniece
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (!xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isGreatUncleOrAuntOf(me, other);
		}
	}

	public class PawnRelationWorker_CousinOnceRemoved_Beast : PawnRelationWorker_CousinOnceRemoved
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (!xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isCousinOnceRemovedOf(me, other);
		}
	}

	public class PawnRelationWorker_SecondCousin_Beast : PawnRelationWorker_SecondCousin
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (!xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isSecondCousinOf(me, other);
		}
	}
	/*
	public class PawnRelationWorker_Kin_Beast : PawnRelationWorker_Kin
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (!xxx.is_animal(other) || me == other)
			{
				return false;
			}

			if (base.InRelation(me, other) == true)
			{
				return true;
			}
			return false;
		}
	}
	*/
}


code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse;

namespace rjw
{
	public class PawnRelationWorker_Child_Humanlike : PawnRelationWorker_Child
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isChildOf(other, me);
		}
	}

	public class PawnRelationWorker_Sibling_Humanlike : PawnRelationWorker_Sibling
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isSiblingOf(me, other);
		}
	}
	public class PawnRelationWorker_HalfSibling_Humanlike : PawnRelationWorker_HalfSibling
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isHalfSiblingOf(other, me);
		}
	}
	public class PawnRelationWorker_Grandparent_Humanlike : PawnRelationWorker_Grandparent
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isGrandchildOf(me, other);
		}
	}
	public class PawnRelationWorker_Grandchild_Humanlike : PawnRelationWorker_Grandchild
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isGrandparentOf(me, other);
		}
	}
	public class PawnRelationWorker_NephewOrNiece_Humanlike : PawnRelationWorker_NephewOrNiece
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isUncleOrAuntOf(me, other);
		}
	}
	public class PawnRelationWorker_UncleOrAunt_Humanlike : PawnRelationWorker_UncleOrAunt
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isNephewOrNieceOf(me, other);
		}
	}

	public class PawnRelationWorker_Cousin_Humanlike : PawnRelationWorker_Cousin
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isCousinOf(me, other);
		}
	}

	public class PawnRelationWorker_GreatGrandparent_Humanlike : PawnRelationWorker_GreatGrandparent
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isGreatGrandChildOf(me, other);
		}
	}

	public class PawnRelationWorker_GreatGrandchild_Humanlike : PawnRelationWorker_GreatGrandchild
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isGreatGrandparentOf(me, other);
		}
	}

	public class PawnRelationWorker_GranduncleOrGrandaunt_Humanlike : PawnRelationWorker_GranduncleOrGrandaunt
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isGrandnephewOrGrandnieceOf(me, other);
		}
	}

	public class PawnRelationWorker_GrandnephewOrGrandniece_Humanlike : PawnRelationWorker_GrandnephewOrGrandniece
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isGreatUncleOrAuntOf(me, other);
		}
	}

	public class PawnRelationWorker_CousinOnceRemoved_Humanlike : PawnRelationWorker_CousinOnceRemoved
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isCousinOnceRemovedOf(me, other);
		}
	}

	public class PawnRelationWorker_SecondCousin_Humanlike : PawnRelationWorker_SecondCousin
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (xxx.is_animal(other) || me == other)
			{
				return false;
			}

			return RelationChecker.isSecondCousinOf(me, other);
		}
	}

	public class PawnRelationWorker_Kin_Humanlike : PawnRelationWorker_Kin
	{
		public override bool InRelation(Pawn me, Pawn other)
		{
			if (xxx.is_animal(other) || me == other)
			{
				return false;
			}

			if (base.InRelation(me, other) == true)
			{
				return true;
			}
			return false;
		}
	}
}


code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse;

namespace rjw
{
	/// <summary>
	/// Checks for relations, workaround for relation checks that rely on other relation checks, since the vanilla inRelation checks have been prefixed.
	///
	/// Return true if first pawn is specified relation of the second pawn
	///
	///  If "me" isRelationOf "other" return true
	/// </summary>
	///
	public static class RelationChecker
	{
		// like getMother() but without gender, and capable of pulling second parent of same gender
		private static Pawn getParent(Pawn pawn, bool skipFirst)
		{
			if (pawn == null)
			{
				return null;
			}
			if (!pawn.RaceProps.IsFlesh)
			{
				return null;
			}
			if (pawn.relations == null)
			{
				return null;
			}
			foreach (DirectPawnRelation directPawnRelation in pawn.relations.DirectRelations)
			{
				if (directPawnRelation.def == PawnRelationDefOf.Parent)
				{
					if (!skipFirst)
					{
						return directPawnRelation.otherPawn;
					}
					skipFirst = false;
				}
			}
			return null;
		}

		// unnecessary but make reading relations easier
		public static Pawn getParent(Pawn pawn)
		{
			return getParent(pawn, false);
		}

		public static Pawn getSecondParent(Pawn pawn)
		{
			return getParent(pawn, true);
		}

		// checks against all Parent direct relations, ignoring gender
		public static bool isChildOf(Pawn me, Pawn other)
		{
			if (me == null || other ==null || me == other)
			{
				return false;
			}
			if (!other.RaceProps.IsFlesh)
			{
				return false;
			}
			if (me.relations == null)
			{
				return false;
			}
			foreach (DirectPawnRelation directPawnRelation in me.relations.DirectRelations)
			{
				if (directPawnRelation.def == PawnRelationDefOf.Parent && directPawnRelation.otherPawn == other)
				{
					return true;
				}
			}
			return false;
		}

		public static bool isSiblingOf(Pawn me, Pawn other)
		{
			if (me == null || me == other)
			{
				return false;
			}
			if (getParent(me) != null && getSecondParent(me) != null && (
				getParent(me) == getParent(other) && getSecondParent(me) == getSecondParent(other) || // if both have same parents
				getParent(me) == getSecondParent(other) && getSecondParent(me) == getParent(other))) // if parents swapped roles, idk how such relation would be named, but without this they are kin, which is wrong
			{
				return true;
			}
			return false;
		}

		public static bool isHalfSiblingOf(Pawn me, Pawn other)
		{
			if (me == null || me == other)
			{
				return false;
			}
			if (isSiblingOf(me, other))
			{
				return false;
			}
			return getParent(me) != null && (getParent(me) == getParent(other) || getParent(me) == getSecondParent(other)) ||
					getSecondParent(me) != null && (getSecondParent(me) == getParent(other) || getSecondParent(me) == getSecondParent(other));
		}

		public static bool isAnySiblingOf(Pawn me, Pawn other)
		{
			if (me == null || me == other)
			{
				return false;
			}
			if (getParent(me) != null && (getParent(me) == getParent(other) || getParent(me) == getSecondParent(other)) ||
				getSecondParent(me) != null && (getSecondParent(me) == getParent(other) || getSecondParent(me) == getSecondParent(other)))
			{
				return true;
			}
			return false;
		}

		public static bool isGrandchildOf(Pawn me, Pawn other)
		{
			if (me == null || me == other)
			{
				return false;
			}
			if ((getParent(me) != null && isChildOf(getParent(me), other)) || (getSecondParent(me) != null && isChildOf(getSecondParent(me), other)))
			{
				return true;
			}
			return false;
		}

		public static bool isGrandparentOf(Pawn me, Pawn other)
		{
			if (me == null || me == other)
			{
				return false;
			}
			if (isGrandchildOf(other, me))
			{
				return true;
			}
			return false;
		}

		public static bool isNephewOrNieceOf(Pawn me, Pawn other)
		{
			if (me == null || me == other)
			{
				return false;
			}
			if ((getParent(me) != null && (isAnySiblingOf(other, getParent(me)))) || (getSecondParent(me) != null && (isAnySiblingOf(other, getSecondParent(me)))))
			{
				return true;
			}
			return false;
		}

		public static bool isUncleOrAuntOf(Pawn me, Pawn other)
		{
			if (me == null || me == other)
			{
				return false;
			}
			if (isNephewOrNieceOf(other, me))
			{
				return true;
			}
			return false;
		}

		public static bool isCousinOf(Pawn me, Pawn other)
		{
			if (me == null || me == other)
			{
				return false;
			}

			if ((getParent(other) != null && isNephewOrNieceOf(me, getParent(other))) || (getSecondParent(other) != null && isNephewOrNieceOf(me, getSecondParent(other))))
			{
				return true;
			}
			return false;
		}

		public static bool isGreatGrandparentOf(Pawn me, Pawn other)
		{
			if (me == null || me == other)
			{
				return false;
			}

			return isGreatGrandChildOf(other, me);
		}

		public static bool isGreatGrandChildOf(Pawn me, Pawn other)
		{
			if (me == null || me == other)
			{
				return false;
			}

			if ((getParent(me) != null && isGrandchildOf(getParent(me), other)) || (getSecondParent(me) != null && isGrandchildOf(getSecondParent(me), other)))
			{
				return true;
			}
			return false;
		}

		public static bool isGreatUncleOrAuntOf(Pawn me, Pawn other)
		{
			if (me == null || me == other)
			{
				return false;
			}

			return isGrandnephewOrGrandnieceOf(other, me);
		}

		public static bool isGrandnephewOrGrandnieceOf(Pawn me, Pawn other)
		{
			if (me == null || me == other)
			{
				return false;
			}

			if ((getParent(me) != null && isUncleOrAuntOf(other, getParent(me))) || (getSecondParent(me) != null && isUncleOrAuntOf(other, getSecondParent(me))))
			{
				return true;
			}
			return false;
		}

		public static bool isCousinOnceRemovedOf(Pawn me, Pawn other)
		{
			if (me == null || me == other)
			{
				return false;
			}
			if ((getParent(other) != null && isCousinOf(me, getParent(other))) || (getSecondParent(other) != null && isCousinOf(me, getSecondParent(other))))
			{
				return true;
			}
			if ((getParent(other) != null && isGrandnephewOrGrandnieceOf(me, getParent(other))) || (getSecondParent(other) != null && isGrandnephewOrGrandnieceOf(me, getSecondParent(other))))
			{
				return true;
			}
			return false;
		}

		public static bool isSecondCousinOf(Pawn me, Pawn other)
		{
			if (me == null || me == other)
			{
				return false;
			}
			Pawn parent = getParent(other);
			if (parent != null && ((getParent(parent) != null && isGrandnephewOrGrandnieceOf(me, getParent(parent))) || (getSecondParent(parent) != null && isGrandnephewOrGrandnieceOf(me, getSecondParent(parent)))))
			{
				return true;
			}

			Pawn secondParent = getSecondParent(other);
			if (secondParent != null && (getParent(secondParent) != null && isGrandnephewOrGrandnieceOf(me, getParent(secondParent)) || (getSecondParent(secondParent) != null && isGrandnephewOrGrandnieceOf(me, getSecondParent(secondParent)))))
			{
				return true;
			}
			return false;
		}
	}
}


code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;

namespace rjw.RenderNodeWorkers
{
	public class PawnRenderNodeWorker_Apparel_DrawNude : PawnRenderSubWorker
	{
		public override bool CanDrawNowSub(PawnRenderNode node, PawnDrawParms parms)
		{
			return false;
		}
	}
}


code:
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{22F82FFF-8BD4-4CEE-9F22-C7DA71281E72}</ProjectGuid>
    <OutputType>Library</OutputType>
    <NoStdLib>false</NoStdLib>
    <AssemblyName>RJW</AssemblyName>
    <TargetFramework>net472</TargetFramework>
    <OutputPath>..\Assemblies\</OutputPath>
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
    <GenerateAssemblyInfo>False</GenerateAssemblyInfo>
    <FileAlignment>512</FileAlignment>
    <LangVersion>latest</LangVersion>
    <RootNamespace>rjw</RootNamespace>
    <Deterministic>false</Deterministic>
    <Prefer32Bit>false</Prefer32Bit>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <DefineConstants>TRACE;DEBUG</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <FileAlignment>4096</FileAlignment>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>none</DebugType>
    <Optimize>true</Optimize>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <!-- Set the `BENCHMARK` environment variable to "1" to enable benchmarking. -->
  <PropertyGroup Condition="'$(BENCHMARK)' == '1'">
    <DefineConstants>$(DefineConstants);BENCHMARK</DefineConstants>
  </PropertyGroup>
  <!-- Prevents copying DLLs on build. -->
  <!-- If you do still get copies, wipe out the `obj` folder and re-run the `restore` task. -->
  <!-- You can do this on the command line with: `msbuild /t:restore` -->
  <ItemDefinitionGroup>
    <Reference><Private>False</Private></Reference>
    <ProjectReference><Private>False</Private></ProjectReference>
    <PackageReference><ExcludeAssets>runtime</ExcludeAssets></PackageReference>
  </ItemDefinitionGroup>
  <ItemGroup>
    <Reference Include="Psychology">
      <HintPath>0trash\modpackages\Psychology.2018-11-18\Assemblies\Psychology.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="SyrTraits">
      <HintPath>0trash\modpackages\SYR.Individuality.1.1.7\1.1\Assemblies\SyrTraits.dll</HintPath>
      <Private>False</Private>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Krafs.Publicizer">
      <Version>2.*</Version>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <PackageReference Include="Krafs.Rimworld.Ref" Version="*" />
    <PackageReference Include="Lib.Harmony" Version="2.*" />
    <PackageReference Include="RimWorld.MultiplayerAPI">
      <Version>*</Version>
      <!-- Same as the Prepatcher -->
      <ExcludeAssets>none</ExcludeAssets>
    </PackageReference>
    <PackageReference Include="Zetrith.Prepatcher">
      <Version>*</Version>
      <!-- Including the api is required to not break debug options when using it as optional -->
      <ExcludeAssets>none</ExcludeAssets>
    </PackageReference>
  </ItemGroup>
  <ItemGroup>
    <Publicize Include="Assembly-CSharp" IncludeVirtualMembers="false" />
  </ItemGroup>
</Project>


code:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2024
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RimJobWorld.Main", "RimJobWorld.Main.csproj", "{22F82FFF-8BD4-4CEE-9F22-C7DA71281E72}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{22F82FFF-8BD4-4CEE-9F22-C7DA71281E72}.Debug|Any CPU.ActiveCfg = Release|Any CPU
		{22F82FFF-8BD4-4CEE-9F22-C7DA71281E72}.Debug|Any CPU.Build.0 = Release|Any CPU
		{22F82FFF-8BD4-4CEE-9F22-C7DA71281E72}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{22F82FFF-8BD4-4CEE-9F22-C7DA71281E72}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
		SolutionGuid = {16BA61E5-4C97-4E73-926D-6718DE8E4776}
	EndGlobalSection
EndGlobal


code:
using System;
using UnityEngine;
using Verse;
using System.Collections.Generic;

namespace rjw
{
	public class RJWDebugSettings : ModSettings
	{
		private static Vector2 scrollPosition;
		private static float height_modifier = 0f;

		public static void DoWindowContents(Rect inRect)
		{
			Rect outRect = new Rect(0f, 30f, inRect.width, inRect.height - 30f);
			Rect viewRect = new Rect(0f, 0f, inRect.width - 16f, inRect.height + height_modifier);

			Widgets.BeginScrollView(outRect, ref scrollPosition, viewRect); // scroll

			Listing_Standard listingStandard = new Listing_Standard();
			listingStandard.maxOneColumn = true;
			listingStandard.ColumnWidth = viewRect.width / 2.05f;
			listingStandard.Begin(viewRect);
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("submit_button_enabled".Translate(), ref RJWSettings.submit_button_enabled, "submit_button_enabled_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("RJW_designation_box".Translate(), ref RJWSettings.show_RJW_designation_box, "RJW_designation_box_desc".Translate());
			listingStandard.Gap(5f);
			if (listingStandard.ButtonText("Rjw Parts " + RJWSettings.ShowRjwParts))
			{
				Find.WindowStack.Add(new FloatMenu(new List<FloatMenuOption>()
					{
					  new FloatMenuOption("Extended", (() => RJWSettings.ShowRjwParts = RJWSettings.ShowParts.Extended)),
					  new FloatMenuOption("Show", (() => RJWSettings.ShowRjwParts = RJWSettings.ShowParts.Show)),
					  //new FloatMenuOption("Known".Translate(), (() => RJWSettings.ShowRjwParts = RJWSettings.ShowParts.Known)),
					  new FloatMenuOption("Hide", (() => RJWSettings.ShowRjwParts = RJWSettings.ShowParts.Hide))
					}));
			}
			listingStandard.Gap(30f);

			GUI.contentColor = Color.yellow;
			listingStandard.Label("YOU PATHETIC CHEATER ");
			GUI.contentColor = Color.white;
			listingStandard.CheckboxLabeled("override_RJW_designation_checks_name".Translate(), ref RJWSettings.override_RJW_designation_checks, "override_RJW_designation_checks_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("override_control".Translate(), ref RJWSettings.override_control, "override_control_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("AddTrait_Rapist".Translate(), ref RJWSettings.AddTrait_Rapist, "AddTrait_Rapist_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("AddTrait_Masocist".Translate(), ref RJWSettings.AddTrait_Masocist, "AddTrait_Masocist_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("AddTrait_Nymphomaniac".Translate(), ref RJWSettings.AddTrait_Nymphomaniac, "AddTrait_Nymphomaniac_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("AddTrait_Necrophiliac".Translate(), ref RJWSettings.AddTrait_Necrophiliac, "AddTrait_Necrophiliac_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("AddTrait_Nerves".Translate(), ref RJWSettings.AddTrait_Nerves, "AddTrait_Nerves_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("AddTrait_Zoophiliac".Translate(), ref RJWSettings.AddTrait_Zoophiliac, "AddTrait_Zoophiliac_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("Allow_RMB_DeepTalk".Translate(), ref RJWSettings.Allow_RMB_DeepTalk, "Allow_RMB_DeepTalk_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("Disable_bestiality_pregnancy_relations".Translate(), ref RJWSettings.Disable_bestiality_pregnancy_relations, "Disable_bestiality_pregnancy_relations_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("Disable_egg_pregnancy_relations".Translate(), ref RJWSettings.Disable_egg_pregnancy_relations, "Disable_egg_pregnancy_relations_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("Disable_MeditationFocusDrain".Translate(), ref RJWSettings.Disable_MeditationFocusDrain, "Disable_MeditationFocusDrain_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("Disable_RecreationDrain".Translate(), ref RJWSettings.Disable_RecreationDrain, "Disable_RecreationDrain_desc".Translate());
			listingStandard.Gap(5f);

			listingStandard.NewColumn();
			listingStandard.Gap(4f);
			GUI.contentColor = Color.yellow;
			listingStandard.CheckboxLabeled("legacy_PartsAdder".Translate(), ref RJWSettings.legacy_PartsAdder, "legacy_PartsAdder_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("designated_freewill".Translate(), ref RJWSettings.designated_freewill, "designated_freewill_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("override_lovin".Translate(), ref RJWSettings.override_lovin, "override_lovin_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("override_matin".Translate(), ref RJWSettings.override_matin, "override_matin_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("matin_crossbreed".Translate(), ref RJWSettings.matin_crossbreed, "matin_crossbreed_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("DevMode_name".Translate(), ref RJWSettings.DevMode, "DevMode_desc".Translate());
			listingStandard.Gap(5f);
			if (RJWSettings.DevMode)
			{
				listingStandard.CheckboxLabeled("WildMode_name".Translate(), ref RJWSettings.WildMode, "WildMode_desc".Translate());
				listingStandard.Gap(5f);
				listingStandard.CheckboxLabeled("HippieMode_name".Translate(), ref RJWSettings.HippieMode, "HippieMode_desc".Translate());
				listingStandard.Gap(5f);
				listingStandard.CheckboxLabeled("DebugLogJoinInBed".Translate(), ref RJWSettings.DebugLogJoinInBed, "DebugLogJoinInBed_desc".Translate());
				listingStandard.Gap(5f);
				listingStandard.CheckboxLabeled("DebugRape".Translate(), ref RJWSettings.DebugRape, "DebugRape_desc".Translate());
				listingStandard.Gap(5f);
				listingStandard.CheckboxLabeled("DebugInteraction".Translate(), ref RJWSettings.DebugInteraction, "DebugInteraction_desc".Translate());
				listingStandard.Gap(5f);
				listingStandard.CheckboxLabeled("DebugNymph".Translate(), ref RJWSettings.DebugNymph, "DebugNymph_desc".Translate());
				listingStandard.Gap(5f);
			}
			else
			{
				RJWSettings.DebugLogJoinInBed = false;
				RJWSettings.DebugRape = false;
			}
			listingStandard.CheckboxLabeled("GenderlessAsFuta_name".Translate(), ref RJWSettings.GenderlessAsFuta, "GenderlessAsFuta_desc".Translate());
			listingStandard.Gap(5f);
			GUI.contentColor = Color.white;

			listingStandard.Gap(30f);
			listingStandard.Label("maxDistanceCellsCasual_name".Translate() + ": " + (RJWSettings.maxDistanceCellsCasual), -1f, "maxDistanceCellsCasual_desc".Translate());
			RJWSettings.maxDistanceCellsCasual = listingStandard.Slider((int)RJWSettings.maxDistanceCellsCasual, 0, 10000);
			listingStandard.Label("maxDistanceCellsRape_name".Translate() + ": " + (RJWSettings.maxDistanceCellsRape), -1f, "maxDistanceCellsRape_desc".Translate());
			RJWSettings.maxDistanceCellsRape = listingStandard.Slider((int)RJWSettings.maxDistanceCellsRape, 0, 10000);
			listingStandard.Label("maxDistancePathCost_name".Translate() + ": " + (RJWSettings.maxDistancePathCost), -1f, "maxDistancePathCost_desc".Translate());
			RJWSettings.maxDistancePathCost = listingStandard.Slider((int)RJWSettings.maxDistancePathCost, 0, 5000);

			listingStandard.End();
			height_modifier = listingStandard.CurHeight;
			Widgets.EndScrollView();
		}

		public override void ExposeData()
		{
			base.ExposeData();
			Scribe_Values.Look(ref RJWSettings.submit_button_enabled, "submit_button_enabled", RJWSettings.submit_button_enabled, true);
			Scribe_Values.Look(ref RJWSettings.show_RJW_designation_box, "show_RJW_designation_box", RJWSettings.show_RJW_designation_box, true);
			Scribe_Values.Look(ref RJWSettings.ShowRjwParts, "ShowRjwParts", RJWSettings.ShowRjwParts, true);
			Scribe_Values.Look(ref RJWSettings.maxDistanceCellsCasual, "maxDistanceCellsCasual", RJWSettings.maxDistanceCellsCasual, true);
			Scribe_Values.Look(ref RJWSettings.maxDistanceCellsRape, "maxDistanceCellsRape", RJWSettings.maxDistanceCellsRape, true);
			Scribe_Values.Look(ref RJWSettings.maxDistancePathCost, "maxDistancePathCost", RJWSettings.maxDistancePathCost, true);

			Scribe_Values.Look(ref RJWSettings.AddTrait_Rapist, "AddTrait_Rapist", RJWSettings.AddTrait_Rapist, true);
			Scribe_Values.Look(ref RJWSettings.AddTrait_Masocist, "AddTrait_Masocist", RJWSettings.AddTrait_Masocist, true);
			Scribe_Values.Look(ref RJWSettings.AddTrait_Nymphomaniac, "AddTrait_Nymphomaniac", RJWSettings.AddTrait_Nymphomaniac, true);
			Scribe_Values.Look(ref RJWSettings.AddTrait_Necrophiliac, "AddTrait_Necrophiliac", RJWSettings.AddTrait_Necrophiliac, true);
			Scribe_Values.Look(ref RJWSettings.AddTrait_Nerves, "AddTrait_Nerves", RJWSettings.AddTrait_Nerves, true);
			Scribe_Values.Look(ref RJWSettings.AddTrait_Zoophiliac, "AddTrait_Zoophiliac", RJWSettings.AddTrait_Zoophiliac, true);

			Scribe_Values.Look(ref RJWSettings.Allow_RMB_DeepTalk, "Allow_RMB_DeepTalk", RJWSettings.Allow_RMB_DeepTalk, true);
			Scribe_Values.Look(ref RJWSettings.Allow_RMB_DeepTalk, "Allow_RMB_DeepTalk", RJWSettings.Allow_RMB_DeepTalk, true);
			Scribe_Values.Look(ref RJWSettings.Disable_bestiality_pregnancy_relations, "Disable_bestiality_pregnancy_relations", RJWSettings.Disable_bestiality_pregnancy_relations, true);
			Scribe_Values.Look(ref RJWSettings.Disable_egg_pregnancy_relations, "Disable_egg_pregnancy_relations", RJWSettings.Disable_egg_pregnancy_relations, true);
			Scribe_Values.Look(ref RJWSettings.Disable_MeditationFocusDrain, "Disable_MeditationFocusDrain", RJWSettings.Disable_MeditationFocusDrain, true);
			Scribe_Values.Look(ref RJWSettings.Disable_RecreationDrain, "Disable_RecreationDrain", RJWSettings.Disable_RecreationDrain, true);

			Scribe_Values.Look(ref RJWSettings.legacy_PartsAdder, "legacy_PartsAdder", RJWSettings.legacy_PartsAdder, true);
			Scribe_Values.Look(ref RJWSettings.GenderlessAsFuta, "GenderlessAsFuta", RJWSettings.GenderlessAsFuta, true);
			Scribe_Values.Look(ref RJWSettings.override_lovin, "override_lovin", RJWSettings.override_lovin, true);
			Scribe_Values.Look(ref RJWSettings.override_matin, "override_matin", RJWSettings.override_matin, true);
			Scribe_Values.Look(ref RJWSettings.matin_crossbreed, "matin_crossbreed", RJWSettings.matin_crossbreed, true);
			Scribe_Values.Look(ref RJWSettings.WildMode, "Wildmode", RJWSettings.WildMode, true);
			Scribe_Values.Look(ref RJWSettings.HippieMode, "Hippiemode", RJWSettings.HippieMode, true);
			Scribe_Values.Look(ref RJWSettings.override_RJW_designation_checks, "override_RJW_designation_checks", RJWSettings.override_RJW_designation_checks, true);
			Scribe_Values.Look(ref RJWSettings.override_control, "override_control", RJWSettings.override_control, true);
			Scribe_Values.Look(ref RJWSettings.DevMode, "DevMode", RJWSettings.DevMode, true);
			Scribe_Values.Look(ref RJWSettings.DebugLogJoinInBed, "DebugLogJoinInBed", RJWSettings.DebugLogJoinInBed, true);
			Scribe_Values.Look(ref RJWSettings.DebugRape, "DebugRape", RJWSettings.DebugRape, true);
			Scribe_Values.Look(ref RJWSettings.DebugInteraction, "DebugInteraction", RJWSettings.DebugInteraction, true);
			Scribe_Values.Look(ref RJWSettings.DebugNymph, "DebugNymph", RJWSettings.DebugNymph, true);
		}
	}
}


code:
using System;
using UnityEngine;
using Verse;

namespace rjw
{
	public class RJWHookupSettings : ModSettings
	{
		public static bool HookupsEnabled = true;
		public static bool QuickHookupsEnabled = true;
		public static bool NoHookupsDuringWorkHours = true;
		public static bool ColonistsCanHookup = true;
		public static bool ColonistsCanHookupWithVisitor = false;
		public static bool CanHookupWithPrisoner = false;
		public static bool VisitorsCanHookupWithColonists = false;
		public static bool VisitorsCanHookupWithVisitors = true;
		public static bool PrisonersCanHookupWithNonPrisoner = false;
		public static bool PrisonersCanHookupWithPrisoner = true;
		public static float HookupChanceForNonNymphos = 0.3f;
		public static float MinimumFuckabilityToHookup = 0.1f;
		public static float MinimumAttractivenessToHookup = 0.5f;
		public static float MinimumRelationshipToHookup = 20f;

		//public static bool NymphosCanPickAnyone = true;
		public static bool NymphosCanCheat = true;
		public static bool NymphosCanHomewreck = true;
		public static bool NymphosCanHomewreckReverse = true;

		private static Vector2 scrollPosition;
		private static float height_modifier = 0f;

		public static void DoWindowContents(Rect inRect)
		{
			MinimumFuckabilityToHookup = Mathf.Clamp(MinimumFuckabilityToHookup, 0.1f, 1f);
			MinimumAttractivenessToHookup = Mathf.Clamp(MinimumAttractivenessToHookup, 0.0f, 1f);
			MinimumRelationshipToHookup = Mathf.Clamp(MinimumRelationshipToHookup, -100, 100);

			Rect outRect = new Rect(0f, 30f, inRect.width, inRect.height - 30f);
			Rect viewRect = new Rect(0f, 0f, inRect.width - 16f, inRect.height + height_modifier);

			Widgets.BeginScrollView(outRect, ref scrollPosition, viewRect); // scroll

			Listing_Standard listingStandard = new Listing_Standard();
			listingStandard.maxOneColumn = true;
			listingStandard.ColumnWidth = viewRect.width / 2.05f;
			listingStandard.Begin(viewRect);
			listingStandard.Gap(4f);

			// Casual sex settings
			listingStandard.CheckboxLabeled("SettingHookupsEnabled".Translate(), ref HookupsEnabled, "SettingHookupsEnabled_desc".Translate());
			if(HookupsEnabled)
				listingStandard.CheckboxLabeled("SettingQuickHookupsEnabled".Translate(), ref QuickHookupsEnabled, "SettingQuickHookupsEnabled_desc".Translate());
			listingStandard.CheckboxLabeled("SettingNoHookupsDuringWorkHours".Translate(), ref NoHookupsDuringWorkHours, "SettingNoHookupsDuringWorkHours_desc".Translate());

			listingStandard.Gap(10f);
			listingStandard.CheckboxLabeled("SettingColonistsCanHookup".Translate(), ref ColonistsCanHookup, "SettingColonistsCanHookup_desc".Translate());
			listingStandard.CheckboxLabeled("SettingColonistsCanHookupWithVisitor".Translate(), ref ColonistsCanHookupWithVisitor, "SettingColonistsCanHookupWithVisitor_desc".Translate());
			listingStandard.CheckboxLabeled("SettingVisitorsCanHookupWithColonists".Translate(), ref VisitorsCanHookupWithColonists, "SettingVisitorsCanHookupWithColonists_desc".Translate());
			listingStandard.CheckboxLabeled("SettingVisitorsCanHookupWithVisitors".Translate(), ref VisitorsCanHookupWithVisitors, "SettingVisitorsCanHookupWithVisitors_desc".Translate());

			listingStandard.Gap(10f);
			listingStandard.CheckboxLabeled("SettingPrisonersCanHookupWithNonPrisoner".Translate(), ref PrisonersCanHookupWithNonPrisoner, "SettingPrisonersCanHookupWithNonPrisoner_desc".Translate());
			listingStandard.CheckboxLabeled("SettingPrisonersCanHookupWithPrisoner".Translate(), ref PrisonersCanHookupWithPrisoner, "SettingPrisonersCanHookupWithPrisoner_desc".Translate());
			listingStandard.CheckboxLabeled("SettingCanHookupWithPrisoner".Translate(), ref CanHookupWithPrisoner, "SettingCanHookupWithPrisoner_desc".Translate());

			listingStandard.Gap(10f);
			//listingStandard.CheckboxLabeled("SettingNymphosCanPickAnyone".Translate(), ref NymphosCanPickAnyone, "SettingNymphosCanPickAnyone_desc".Translate());
			listingStandard.CheckboxLabeled("SettingNymphosCanCheat".Translate(), ref NymphosCanCheat, "SettingNymphosCanCheat_desc".Translate());
			listingStandard.CheckboxLabeled("SettingNymphosCanHomewreck".Translate(), ref NymphosCanHomewreck, "SettingNymphosCanHomewreck_desc".Translate());
			listingStandard.CheckboxLabeled("SettingNymphosCanHomewreckReverse".Translate(), ref NymphosCanHomewreckReverse, "SettingNymphosCanHomewreckReverse_desc".Translate());

			listingStandard.Gap(10f);
			listingStandard.Label("SettingHookupChanceForNonNymphos".Translate() + ": " + (int)(HookupChanceForNonNymphos * 100) + "%", -1f, "SettingHookupChanceForNonNymphos_desc".Translate());
			HookupChanceForNonNymphos = listingStandard.Slider(HookupChanceForNonNymphos, 0.0f, 1.0f);
			listingStandard.Label("SettingMinimumFuckabilityToHookup".Translate() + ": " + (int)(MinimumFuckabilityToHookup * 100) + "%", -1f, "SettingMinimumFuckabilityToHookup_desc".Translate());
			MinimumFuckabilityToHookup = listingStandard.Slider(MinimumFuckabilityToHookup, 0.1f, 1.0f); // Minimum must be above 0.0 to avoid breaking SexAppraiser.would_fuck()'s hard-failure cases that return 0f
			listingStandard.Label("SettingMinimumAttractivenessToHookup".Translate() + ": " + (int)(MinimumAttractivenessToHookup * 100) + "%", -1f, "SettingMinimumAttractivenessToHookup_desc".Translate());
			MinimumAttractivenessToHookup = listingStandard.Slider(MinimumAttractivenessToHookup, 0.0f, 1.0f);
			listingStandard.Label("SettingMinimumRelationshipToHookup".Translate() + ": " + (MinimumRelationshipToHookup), -1f, "SettingMinimumRelationshipToHookup_desc".Translate());
			MinimumRelationshipToHookup = listingStandard.Slider((int)MinimumRelationshipToHookup, -100f, 100f);

			listingStandard.NewColumn();
			listingStandard.Gap(4f);

			listingStandard.End();
			height_modifier = listingStandard.CurHeight;
			Widgets.EndScrollView();
		}

		public override void ExposeData()
		{
			base.ExposeData();
			Scribe_Values.Look(ref HookupsEnabled, "SettingHookupsEnabled");
			Scribe_Values.Look(ref QuickHookupsEnabled, "SettingQuickHookupsEnabled");
			Scribe_Values.Look(ref NoHookupsDuringWorkHours, "NoHookupsDuringWorkHours");
			Scribe_Values.Look(ref ColonistsCanHookup, "SettingColonistsCanHookup");
			Scribe_Values.Look(ref ColonistsCanHookupWithVisitor, "SettingColonistsCanHookupWithVisitor");
			Scribe_Values.Look(ref VisitorsCanHookupWithColonists, "SettingVisitorsCanHookupWithColonists");
			Scribe_Values.Look(ref VisitorsCanHookupWithVisitors, "SettingVisitorsCanHookupWithVisitors");

			// Prisoner settings
			Scribe_Values.Look(ref CanHookupWithPrisoner, "SettingCanHookupWithPrisoner");
			Scribe_Values.Look(ref PrisonersCanHookupWithNonPrisoner, "SettingPrisonersCanHookupWithNonPrisoner");
			Scribe_Values.Look(ref PrisonersCanHookupWithPrisoner, "SettingPrisonersCanHookupWithPrisoner");

			// Nympho settings
			//Scribe_Values.Look(ref NymphosCanPickAnyone, "SettingNymphosCanPickAnyone");
			Scribe_Values.Look(ref NymphosCanCheat, "SettingNymphosCanCheat");
			Scribe_Values.Look(ref NymphosCanHomewreck, "SettingNymphosCanHomewreck");
			Scribe_Values.Look(ref NymphosCanHomewreckReverse, "SettingNymphosCanHomewreckReverse");

			Scribe_Values.Look(ref HookupChanceForNonNymphos, "SettingHookupChanceForNonNymphos");
			Scribe_Values.Look(ref MinimumFuckabilityToHookup, "SettingMinimumFuckabilityToHookup");
			Scribe_Values.Look(ref MinimumAttractivenessToHookup, "SettingMinimumAttractivenessToHookup");
			Scribe_Values.Look(ref MinimumRelationshipToHookup, "SettingMinimumRelationshipToHookup");
		}
	}
}


code:
using System;
using UnityEngine;
using Verse;

namespace rjw
{
	public class RJWPregnancySettings : ModSettings
	{
		public static bool humanlike_pregnancy_enabled = true;
		public static bool animal_pregnancy_enabled = true;
		public static bool animal_pregnancy_notifications_enabled = true;
		public static bool bestial_pregnancy_enabled = true;
		public static bool insect_pregnancy_enabled = true;
		public static bool insect_anal_pregnancy_enabled = false;
		public static bool insect_oral_pregnancy_enabled = false;
		public static bool egg_pregnancy_implant_anyone = true;
		public static bool egg_pregnancy_fertilize_anyone = false;
		public static bool egg_pregnancy_genes = true;
		public static bool egg_pregnancy_fertOrificeCheck_enabled = true;
		public static float egg_pregnancy_eggs_size = 1.0f;
		public static float egg_pregnancy_ovipositor_capacity_factor = 1f;
		public static bool safer_mechanoid_pregnancy = false;

		public static bool mechanoid_pregnancy_enabled = true;

		public static bool use_parent_method = true;
		public static float humanlike_DNA_from_mother = 0.5f;
		public static float bestiality_DNA_inheritance = 0.5f; // human/beast slider
		public static float bestial_DNA_from_mother = 1.0f; // mother/father slider

		public static bool complex_interspecies = false;
		public static int animal_impregnation_chance = 25;
		public static int humanlike_impregnation_chance = 25;
		public static float interspecies_impregnation_modifier = 0.2f;
		public static float fertility_endage_male = 1.2f;
		public static float fertility_endage_female_humanlike = 0.58f;
		public static float fertility_endage_female_animal = 0.96f;

		public static bool phantasy_pregnancy = false;
		public static float normal_pregnancy_duration = 1.0f;
		public static float egg_pregnancy_duration = 1.0f;
		public static float max_num_momtraits_inherited = 3.0f;
		public static float max_num_poptraits_inherited = 3.0f;

		private static bool useVanillaPregnancy = true;
		public static bool UseVanillaPregnancy => useVanillaPregnancy && ModsConfig.BiotechActive;

		private static Vector2 scrollPosition;
		private static float height_modifier = 0f;

		public static void DoWindowContents(Rect inRect)
		{
			Rect outRect = new Rect(0f, 30f, inRect.width, inRect.height - 30f);
			Rect viewRect = new Rect(0f, 30f, inRect.width - 16f, inRect.height + height_modifier);

			Widgets.BeginScrollView(outRect, ref scrollPosition, viewRect);

			Listing_Standard listingStandard = new Listing_Standard();
			listingStandard.maxOneColumn = true;
			listingStandard.ColumnWidth = viewRect.width / 2.05f;
			listingStandard.Begin(viewRect);
			listingStandard.Gap(4f);
			listingStandard.CheckboxLabeled("RJWH_pregnancy".Translate(), ref humanlike_pregnancy_enabled, "RJWH_pregnancy_desc".Translate());
			listingStandard.Gap(5f);
			if (ModsConfig.BiotechActive)
			{
				listingStandard.CheckboxLabeled("UseVanillaPregnancy".Translate(), ref useVanillaPregnancy, "UseVanillaPregnancy_desc".Translate());
				listingStandard.Gap(5f);
			}
			listingStandard.CheckboxLabeled("RJWA_pregnancy".Translate(), ref animal_pregnancy_enabled, "RJWA_pregnancy_desc".Translate());
			if (animal_pregnancy_enabled)
			{
				listingStandard.Gap(3f);
				listingStandard.CheckboxLabeled("  " + "RJWA_pregnancy_notifications".Translate(), ref animal_pregnancy_notifications_enabled, "RJWA_pregnancy_notifications_desc".Translate());
			}

			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("RJWB_pregnancy".Translate(), ref bestial_pregnancy_enabled, "RJWB_pregnancy_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("RJWI_pregnancy".Translate(), ref insect_pregnancy_enabled, "RJWI_pregnancy_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("egg_pregnancy_implant_anyone".Translate(), ref egg_pregnancy_implant_anyone, "egg_pregnancy_implant_anyone_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("egg_pregnancy_fertilize_anyone".Translate(), ref egg_pregnancy_fertilize_anyone, "egg_pregnancy_fertilize_anyone_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("egg_pregnancy_genes".Translate(), ref egg_pregnancy_genes, "egg_pregnancy_genes_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("RJWI_analPregnancy".Translate(), ref insect_anal_pregnancy_enabled, "RJWI_analPregnancy_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("RJWI_oralPregnancy".Translate(), ref insect_oral_pregnancy_enabled, "RJWI_oralPregnancy_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("RJWI_FertilizationCheck".Translate(), ref egg_pregnancy_fertOrificeCheck_enabled, "RJWI_FertilizationCheck_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.Gap(5f);

			int eggs_size = (int)(egg_pregnancy_eggs_size * 100);
			listingStandard.Label("egg_pregnancy_eggs_size".Translate() + ": " + eggs_size + "%", -1f, "egg_pregnancy_eggs_size_desc".Translate());
			egg_pregnancy_eggs_size = listingStandard.Slider(egg_pregnancy_eggs_size, 0.0f, 1.0f);
			int ovipositor_capacity_factor_percentage = (int)(egg_pregnancy_ovipositor_capacity_factor * 100);
			listingStandard.Label("egg_pregnancy_ovipositor_capacity_factor".Translate() + ": " + ovipositor_capacity_factor_percentage + "%", -1, "egg_pregnancy_ovipositor_capacity_factor_desc".Translate());
			// Note: Choose the domain any wider and a different input method has to be used or the slider width has to be increased!
			egg_pregnancy_ovipositor_capacity_factor = listingStandard.Slider(egg_pregnancy_ovipositor_capacity_factor, .1f, 5f);

			listingStandard.Gap(12f);

			listingStandard.CheckboxLabeled("UseParentMethod".Translate(), ref use_parent_method, "UseParentMethod_desc".Translate());
			listingStandard.Gap(5f);
			if (use_parent_method)
			{
				if (humanlike_DNA_from_mother == 0.0f)
				{
					listingStandard.Label("  " + "OffspringLookLikeTheirMother".Translate() + ": " + "AlwaysFather".Translate(), -1f, "OffspringLookLikeTheirMother_desc".Translate());
					humanlike_DNA_from_mother = listingStandard.Slider(humanlike_DNA_from_mother, 0.0f, 1.0f);
				}
				else if (humanlike_DNA_from_mother == 1.0f)
				{
					listingStandard.Label("  " + "OffspringLookLikeTheirMother".Translate() + ": " + "AlwaysMother".Translate(), -1f, "OffspringLookLikeTheirMother_desc".Translate());
					humanlike_DNA_from_mother = listingStandard.Slider(humanlike_DNA_from_mother, 0.0f, 1.0f);
				}
				else
				{
					int value = (int)(humanlike_DNA_from_mother * 100);
					listingStandard.Label("  " + "OffspringLookLikeTheirMother".Translate() + ": " + value + "%", -1f, "OffspringLookLikeTheirMother_desc".Translate());
					humanlike_DNA_from_mother = listingStandard.Slider(humanlike_DNA_from_mother, 0.0f, 1.0f);
				}

				if (bestial_DNA_from_mother == 0.0f)
				{
					listingStandard.Label("  " + "OffspringIsHuman".Translate() + ": " + "AlwaysFather".Translate(), -1f, "OffspringIsHuman_desc".Translate());
					bestial_DNA_from_mother = listingStandard.Slider(bestial_DNA_from_mother, 0.0f, 1.0f);
				}
				else if (bestial_DNA_from_mother == 1.0f)
				{
					listingStandard.Label("  " + "OffspringIsHuman".Translate() + ": " + "AlwaysMother".Translate(), -1f, "OffspringIsHuman_desc".Translate());
					bestial_DNA_from_mother = listingStandard.Slider(bestial_DNA_from_mother, 0.0f, 1.0f);
				}
				else
				{
					int value = (int)(bestial_DNA_from_mother * 100);
					listingStandard.Label("  " + "OffspringIsHuman".Translate() + ": " + value + "%", -1f, "OffspringIsHuman_desc".Translate());
					bestial_DNA_from_mother = listingStandard.Slider(bestial_DNA_from_mother, 0.0f, 1.0f);
				}

				if (bestiality_DNA_inheritance == 0.0f)
				{
					listingStandard.Label("  " + "OffspringIsHuman2".Translate() + ": " + "AlwaysBeast".Translate(), -1f, "OffspringIsHuman2_desc".Translate());
					bestiality_DNA_inheritance = listingStandard.Slider(bestiality_DNA_inheritance, 0.0f, 1.0f);
				}
				else if (bestiality_DNA_inheritance == 1.0f)
				{
					listingStandard.Label("  " + "OffspringIsHuman2".Translate() + ": " + "AlwaysHumanlike".Translate(), -1f, "OffspringIsHuman2_desc".Translate());
					bestiality_DNA_inheritance = listingStandard.Slider(bestiality_DNA_inheritance, 0.0f, 1.0f);
				}
				else
				{
					listingStandard.Label("  " + "OffspringIsHuman2".Translate() + ": " + "UsesOffspringIsHuman".Translate(), -1f, "OffspringIsHuman2_desc".Translate());
					bestiality_DNA_inheritance = listingStandard.Slider(bestiality_DNA_inheritance, 0.0f, 1.0f);
				}
			}
			else
				humanlike_DNA_from_mother = 100;

			listingStandard.Gap(5f);
			listingStandard.Label("max_num_momtraits_inherited".Translate() + ": " + (int)(max_num_momtraits_inherited));
			max_num_momtraits_inherited = listingStandard.Slider(max_num_momtraits_inherited, 0.0f, 9.0f);
			listingStandard.Gap(5f);
			listingStandard.Label("max_num_poptraits_inherited".Translate() + ": " + (int)(max_num_poptraits_inherited));
			max_num_poptraits_inherited = listingStandard.Slider(max_num_poptraits_inherited, 0.0f, 9.0f);
			listingStandard.Gap(5f);

			listingStandard.CheckboxLabeled("MechanoidImplanting".Translate(), ref mechanoid_pregnancy_enabled, "MechanoidImplanting_desc".Translate());
			listingStandard.Gap(5f);
			if (mechanoid_pregnancy_enabled)
			{
				listingStandard.CheckboxLabeled("SaferMechanoidImplanting".Translate(), ref safer_mechanoid_pregnancy, "SaferMechanoidImplanting_desc".Translate());
				listingStandard.Gap(5f);
			}
			listingStandard.CheckboxLabeled("ComplexImpregnation".Translate(), ref complex_interspecies, "ComplexImpregnation_desc".Translate());
			listingStandard.Gap(10f);

			GUI.contentColor = Color.cyan;
			listingStandard.Label("Base pregnancy chances:");
			listingStandard.Gap(5f);
			if (humanlike_pregnancy_enabled)
				listingStandard.Label("  Humanlike/Humanlike (same race): " + humanlike_impregnation_chance + "%");
			else
				listingStandard.Label("  Humanlike/Humanlike (same race): -DISABLED-");
			if (humanlike_pregnancy_enabled && !(humanlike_impregnation_chance * interspecies_impregnation_modifier <= 0.0f) && !complex_interspecies)
				listingStandard.Label("  Humanlike/Humanlike (different race): " + Math.Round(humanlike_impregnation_chance * interspecies_impregnation_modifier, 1) + "%");
			else if (complex_interspecies)
				listingStandard.Label("  Humanlike/Humanlike (different race): -DEPENDS ON SPECIES-");
			else
				listingStandard.Label("  Humanlike/Humanlike (different race): -DISABLED-");
			if (animal_pregnancy_enabled)
				listingStandard.Label("  Animal/Animal (same race): " + animal_impregnation_chance + "%");
			else
				listingStandard.Label("  Animal/Animal (same race): -DISABLED-");
			if (animal_pregnancy_enabled && !(animal_impregnation_chance * interspecies_impregnation_modifier <= 0.0f) && !complex_interspecies)
				listingStandard.Label("  Animal/Animal (different race): " + Math.Round(animal_impregnation_chance * interspecies_impregnation_modifier, 1) + "%");
			else if (complex_interspecies)
				listingStandard.Label("  Animal/Animal (different race): -DEPENDS ON SPECIES-");
			else
				listingStandard.Label("  Animal/Animal (different race): -DISABLED-");
			if (RJWSettings.bestiality_enabled && bestial_pregnancy_enabled && !(animal_impregnation_chance * interspecies_impregnation_modifier <= 0.0f) && !complex_interspecies)
				listingStandard.Label("  Humanlike/Animal: " + Math.Round(animal_impregnation_chance * interspecies_impregnation_modifier, 1) + "%");
			else if (complex_interspecies)
				listingStandard.Label("  Humanlike/Animal: -DEPENDS ON SPECIES-");
			else
				listingStandard.Label("  Humanlike/Animal: -DISABLED-");
			if (RJWSettings.bestiality_enabled && bestial_pregnancy_enabled && !(animal_impregnation_chance * interspecies_impregnation_modifier <= 0.0f) && !complex_interspecies)
				listingStandard.Label("  Animal/Humanlike: " + Math.Round(humanlike_impregnation_chance * interspecies_impregnation_modifier, 1) + "%");
			else if (complex_interspecies)
				listingStandard.Label("  Animal/Humanlike: -DEPENDS ON SPECIES-");
			else
				listingStandard.Label("  Animal/Humanlike: -DISABLED-");
			GUI.contentColor = Color.white;

			listingStandard.NewColumn();
			listingStandard.Gap(4f);
			listingStandard.Label("PregnantCoeffecientForHuman".Translate() + ": " + humanlike_impregnation_chance + "%", -1f, "PregnantCoeffecientForHuman_desc".Translate());
			humanlike_impregnation_chance = (int)listingStandard.Slider(humanlike_impregnation_chance, 0.0f, 100f);
			listingStandard.Label("PregnantCoeffecientForAnimals".Translate() + ": " + animal_impregnation_chance + "%", -1f, "PregnantCoeffecientForAnimals_desc".Translate());
			animal_impregnation_chance = (int)listingStandard.Slider(animal_impregnation_chance, 0.0f, 100f);
			if (!complex_interspecies)
			{
				switch (interspecies_impregnation_modifier)
				{
					case 0.0f:
						GUI.contentColor = Color.grey;
						listingStandard.Label("InterspeciesImpregnantionModifier".Translate() + ": " + "InterspeciesDisabled".Translate(), -1f, "InterspeciesImpregnantionModifier_desc".Translate());
						GUI.contentColor = Color.white;
						break;
					case 1.0f:
						GUI.contentColor = Color.cyan;
						listingStandard.Label("InterspeciesImpregnantionModifier".Translate() + ": " + "InterspeciesMaximum".Translate(), -1f, "InterspeciesImpregnantionModifier_desc".Translate());
						GUI.contentColor = Color.white;
						break;
					default:
						listingStandard.Label("InterspeciesImpregnantionModifier".Translate() + ": " + Math.Round(interspecies_impregnation_modifier * 100, 1) + "%", -1f, "InterspeciesImpregnantionModifier_desc".Translate());
						break;
				}
				interspecies_impregnation_modifier = listingStandard.Slider(interspecies_impregnation_modifier, 0.0f, 1.0f);
			}
			listingStandard.Label("RJW_fertility_endAge_male".Translate() + ": " + (int)(fertility_endage_male * 80) + "In_human_years".Translate(), -1f, "RJW_fertility_endAge_male_desc".Translate());
			fertility_endage_male = listingStandard.Slider(fertility_endage_male, 0.1f, 3.0f);
			listingStandard.Label("RJW_fertility_endAge_female_humanlike".Translate() + ": " + (int)(fertility_endage_female_humanlike * 80) + "In_human_years".Translate(), -1f, "RJW_fertility_endAge_female_humanlike_desc".Translate());
			fertility_endage_female_humanlike = listingStandard.Slider(fertility_endage_female_humanlike, 0.1f, 3.0f);
			listingStandard.Label("RJW_fertility_endAge_female_animal".Translate() + ": " + (int)(fertility_endage_female_animal * 100) + "XofLifeExpectancy".Translate(), -1f, "RJW_fertility_endAge_female_animal_desc".Translate());
			fertility_endage_female_animal = listingStandard.Slider(fertility_endage_female_animal, 0.1f, 3.0f);
			listingStandard.Gap(10f);

			listingStandard.CheckboxLabeled("phantasy_pregnancy".Translate(), ref phantasy_pregnancy, "phantasy_pregnancy_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.Label("normal_pregnancy_duration".Translate() + ": " + (int)(normal_pregnancy_duration * 100) + "%", -1f, "normal_pregnancy_duration_desc".Translate());
			normal_pregnancy_duration = listingStandard.Slider(normal_pregnancy_duration, 0.05f, 2.0f);
			listingStandard.Gap(5f);
			listingStandard.Label("egg_pregnancy_duration".Translate() + ": " + (int)(egg_pregnancy_duration * 100) + "%", -1f, "egg_pregnancy_duration_desc".Translate());
			egg_pregnancy_duration = listingStandard.Slider(egg_pregnancy_duration, 0.05f, 2.0f);
			listingStandard.Gap(5f);

			listingStandard.End();
			height_modifier = listingStandard.CurHeight;
			Widgets.EndScrollView();
		}

		public override void ExposeData()
		{
			base.ExposeData();
			Scribe_Values.Look(ref humanlike_pregnancy_enabled, "humanlike_pregnancy_enabled", humanlike_pregnancy_enabled, true);
			Scribe_Values.Look(ref useVanillaPregnancy, "useVanillaPregnancy", useVanillaPregnancy, true);
			Scribe_Values.Look(ref animal_pregnancy_enabled, "animal_enabled", animal_pregnancy_enabled, true);
			Scribe_Values.Look(ref animal_pregnancy_notifications_enabled, "animal_notifications_enabled", animal_pregnancy_notifications_enabled, true);
			Scribe_Values.Look(ref bestial_pregnancy_enabled, "bestial_pregnancy_enabled", bestial_pregnancy_enabled, true);
			Scribe_Values.Look(ref insect_pregnancy_enabled, "insect_pregnancy_enabled", insect_pregnancy_enabled, true);
			Scribe_Values.Look(ref insect_anal_pregnancy_enabled, "insect_anal_pregnancy_enabled", insect_anal_pregnancy_enabled, true);
			Scribe_Values.Look(ref insect_oral_pregnancy_enabled, "insect_oral_pregnancy_enabled", insect_oral_pregnancy_enabled, true);
			Scribe_Values.Look(ref egg_pregnancy_implant_anyone, "egg_pregnancy_implant_anyone", egg_pregnancy_implant_anyone, true);
			Scribe_Values.Look(ref egg_pregnancy_fertilize_anyone, "egg_pregnancy_fertilize_anyone", egg_pregnancy_fertilize_anyone, true);
			Scribe_Values.Look(ref egg_pregnancy_genes, "egg_pregnancy_genes", egg_pregnancy_genes, true);
			Scribe_Values.Look(ref egg_pregnancy_fertOrificeCheck_enabled, "egg_pregnancy_fertOrificeCheck_enabled", egg_pregnancy_fertOrificeCheck_enabled, true);
			Scribe_Values.Look(ref egg_pregnancy_eggs_size, "egg_pregnancy_eggs_size", egg_pregnancy_eggs_size, true);
			Scribe_Values.Look(ref egg_pregnancy_ovipositor_capacity_factor, "egg_pregnancy_ovipositor_capacity_factor", egg_pregnancy_ovipositor_capacity_factor, true);
			Scribe_Values.Look(ref mechanoid_pregnancy_enabled, "mechanoid_enabled", mechanoid_pregnancy_enabled, true);
			Scribe_Values.Look(ref safer_mechanoid_pregnancy, "safer_mechanoid_pregnancy", safer_mechanoid_pregnancy, true);
			Scribe_Values.Look(ref use_parent_method, "use_parent_method", use_parent_method, true);
			Scribe_Values.Look(ref humanlike_DNA_from_mother, "humanlike_DNA_from_mother", humanlike_DNA_from_mother, true);
			Scribe_Values.Look(ref bestial_DNA_from_mother, "bestial_DNA_from_mother", bestial_DNA_from_mother, true);
			Scribe_Values.Look(ref bestiality_DNA_inheritance, "bestiality_DNA_inheritance", bestiality_DNA_inheritance, true);
			Scribe_Values.Look(ref humanlike_impregnation_chance, "humanlike_impregnation_chance", humanlike_impregnation_chance, true);
			Scribe_Values.Look(ref animal_impregnation_chance, "animal_impregnation_chance", animal_impregnation_chance, true);
			Scribe_Values.Look(ref interspecies_impregnation_modifier, "interspecies_impregnation_chance", interspecies_impregnation_modifier, true);
			Scribe_Values.Look(ref complex_interspecies, "complex_interspecies", complex_interspecies, true);
			Scribe_Values.Look(ref fertility_endage_male, "RJW_fertility_endAge_male", fertility_endage_male, true);
			Scribe_Values.Look(ref fertility_endage_female_humanlike, "fertility_endage_female_humanlike", fertility_endage_female_humanlike, true);
			Scribe_Values.Look(ref fertility_endage_female_animal, "fertility_endage_female_animal", fertility_endage_female_animal, true);
			Scribe_Values.Look(ref phantasy_pregnancy, "phantasy_pregnancy", phantasy_pregnancy, true);
			Scribe_Values.Look(ref normal_pregnancy_duration, "normal_pregnancy_duration", normal_pregnancy_duration, true);
			Scribe_Values.Look(ref egg_pregnancy_duration, "egg_pregnancy_duration", egg_pregnancy_duration, true);
			Scribe_Values.Look(ref max_num_momtraits_inherited, "max_num_momtraits_inherited", max_num_momtraits_inherited, true);
			Scribe_Values.Look(ref max_num_poptraits_inherited, "max_num_poptraits_inherited", max_num_poptraits_inherited, true);
		}
	}
}


code:
using System;
using UnityEngine;
using Verse;

namespace rjw
{
	public class RJWSettings : ModSettings
	{
		public static bool animal_on_animal_enabled = false;
		public static bool animal_on_human_enabled = false;
		public static bool bestiality_enabled = false;
		public static bool necrophilia_enabled = false;
		private static bool overdrive = false;

		public static bool rape_enabled = false;
		public static bool designated_freewill = true;
		public static bool legacy_PartsAdder = false;
		public static bool animal_CP_rape = false;
		public static bool visitor_CP_rape = false;
		public static bool colonist_CP_rape = false;
		public static bool rape_beating = false;
		public static bool gentle_rape_beating = false;
		public static bool rape_stripping = false;

		public static bool cum_filth = true;
		public static bool sounds_enabled = true;
		public static float sounds_sex_volume = 1.0f;
		public static float sounds_cum_volume = 1.0f;
		public static float sounds_voice_volume = 1.0f;
		public static float sounds_orgasm_volume = 1.0f;
		public static float sounds_animal_on_animal_volume = 0.5f;

		public static bool NymphTamed = false;
		public static bool NymphWild = true;
		public static bool NymphRaidEasy = false;
		public static bool NymphRaidHard = false;
		public static bool NymphRaidRP = false;
		public static bool NymphPermanentManhunter = false;
		public static bool NymphSappers = true;
		public static bool NymphFrustratedRape = true;
		public static bool FemaleFuta = false;
		public static bool MaleTrap = false;
		public static float male_nymph_chance = 0.0f;
		public static float futa_nymph_chance = 0.0f;
		public static float futa_natives_chance = 0.0f;
		public static float futa_spacers_chance = 0.5f;

		public static bool sexneed_fix = true;
		public static float sexneed_decay_rate = 1.0f;
		public static int Animal_mating_cooldown = 0;

		public static float nonFutaWomenRaping_MaxVulnerability = 0.8f;
		public static float rapee_MinVulnerability_human = 1.2f;

		public static bool RPG_hero_control = false;
		public static bool RPG_hero_control_HC = false;
		public static bool RPG_hero_control_Ironman = false;

		public static bool submit_button_enabled = true;
		public static bool show_RJW_designation_box = false;
		public static ShowParts ShowRjwParts = ShowParts.Show;
		public static float maxDistanceCellsCasual = 100;
		public static float maxDistanceCellsRape = 100;
		public static float maxDistancePathCost = 1000;

		public static bool WildMode = false;
		public static bool HippieMode = false;
		public static bool override_RJW_designation_checks = false;
		public static bool override_control = false;
		public static bool override_lovin = true;
		public static bool override_matin = true;
		public static bool matin_crossbreed = false;
		public static bool GenderlessAsFuta = false;
		public static bool DevMode = false;
		public static bool DebugLogJoinInBed = false;
		public static bool DebugRape = false;
		public static bool DebugInteraction = false;
		public static bool DebugNymph = false;
		public static bool AddTrait_Rapist = true;
		public static bool AddTrait_Masocist = true;
		public static bool AddTrait_Nymphomaniac = true;
		public static bool AddTrait_Necrophiliac = true;
		public static bool AddTrait_Nerves = true;
		public static bool AddTrait_Zoophiliac = true;
		public static bool Allow_RMB_DeepTalk = false;
		public static bool Disable_bestiality_pregnancy_relations = false;
		public static bool Disable_egg_pregnancy_relations = false;
		public static bool Disable_MeditationFocusDrain = false;
		public static bool Disable_RecreationDrain = false;
		public static bool UseAdvancedAgeScaling = true;
		public static bool AllowYouthSex = true;
		public static bool sendTraitGainLetters = true;

		private static Vector2 scrollPosition;
		private static float height_modifier = 300f;

		public enum ShowParts
		{
			Extended,
			Show,
			Known,
			Hide
		};

		public static void DoWindowContents(Rect inRect)
		{
			sexneed_decay_rate = Mathf.Clamp(sexneed_decay_rate, 0.0f, 10000.0f);
			nonFutaWomenRaping_MaxVulnerability = Mathf.Clamp(nonFutaWomenRaping_MaxVulnerability, 0.0f, 3.0f);
			rapee_MinVulnerability_human = Mathf.Clamp(rapee_MinVulnerability_human, 0.0f, 3.0f);

			Rect outRect = new Rect(0f, 30f, inRect.width, inRect.height - 30f);
			Rect viewRect = new Rect(0f, 0f, inRect.width - 16f, inRect.height + height_modifier);

			Widgets.BeginScrollView(outRect, ref scrollPosition, viewRect); // scroll

			Listing_Standard listingStandard = new Listing_Standard();
			listingStandard.maxOneColumn = true;
			listingStandard.ColumnWidth = viewRect.width / 2.05f;
			listingStandard.Begin(viewRect);
			listingStandard.Gap(4f);
			listingStandard.CheckboxLabeled("animal_on_animal_enabled".Translate(), ref animal_on_animal_enabled, "animal_on_animal_enabled_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("animal_on_human_enabled".Translate(), ref animal_on_human_enabled, "animal_on_human_enabled_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("bestiality_enabled".Translate(), ref bestiality_enabled, "bestiality_enabled_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("necrophilia_enabled".Translate(), ref necrophilia_enabled, "necrophilia_enabled_desc".Translate());
			listingStandard.Gap(10f);
			listingStandard.CheckboxLabeled("rape_enabled".Translate(), ref rape_enabled, "rape_enabled_desc".Translate());
			if (rape_enabled)
			{
				listingStandard.Gap(3f);
				listingStandard.CheckboxLabeled("  " + "rape_stripping".Translate(), ref rape_stripping, "rape_stripping_desc".Translate());
				listingStandard.Gap(3f);
				listingStandard.CheckboxLabeled("  " + "ColonistCanCP".Translate(), ref colonist_CP_rape, "ColonistCanCP_desc".Translate());
				listingStandard.Gap(3f);
				listingStandard.CheckboxLabeled("  " + "VisitorsCanCP".Translate(), ref visitor_CP_rape, "VisitorsCanCP_desc".Translate());
				listingStandard.Gap(3f);
				//if (!bestiality_enabled)
				//{
				//	GUI.contentColor = Color.grey;
				//	animal_CP_rape = false;
				//}
				//listingStandard.CheckboxLabeled("  " + "AnimalsCanCP".Translate(), ref animal_CP_rape, "AnimalsCanCP_desc".Translate());
				//if (!bestiality_enabled)
				//	GUI.contentColor = Color.white;
				listingStandard.Gap(3f);
				listingStandard.CheckboxLabeled("  " + "PrisonersBeating".Translate(), ref rape_beating, "PrisonersBeating_desc".Translate());
				listingStandard.Gap(3f);
				listingStandard.CheckboxLabeled("   " + "GentlePrisonersBeating".Translate(), ref gentle_rape_beating, "GentlePrisonersBeating_desc".Translate());
			}
			else
			{
				colonist_CP_rape = false;
				visitor_CP_rape = false;
				animal_CP_rape = false;
				rape_beating = false;
			}
			listingStandard.Gap(10f);
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("cum_filth".Translate(), ref cum_filth, "cum_filth_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("sounds_enabled".Translate(), ref sounds_enabled, "sounds_enabled_desc".Translate());
			if (sounds_enabled)
			{
				listingStandard.Label("sounds_sex_volume".Translate() + ": " + Math.Round(sounds_sex_volume * 100f, 0) + "%", -1f, "sounds_sex_volume_desc".Translate());
				sounds_sex_volume = listingStandard.Slider(sounds_sex_volume, 0f, 2f);
				listingStandard.Label("sounds_cum_volume".Translate() + ": " + Math.Round(sounds_cum_volume * 100f, 0) + "%", -1f, "sounds_cum_volume_desc".Translate());
				sounds_cum_volume = listingStandard.Slider(sounds_cum_volume, 0f, 2f);
				listingStandard.Label("sounds_voice_volume".Translate() + ": " + Math.Round(sounds_voice_volume * 100f, 0) + "%", -1f, "sounds_voice_volume_desc".Translate());
				sounds_voice_volume = listingStandard.Slider(sounds_voice_volume, 0f, 2f);
				listingStandard.Label("sounds_orgasm_volume".Translate() + ": " + Math.Round(sounds_orgasm_volume * 100f, 0) + "%", -1f, "sounds_orgasm_volume_desc".Translate());
				sounds_orgasm_volume = listingStandard.Slider(sounds_orgasm_volume, 0f, 2f);
				listingStandard.Label("sounds_animal_on_animal_volume".Translate() + ": " + Math.Round(sounds_animal_on_animal_volume * 100f, 0) + "%", -1f, "sounds_animal_on_animal_volume_desc".Translate());
				sounds_animal_on_animal_volume = listingStandard.Slider(sounds_animal_on_animal_volume, 0f, 2f);
			}
			listingStandard.Gap(10f);
			listingStandard.CheckboxLabeled("RPG_hero_control_name".Translate(), ref RPG_hero_control, "RPG_hero_control_desc".Translate());
			listingStandard.Gap(5f);
			if (RPG_hero_control)
			{
				listingStandard.CheckboxLabeled("RPG_hero_control_HC_name".Translate(), ref RPG_hero_control_HC, "RPG_hero_control_HC_desc".Translate());
				listingStandard.Gap(5f);
				listingStandard.CheckboxLabeled("RPG_hero_control_Ironman_name".Translate(), ref RPG_hero_control_Ironman, "RPG_hero_control_Ironman_desc".Translate());
				listingStandard.Gap(5f);
			}
			else
			{
				RPG_hero_control_HC = false;
				RPG_hero_control_Ironman = false;
			}

			listingStandard.Gap(10f);
			listingStandard.CheckboxLabeled("UseAdvancedAgeScaling".Translate(), ref UseAdvancedAgeScaling, "UseAdvancedAgeScaling_desc".Translate());
			listingStandard.CheckboxLabeled("AllowYouthSex".Translate(), ref AllowYouthSex, "AllowYouthSex_desc".Translate());

			listingStandard.NewColumn();
			listingStandard.Gap(4f);
			GUI.contentColor = Color.white;
			if (sexneed_decay_rate < 2.5f)
			{
				overdrive = false;
				listingStandard.Label("sexneed_decay_rate_name".Translate() + ": " + Math.Round(sexneed_decay_rate * 100f, 0) + "%", -1f, "sexneed_decay_rate_desc".Translate());
				sexneed_decay_rate = listingStandard.Slider(sexneed_decay_rate, 0.0f, 5.0f);
			}
			else if (sexneed_decay_rate <= 5.0f && !overdrive)
			{
				GUI.contentColor = Color.yellow;
				listingStandard.Label("sexneed_decay_rate_name".Translate() + ": " + Math.Round(sexneed_decay_rate * 100f, 0) + "% [Not recommended]", -1f, "sexneed_decay_rate_desc".Translate());
				sexneed_decay_rate = listingStandard.Slider(sexneed_decay_rate, 0.0f, 5.0f);
				if (sexneed_decay_rate == 5.0f)
				{
					GUI.contentColor = Color.red;
					if (listingStandard.ButtonText("OVERDRIVE"))
						overdrive = true;
				}
				GUI.contentColor = Color.white;
			}
			else
			{
				GUI.contentColor = Color.red;
				listingStandard.Label("sexneed_decay_rate_name".Translate() + ": " + Math.Round(sexneed_decay_rate * 100f, 0) + "% [WARNING: UNSAFE]", -1f, "sexneed_decay_rate_desc".Translate());
				GUI.contentColor = Color.white;
				sexneed_decay_rate = listingStandard.Slider(sexneed_decay_rate, 0.0f, 10000.0f);
			}
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("sexneed_fix_name".Translate(), ref sexneed_fix, "sexneed_fix_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.Label("Animal_mating_cooldown".Translate() + ": " + Animal_mating_cooldown + "h", -1f, "Animal_mating_cooldown_desc".Translate());
			Animal_mating_cooldown = (int)listingStandard.Slider(Animal_mating_cooldown, 0, 100);
			listingStandard.Gap(5f);
			if (rape_enabled)
			{
				listingStandard.Label("NonFutaWomenRaping_MaxVulnerability".Translate() + ": " + (int)(nonFutaWomenRaping_MaxVulnerability * 100), -1f, "NonFutaWomenRaping_MaxVulnerability_desc".Translate());
				nonFutaWomenRaping_MaxVulnerability = listingStandard.Slider(nonFutaWomenRaping_MaxVulnerability, 0.0f, 3.0f);
				listingStandard.Label("Rapee_MinVulnerability_human".Translate() + ": " + (int)(rapee_MinVulnerability_human * 100), -1f, "Rapee_MinVulnerability_human_desc".Translate());
				rapee_MinVulnerability_human = listingStandard.Slider(rapee_MinVulnerability_human, 0.0f, 3.0f);
			}
			listingStandard.Gap(20f);
			listingStandard.CheckboxLabeled("NymphTamed".Translate(), ref NymphTamed, "NymphTamed_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("NymphWild".Translate(), ref NymphWild, "NymphWild_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("NymphRaidEasy".Translate(), ref NymphRaidEasy, "NymphRaidEasy_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("NymphRaidHard".Translate(), ref NymphRaidHard, "NymphRaidHard_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("NymphRaidRP".Translate(), ref NymphRaidRP, "NymphRaidRP_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("NymphPermanentManhunter".Translate(), ref NymphPermanentManhunter, "NymphPermanentManhunter_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("NymphSappers".Translate(), ref NymphSappers, "NymphSappers_desc".Translate());
			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("NymphFrustratedRape".Translate(), ref NymphFrustratedRape, "NymphFrustratedRape_desc".Translate());
			listingStandard.Gap(5f);

			// Save compatibility check for 1.9.7
			// This can probably be safely removed at a later date, I doubt many players use old saves for long.
			if (male_nymph_chance > 1.0f || futa_nymph_chance > 1.0f || futa_natives_chance > 1.0f || futa_spacers_chance > 1.0f)
			{
				male_nymph_chance = 0.0f;
				futa_nymph_chance = 0.0f;
				futa_natives_chance = 0.0f;
				futa_spacers_chance = 0.0f;
			}

			listingStandard.CheckboxLabeled("FemaleFuta".Translate(), ref FemaleFuta, "FemaleFuta_desc".Translate());
			listingStandard.CheckboxLabeled("MaleTrap".Translate(), ref MaleTrap, "MaleTrap_desc".Translate());
			listingStandard.Label("male_nymph_chance".Translate() + ": " + (int)(male_nymph_chance * 100) + "%", -1f, "male_nymph_chance_desc".Translate());
			male_nymph_chance = listingStandard.Slider(male_nymph_chance, 0.0f, 1.0f);
			if (FemaleFuta || MaleTrap)
			{
				listingStandard.Label("futa_nymph_chance".Translate() + ": " + (int)(futa_nymph_chance * 100) + "%", -1f, "futa_nymph_chance_desc".Translate());
				futa_nymph_chance = listingStandard.Slider(futa_nymph_chance, 0.0f, 1.0f);
			}
			if (FemaleFuta || MaleTrap)
			{
				listingStandard.Label("futa_natives_chance".Translate() + ": " + (int)(futa_natives_chance * 100) + "%", -1f, "futa_natives_chance_desc".Translate());
				futa_natives_chance = listingStandard.Slider(futa_natives_chance, 0.0f, 1.0f);
				listingStandard.Label("futa_spacers_chance".Translate() + ": " + (int)(futa_spacers_chance * 100) + "%", -1f, "futa_spacers_chance_desc".Translate());
				futa_spacers_chance = listingStandard.Slider(futa_spacers_chance, 0.0f, 1.0f);
			}

			listingStandard.Gap(5f);
			listingStandard.CheckboxLabeled("SendTraitGainLetters".Translate(), ref RJWSettings.sendTraitGainLetters, "SendTraitGainLetters_desc".Translate());

			listingStandard.End();
			height_modifier = listingStandard.CurHeight;
			Widgets.EndScrollView();
		}

		public override void ExposeData()
		{
			base.ExposeData();
			Scribe_Values.Look(ref animal_on_animal_enabled, "animal_on_animal_enabled", animal_on_animal_enabled, true);
			Scribe_Values.Look(ref animal_on_human_enabled, "animal_on_human_enabled", animal_on_human_enabled, true);
			Scribe_Values.Look(ref bestiality_enabled, "bestiality_enabled", bestiality_enabled, true);
			Scribe_Values.Look(ref necrophilia_enabled, "necrophilia_enabled", necrophilia_enabled, true);
			Scribe_Values.Look(ref designated_freewill, "designated_freewill", designated_freewill, true);
			Scribe_Values.Look(ref rape_enabled, "rape_enabled", rape_enabled, true);
			Scribe_Values.Look(ref colonist_CP_rape, "colonist_CP_rape", colonist_CP_rape, true);
			Scribe_Values.Look(ref visitor_CP_rape, "visitor_CP_rape", visitor_CP_rape, true);
			Scribe_Values.Look(ref animal_CP_rape, "animal_CP_rape", animal_CP_rape, true);
			Scribe_Values.Look(ref rape_beating, "rape_beating", rape_beating, true);
			Scribe_Values.Look(ref gentle_rape_beating, "gentle_rape_beating", gentle_rape_beating, true);
			Scribe_Values.Look(ref rape_stripping, "rape_stripping", rape_stripping, true);
			Scribe_Values.Look(ref NymphTamed, "NymphTamed", NymphTamed, true);
			Scribe_Values.Look(ref NymphWild, "NymphWild", NymphWild, true);
			Scribe_Values.Look(ref NymphRaidEasy, "NymphRaidEasy", NymphRaidEasy, true);
			Scribe_Values.Look(ref NymphRaidHard, "NymphRaidHard", NymphRaidHard, true);
			Scribe_Values.Look(ref NymphRaidRP, "NymphRaidRP", NymphRaidRP, true);
			Scribe_Values.Look(ref NymphPermanentManhunter, "NymphPermanentManhunter", NymphPermanentManhunter, true);
			Scribe_Values.Look(ref NymphSappers, "NymphSappers", NymphSappers, true);
			Scribe_Values.Look(ref NymphFrustratedRape, "NymphFrustratedRape", NymphFrustratedRape, true);
			Scribe_Values.Look(ref FemaleFuta, "FemaleFuta", FemaleFuta, true);
			Scribe_Values.Look(ref MaleTrap, "MaleTrap", MaleTrap, true);
			Scribe_Values.Look(ref sounds_enabled, "sounds_enabled", sounds_enabled, true);
			Scribe_Values.Look(ref sounds_sex_volume, "sounds_sexvolume", sounds_sex_volume, true);
			Scribe_Values.Look(ref sounds_cum_volume, "sounds_cumvolume", sounds_cum_volume, true);
			Scribe_Values.Look(ref sounds_voice_volume, "sounds_voicevolume", sounds_voice_volume, true);
			Scribe_Values.Look(ref sounds_orgasm_volume, "sounds_orgasmvolume", sounds_orgasm_volume, true);
			Scribe_Values.Look(ref sounds_animal_on_animal_volume, "sounds_animal_on_animalvolume", sounds_animal_on_animal_volume, true);
			Scribe_Values.Look(ref cum_filth, "cum_filth", cum_filth, true);
			Scribe_Values.Look(ref sexneed_fix, "sexneed_fix", sexneed_fix, true);
			Scribe_Values.Look(ref sexneed_decay_rate, "sexneed_decay_rate", sexneed_decay_rate, true);
			Scribe_Values.Look(ref Animal_mating_cooldown, "Animal_mating_cooldown", Animal_mating_cooldown, true);
			Scribe_Values.Look(ref nonFutaWomenRaping_MaxVulnerability, "nonFutaWomenRaping_MaxVulnerability", nonFutaWomenRaping_MaxVulnerability, true);
			Scribe_Values.Look(ref rapee_MinVulnerability_human, "rapee_MinVulnerability_human", rapee_MinVulnerability_human, true);
			Scribe_Values.Look(ref male_nymph_chance, "male_nymph_chance", male_nymph_chance, true);
			Scribe_Values.Look(ref futa_nymph_chance, "futa_nymph_chance", futa_nymph_chance, true);
			Scribe_Values.Look(ref futa_natives_chance, "futa_natives_chance", futa_natives_chance, true);
			Scribe_Values.Look(ref futa_spacers_chance, "futa_spacers_chance", futa_spacers_chance, true);
			Scribe_Values.Look(ref RPG_hero_control, "RPG_hero_control", RPG_hero_control, true);
			Scribe_Values.Look(ref RPG_hero_control_HC, "RPG_hero_control_HC", RPG_hero_control_HC, true);
			Scribe_Values.Look(ref RPG_hero_control_Ironman, "RPG_hero_control_Ironman", RPG_hero_control_Ironman, true);
			Scribe_Values.Look(ref UseAdvancedAgeScaling, "UseAdvancedAgeScaling", UseAdvancedAgeScaling, true);
			Scribe_Values.Look(ref AllowYouthSex, "AllowTeenSex", AllowYouthSex, true);
			Scribe_Values.Look(ref sendTraitGainLetters, "sendTraitGainLetters", sendTraitGainLetters, true);
		}
	}
}


code:
using UnityEngine;
using Verse;
using Multiplayer.API;

namespace rjw.Settings
{
	public class RJWSettingsController : Mod
	{
		public RJWSettingsController(ModContentPack content) : base(content)
		{
			GetSettings<RJWSettings>();
		}

		public override string SettingsCategory()
		{
			return "RJWSettingsOne".Translate();
		}

		public override void DoSettingsWindowContents(Rect inRect)
		{
			if (MP.IsInMultiplayer)
				return;

			RJWSettings.DoWindowContents(inRect);
		}
	}

	public class RJWDebugController : Mod
	{
		public RJWDebugController(ModContentPack content) : base(content)
		{
			GetSettings<RJWDebugSettings>();
		}

		public override string SettingsCategory()
		{
			return "RJWDebugSettings".Translate();
		}

		public override void DoSettingsWindowContents(Rect inRect)
		{
			if (MP.IsInMultiplayer)
				return;

			RJWDebugSettings.DoWindowContents(inRect);
		}
	}

	public class RJWPregnancySettingsController : Mod
	{
		public RJWPregnancySettingsController(ModContentPack content) : base(content)
		{
			GetSettings<RJWPregnancySettings>();
		}

		public override string SettingsCategory()
		{
			return "RJWSettingsTwo".Translate();
		}

		public override void DoSettingsWindowContents(Rect inRect)
		{
			if (MP.IsInMultiplayer)
				return;

			//GUI.BeginGroup(inRect);
			//Rect outRect = new Rect(0f, 0f, inRect.width, inRect.height - 30f);
			//Rect viewRect = new Rect(0f, 0f, inRect.width - 16f, inRect.height + 10f);
			//Widgets.BeginScrollView(outRect, ref scrollPosition, viewRect);

			RJWPregnancySettings.DoWindowContents(inRect);

			//Widgets.EndScrollView();
			//GUI.EndGroup();
		}
	}

	public class RJWPreferenceSettingsController : Mod
	{
		public RJWPreferenceSettingsController(ModContentPack content) : base(content)
		{
			GetSettings<RJWPreferenceSettings>();
		}

		public override string SettingsCategory()
		{
			return "RJWSettingsThree".Translate();
		}

		public override void DoSettingsWindowContents(Rect inRect)
		{
			if (MP.IsInMultiplayer)
				return;

			RJWPreferenceSettings.DoWindowContents(inRect);
		}
	}

	public class RJWHookupSettingsController : Mod
	{
		public RJWHookupSettingsController(ModContentPack content) : base(content)
		{
			GetSettings<RJWHookupSettings>();
		}

		public override string SettingsCategory()
		{
			return "RJWSettingsFour".Translate();
		}

		public override void DoSettingsWindowContents(Rect inRect)
		{
			if (MP.IsInMultiplayer)
				return;
			RJWHookupSettings.DoWindowContents(inRect);
		}
	}

}