mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
1.5 update
This commit is contained in:
parent
7d9e399a47
commit
e6db43f31d
231 changed files with 95 additions and 6968 deletions
63
Source/Genes/ExtraGenitalia/Gene_Femboy.cs
Normal file
63
Source/Genes/ExtraGenitalia/Gene_Femboy.cs
Normal file
|
@ -0,0 +1,63 @@
|
|||
using Verse;
|
||||
using rjw;
|
||||
using RimWorld;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class Gene_Femboy : RJW_Gene
|
||||
{
|
||||
// Token: 0x06000335 RID: 821 RVA: 0x0000401D File Offset: 0x0000221D
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
if (GenderUtility.IsMale(this.pawn) && this.additional_genital == null)
|
||||
{
|
||||
this.CreateAndAddVagina();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000336 RID: 822 RVA: 0x00004040 File Offset: 0x00002240
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostAdd();
|
||||
if (this.pawn.gender == Gender.Male && this.additional_genital == null)
|
||||
{
|
||||
this.CreateAndAddVagina();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000337 RID: 823 RVA: 0x0000EE4C File Offset: 0x0000D04C
|
||||
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);
|
||||
CompHediffBodyPart compHediffBodyPart = this.additional_genital.TryGetComp<CompHediffBodyPart>();
|
||||
if (compHediffBodyPart != null)
|
||||
{
|
||||
compHediffBodyPart.initComp(this.pawn, false);
|
||||
compHediffBodyPart.updatesize(0f);
|
||||
}
|
||||
this.pawn.health.AddHediff(this.additional_genital, part, null, null);
|
||||
}
|
||||
|
||||
// Token: 0x040001B0 RID: 432
|
||||
internal Hediff additional_genital;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue