mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Added genes on cum-amount and two traits, fixed an issue with PostAdd in some GenitaliaTypeGenes
This commit is contained in:
parent
1db82e96d5
commit
4b5d04af3c
18 changed files with 307 additions and 41 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Genes.Breeding
|
||||
{
|
||||
internal class Gene_MechBreeder : Gene
|
||||
public class Gene_MechBreeder : Gene
|
||||
{
|
||||
// This one does not do anything, the patch is some where else checking for the pawn to have this Gene!
|
||||
}
|
||||
|
|
37
Source/Genes/Cum/CumUtility.cs
Normal file
37
Source/Genes/Cum/CumUtility.cs
Normal file
|
@ -0,0 +1,37 @@
|
|||
using Verse;
|
||||
using rjw;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class CumUtility
|
||||
{
|
||||
|
||||
public static void MultiplyFluidAmountBy(Pawn pawn, float multiplier)
|
||||
{
|
||||
var partBPR = Genital_Helper.get_genitalsBPR(pawn);
|
||||
var parts = Genital_Helper.get_PartsHediffList(pawn, partBPR);
|
||||
|
||||
if (!parts.NullOrEmpty())
|
||||
{
|
||||
CompHediffBodyPart CompHediff;
|
||||
|
||||
foreach (Hediff part in parts)
|
||||
{
|
||||
if (GenitaliaChanger.IsArtificial(part))
|
||||
continue;
|
||||
|
||||
if (rjw.Genital_Helper.is_penis(part))
|
||||
{
|
||||
CompHediff = part.TryGetComp<rjw.CompHediffBodyPart>();
|
||||
if (CompHediff != null)
|
||||
{
|
||||
CompHediff.FluidAmmount *= multiplier;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
39
Source/Genes/Cum/Gene_MuchCum.cs
Normal file
39
Source/Genes/Cum/Gene_MuchCum.cs
Normal file
|
@ -0,0 +1,39 @@
|
|||
namespace RJW_Genes
|
||||
{
|
||||
public class Gene_MuchCum : RJW_Gene
|
||||
{
|
||||
bool has_been_fired = false;
|
||||
|
||||
float multiplier_much_cum = 3f;
|
||||
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
|
||||
CumUtility.MultiplyFluidAmountBy(pawn, multiplier_much_cum);
|
||||
has_been_fired = true;
|
||||
}
|
||||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostAdd();
|
||||
if (!has_been_fired) {
|
||||
CumUtility.MultiplyFluidAmountBy(pawn, multiplier_much_cum);
|
||||
has_been_fired = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void PostRemove()
|
||||
{
|
||||
base.PostAdd();
|
||||
|
||||
if (has_been_fired)
|
||||
{
|
||||
CumUtility.MultiplyFluidAmountBy(pawn, 1/multiplier_much_cum);
|
||||
has_been_fired = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
34
Source/Genes/Cum/Gene_NoCum.cs
Normal file
34
Source/Genes/Cum/Gene_NoCum.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
namespace RJW_Genes
|
||||
{
|
||||
public class Gene_NoCum : RJW_Gene
|
||||
{
|
||||
bool has_been_fired = false;
|
||||
|
||||
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
|
||||
CumUtility.MultiplyFluidAmountBy(pawn, 0f);
|
||||
has_been_fired = true;
|
||||
}
|
||||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostAdd();
|
||||
if (!has_been_fired) {
|
||||
CumUtility.MultiplyFluidAmountBy(pawn, 0f);
|
||||
has_been_fired = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void PostRemove()
|
||||
{
|
||||
// Cum Removal does not do at the moment :/ I would need to safe the old cum amount but I don't want to at the moment
|
||||
base.PostAdd();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
39
Source/Genes/Cum/Gene_VeryMuchCum.cs
Normal file
39
Source/Genes/Cum/Gene_VeryMuchCum.cs
Normal file
|
@ -0,0 +1,39 @@
|
|||
namespace RJW_Genes
|
||||
{
|
||||
public class Gene_VeryMuchCum : RJW_Gene
|
||||
{
|
||||
bool has_been_fired = false;
|
||||
|
||||
float multiplier_much_cum = 10f;
|
||||
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
|
||||
CumUtility.MultiplyFluidAmountBy(pawn, multiplier_much_cum);
|
||||
has_been_fired = true;
|
||||
}
|
||||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostAdd();
|
||||
if (!has_been_fired) {
|
||||
CumUtility.MultiplyFluidAmountBy(pawn, multiplier_much_cum);
|
||||
has_been_fired = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void PostRemove()
|
||||
{
|
||||
base.PostAdd();
|
||||
|
||||
if (has_been_fired)
|
||||
{
|
||||
CumUtility.MultiplyFluidAmountBy(pawn, 1/multiplier_much_cum);
|
||||
has_been_fired = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -14,7 +14,7 @@ namespace RJW_Genes
|
|||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostMake();
|
||||
base.PostAdd();
|
||||
GenitaliaChanger.ChangeGenitalia(this.pawn, Genital_Helper.canine_penis, Genital_Helper.canine_vagina, Genital_Helper.generic_anus);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace RJW_Genes
|
|||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostMake();
|
||||
base.PostAdd();
|
||||
GenitaliaChanger.ChangeGenitalia(this.pawn, Genital_Helper.demon_penis, Genital_Helper.demon_vagina, Genital_Helper.demon_anus);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace RJW_Genes
|
|||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostMake();
|
||||
base.PostAdd();
|
||||
GenitaliaChanger.ChangeGenitalia(this.pawn, Genital_Helper.dragon_penis, Genital_Helper.dragon_vagina, Genital_Helper.generic_anus);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace RJW_Genes
|
|||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostMake();
|
||||
base.PostAdd();
|
||||
GenitaliaChanger.ChangeGenitalia(this.pawn, Genital_Helper.equine_penis, Genital_Helper.equine_vagina, Genital_Helper.generic_anus);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace RJW_Genes
|
|||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostMake();
|
||||
base.PostAdd();
|
||||
GenitaliaChanger.ChangeGenitalia(this.pawn, Genital_Helper.feline_penis, Genital_Helper.feline_vagina, Genital_Helper.generic_anus);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace RJW_Genes
|
|||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostMake();
|
||||
base.PostAdd();
|
||||
GenitaliaChanger.ChangeGenitalia(this.pawn, Genital_Helper.ovipositorM, Genital_Helper.ovipositorF, Genital_Helper.insect_anus);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace RJW_Genes
|
|||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostMake();
|
||||
base.PostAdd();
|
||||
GenitaliaChanger.ChangeGenitalia(this.pawn, Genital_Helper.slime_penis, Genital_Helper.slime_vagina, Genital_Helper.slime_anus);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue