mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Added a set of genes to modify genitalia sizes
This commit is contained in:
parent
b8fa98ea8d
commit
22cc5ba9d1
17 changed files with 558 additions and 0 deletions
29
Source/Genes/GenitaliaSize/Gene_BigBreasts.cs
Normal file
29
Source/Genes/GenitaliaSize/Gene_BigBreasts.cs
Normal file
|
@ -0,0 +1,29 @@
|
|||
using Verse;
|
||||
using rjw;
|
||||
using System;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class Gene_BigBreasts : Gene
|
||||
{
|
||||
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
if (GenitaliaUtility.PawnStillNeedsGenitalia(pawn))
|
||||
Sexualizer.sexualize_pawn(pawn);
|
||||
|
||||
if (pawn.gender == Gender.Female)
|
||||
SizeAdjuster.AdjustAllBreastSizes(pawn,0.5f,1.0f);
|
||||
}
|
||||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostAdd();
|
||||
if (pawn.gender == Gender.Female)
|
||||
SizeAdjuster.AdjustAllBreastSizes(pawn, 0.5f, 1.0f);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
26
Source/Genes/GenitaliaSize/Gene_BigMaleGenitalia.cs
Normal file
26
Source/Genes/GenitaliaSize/Gene_BigMaleGenitalia.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
using Verse;
|
||||
using rjw;
|
||||
using System;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class Gene_SmallMaleGenitalia : Gene
|
||||
{
|
||||
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
if (GenitaliaUtility.PawnStillNeedsGenitalia(pawn))
|
||||
Sexualizer.sexualize_pawn(pawn);
|
||||
|
||||
SizeAdjuster.AdjustAllPenisSizes(pawn,0.5f,1.0f);
|
||||
}
|
||||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostAdd();
|
||||
SizeAdjuster.AdjustAllPenisSizes(pawn, 0.5f, 1.0f);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
29
Source/Genes/GenitaliaSize/Gene_LooseAnus.cs
Normal file
29
Source/Genes/GenitaliaSize/Gene_LooseAnus.cs
Normal file
|
@ -0,0 +1,29 @@
|
|||
using Verse;
|
||||
using rjw;
|
||||
using System;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class Gene_LooseAnus : Gene
|
||||
{
|
||||
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
if (GenitaliaUtility.PawnStillNeedsGenitalia(pawn))
|
||||
Sexualizer.sexualize_pawn(pawn);
|
||||
|
||||
SizeAdjuster.AdjustAllAnusSizes(pawn, 0.5f, 1.0f);
|
||||
}
|
||||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostAdd();
|
||||
SizeAdjuster.AdjustAllAnusSizes(pawn, 0.5f, 1.0f);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
28
Source/Genes/GenitaliaSize/Gene_LooseFemaleGenitalia.cs
Normal file
28
Source/Genes/GenitaliaSize/Gene_LooseFemaleGenitalia.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
using Verse;
|
||||
using rjw;
|
||||
using System;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class Gene_LooseFemaleGenitalia : Gene
|
||||
{
|
||||
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
if (GenitaliaUtility.PawnStillNeedsGenitalia(pawn))
|
||||
Sexualizer.sexualize_pawn(pawn);
|
||||
|
||||
SizeAdjuster.AdjustAllVaginaSizes(pawn, 0.5f, 1.0f);
|
||||
}
|
||||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostAdd();
|
||||
SizeAdjuster.AdjustAllVaginaSizes(pawn, 0.5f, 1.0f);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
20
Source/Genes/GenitaliaSize/Gene_NormalAnus.cs
Normal file
20
Source/Genes/GenitaliaSize/Gene_NormalAnus.cs
Normal file
|
@ -0,0 +1,20 @@
|
|||
using Verse;
|
||||
using rjw;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
/// <summary>
|
||||
/// Dummy Gene that does not alter the genitalia size. Normal RJW Logic and rolled sizes are kept.
|
||||
/// </summary>
|
||||
public class Gene_NormalAnus : Gene
|
||||
{
|
||||
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
if (GenitaliaUtility.PawnStillNeedsGenitalia(pawn))
|
||||
Sexualizer.sexualize_pawn(pawn);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
20
Source/Genes/GenitaliaSize/Gene_NormalBreasts.cs
Normal file
20
Source/Genes/GenitaliaSize/Gene_NormalBreasts.cs
Normal file
|
@ -0,0 +1,20 @@
|
|||
using Verse;
|
||||
using rjw;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
/// <summary>
|
||||
/// Dummy Gene that does not alter the genitalia size. Normal RJW Logic and rolled sizes are kept.
|
||||
/// </summary>
|
||||
public class Gene_NormalBreasts : Gene
|
||||
{
|
||||
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
if (GenitaliaUtility.PawnStillNeedsGenitalia(pawn))
|
||||
Sexualizer.sexualize_pawn(pawn);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
21
Source/Genes/GenitaliaSize/Gene_NormalFemaleGenitalia.cs
Normal file
21
Source/Genes/GenitaliaSize/Gene_NormalFemaleGenitalia.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
using Verse;
|
||||
using rjw;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
/// <summary>
|
||||
/// Dummy Gene that does not alter the genitalia size. Normal RJW Logic and rolled sizes are kept.
|
||||
/// </summary>
|
||||
public class Gene_NormalFemaleGenitalia : Gene
|
||||
{
|
||||
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
if (GenitaliaUtility.PawnStillNeedsGenitalia(pawn))
|
||||
Sexualizer.sexualize_pawn(pawn);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
20
Source/Genes/GenitaliaSize/Gene_NormalMaleGenitalia.cs
Normal file
20
Source/Genes/GenitaliaSize/Gene_NormalMaleGenitalia.cs
Normal file
|
@ -0,0 +1,20 @@
|
|||
using Verse;
|
||||
using rjw;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
/// <summary>
|
||||
/// Dummy Gene that does not alter the genitalia size. Normal RJW Logic and rolled sizes are kept.
|
||||
/// </summary>
|
||||
public class Gene_NormalMaleGenitalia : Gene
|
||||
{
|
||||
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
if (GenitaliaUtility.PawnStillNeedsGenitalia(pawn))
|
||||
Sexualizer.sexualize_pawn(pawn);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
25
Source/Genes/GenitaliaSize/Gene_SmallBreasts.cs
Normal file
25
Source/Genes/GenitaliaSize/Gene_SmallBreasts.cs
Normal file
|
@ -0,0 +1,25 @@
|
|||
using Verse;
|
||||
using rjw;
|
||||
using System;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class Gene_SmallBreasts : Gene
|
||||
{
|
||||
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
if (GenitaliaUtility.PawnStillNeedsGenitalia(pawn))
|
||||
Sexualizer.sexualize_pawn(pawn);
|
||||
|
||||
SizeAdjuster.AdjustAllBreastSizes(pawn, 0.0f, 0.5f);
|
||||
}
|
||||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostAdd();
|
||||
SizeAdjuster.AdjustAllBreastSizes(pawn, 0.0f, 0.5f);
|
||||
}
|
||||
}
|
||||
}
|
26
Source/Genes/GenitaliaSize/Gene_SmallMaleGenitalia.cs
Normal file
26
Source/Genes/GenitaliaSize/Gene_SmallMaleGenitalia.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
using Verse;
|
||||
using rjw;
|
||||
using System;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class Gene_BigMaleGenitalia : Gene
|
||||
{
|
||||
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
if (GenitaliaUtility.PawnStillNeedsGenitalia(pawn))
|
||||
Sexualizer.sexualize_pawn(pawn);
|
||||
|
||||
SizeAdjuster.AdjustAllPenisSizes(pawn,0.0f,0.5f);
|
||||
}
|
||||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostAdd();
|
||||
SizeAdjuster.AdjustAllPenisSizes(pawn, 0.0f, 0.5f);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
27
Source/Genes/GenitaliaSize/Gene_TightAnus.cs
Normal file
27
Source/Genes/GenitaliaSize/Gene_TightAnus.cs
Normal file
|
@ -0,0 +1,27 @@
|
|||
using Verse;
|
||||
using rjw;
|
||||
using System;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class Gene_TightAnus : Gene
|
||||
{
|
||||
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
if (GenitaliaUtility.PawnStillNeedsGenitalia(pawn))
|
||||
Sexualizer.sexualize_pawn(pawn);
|
||||
|
||||
SizeAdjuster.AdjustAllAnusSizes(pawn, 0.5f, 1.0f);
|
||||
}
|
||||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostAdd();
|
||||
SizeAdjuster.AdjustAllAnusSizes(pawn, 0.5f, 1.0f);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
26
Source/Genes/GenitaliaSize/Gene_TightFemaleGenitalia.cs
Normal file
26
Source/Genes/GenitaliaSize/Gene_TightFemaleGenitalia.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
using Verse;
|
||||
using rjw;
|
||||
using System;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class Gene_TightFemaleGenitalia : Gene
|
||||
{
|
||||
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
if (GenitaliaUtility.PawnStillNeedsGenitalia(pawn))
|
||||
Sexualizer.sexualize_pawn(pawn);
|
||||
|
||||
SizeAdjuster.AdjustAllVaginaSizes(pawn, 0.5f, 1.0f);
|
||||
}
|
||||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostAdd();
|
||||
SizeAdjuster.AdjustAllVaginaSizes(pawn, 0.5f, 1.0f);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
79
Source/Genes/GenitaliaSize/SizeAdjuster.cs
Normal file
79
Source/Genes/GenitaliaSize/SizeAdjuster.cs
Normal file
|
@ -0,0 +1,79 @@
|
|||
using Verse;
|
||||
using rjw;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class SizeAdjuster
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Re-Rolls the sizes for all vaginas of the pawn to be between lower and upper limit.
|
||||
/// </summary>
|
||||
/// <param name="pawn">The pawn whos vaginas are rerolled</param>
|
||||
/// <param name="lowerLimit">The minimum severity for the vagina</param>
|
||||
/// <param name="upperLimit">The maximum severity for the vagina</param>
|
||||
public static void AdjustAllVaginaSizes(Pawn pawn, float lowerLimit = 0.0f, float upperLimit = 1.0f){
|
||||
List<Hediff> AllVaginas = Genital_Helper.get_AllPartsHediffList(pawn).FindAll(x => Genital_Helper.is_vagina(x));
|
||||
ResizeAll(AllVaginas, lowerLimit, upperLimit);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Re-Rolls the sizes for all anus of the pawn to be between lower and upper limit.
|
||||
/// </summary>
|
||||
/// <param name="pawn">The pawn whos anus are rerolled</param>
|
||||
/// <param name="lowerLimit">The minimum severity for the vagina</param>
|
||||
/// <param name="upperLimit">The maximum severity for the vagina</param>
|
||||
public static void AdjustAllAnusSizes(Pawn pawn, float lowerLimit = 0.0f, float upperLimit = 1.0f)
|
||||
{
|
||||
List<Hediff> AllAnus = Genital_Helper.get_AllPartsHediffList(pawn).FindAll(x => GenitaliaChanger.IsAnus(x));
|
||||
ResizeAll(AllAnus, lowerLimit, upperLimit);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Re-Rolls the sizes for all penis of the pawn to be between lower and upper limit.
|
||||
/// </summary>
|
||||
/// <param name="pawn">The pawn whos penisses are rerolled</param>
|
||||
/// <param name="lowerLimit">The minimum severity for the vagina</param>
|
||||
/// <param name="upperLimit">The maximum severity for the vagina</param>
|
||||
public static void AdjustAllPenisSizes(Pawn pawn, float lowerLimit = 0.0f, float upperLimit = 1.0f)
|
||||
{
|
||||
List<Hediff> AllPenisses = Genital_Helper.get_AllPartsHediffList(pawn).FindAll(x => Genital_Helper.is_penis(x));
|
||||
ResizeAll(AllPenisses, lowerLimit, upperLimit);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Re-Rolls the sizes for all breasts of the pawn to be between lower and upper limit.
|
||||
/// </summary>
|
||||
/// <param name="pawn">The pawn whos breasts are rerolled</param>
|
||||
/// <param name="lowerLimit">The minimum severity for the vagina</param>
|
||||
/// <param name="upperLimit">The maximum severity for the vagina</param>
|
||||
public static void AdjustAllBreastSizes(Pawn pawn, float lowerLimit = 0.0f, float upperLimit = 1.0f)
|
||||
{
|
||||
|
||||
List<Hediff> AllBreasts = Genital_Helper.get_AllPartsHediffList(pawn).FindAll(x => x.def.defName.Contains("breasts"));
|
||||
ResizeAll(AllBreasts,lowerLimit,upperLimit);
|
||||
}
|
||||
|
||||
|
||||
private static void ResizeAll(IEnumerable<Hediff> toResize,float lowerLimit, float upperLimit)
|
||||
{
|
||||
foreach (var hediff in toResize)
|
||||
{
|
||||
Random rnd = new Random();
|
||||
float size = (float)(rnd.NextDouble() * (upperLimit - lowerLimit) + lowerLimit);
|
||||
hediff.Severity = size;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue