rjw-genes/1.6/Source/Genes/ExtraGenitalia/Gene_Femboy.cs
Telanda-DDS 7f6dc2a668 - Added in Elasticity support for Cumpilation and Eltoro Stretching.
- Updated Breeding Pulse c# with more debugging information.
- Updated Vanilla Genes Expanded Genie with updated function call.
- Removed Licentia XML & method calls from Gene_Elasticity.cs
- Fixed MatingCall Ability & checked to make sure Pheromone Spit was still functional.
- Fixed incorrect mod requirement for sex curiosity Gene.
2025-07-24 13:41:47 +10:00

69 lines
2.5 KiB
C#

using Verse;
using rjw;
using RimWorld;
namespace RJW_Genes
{
public class Gene_Femboy : RJW_Gene
{
public override void PostMake()
{
base.PostMake();
}
public override void PostAdd()
{
if (pawn.kindDef == null) return; //Added to catch Rimworld creating statues of pawns.
base.PostAdd();
if (GenderUtility.IsMale(this.pawn) && this.additional_genital == null)
{
this.CreateAndAddVagina();
}
}
internal void CreateAndAddVagina()
{
if (this.pawn.gender != Gender.Female)
{
GenderHelper.ChangeSex(this.pawn, delegate ()
{
this.pawn.gender = Gender.Female;
GenitaliaChanger.RemoveAllGenitalia(this.pawn);
Sexualizer.sexualize_pawn(this.pawn);
});
GenderUtility.AdjustBodyToTargetGender(this.pawn, Gender.Female);
}
BodyPartRecord bodyPartRecord = Genital_Helper.get_genitalsBPR(this.pawn);
Hediff hediff = Genital_Helper.get_AllPartsHediffList(this.pawn).FindLast((Hediff x) => Genital_Helper.is_vagina(x));
if (hediff != null)
{
this.pawn.health.RemoveHediff(hediff);
}
HediffDef penisForGene = GenitaliaUtility.GetPenisForGene(GenitaliaUtility.GetGenitaliaTypeGeneForPawn(this.pawn));
BodyPartRecord part = Genital_Helper.get_genitalsBPR(this.pawn);
this.additional_genital = HediffMaker.MakeHediff(penisForGene, this.pawn, null);
HediffComp_SexPart hediffCompSexPart = this.additional_genital.TryGetComp<HediffComp_SexPart>();
if (hediffCompSexPart != null)
{
hediffCompSexPart.Init(this.pawn, false);
hediffCompSexPart.UpdateSeverity(0f);
}
this.pawn.health.AddHediff(this.additional_genital, part, null, null);
foreach (Gene g in pawn.genes.GenesListForReading)
{
if (g.def.defName == "rjw_genes_hydrolic_genitalia")
{
g.PostAdd();
}
if (g.def.defName == "rjw_genes_bionic_genitalia")
{
g.PostAdd();
return;
}
}
}
// Token: 0x040001B0 RID: 432
internal Hediff additional_genital;
}
}