mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Cleanups and Draft for #27
This commit is contained in:
parent
e62dcd23ee
commit
41a95c3c5e
11 changed files with 100 additions and 26 deletions
|
@ -1,10 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Defs>
|
||||
<GeneDef Name="GeneExtraGenitaliaBase" Abstract="True">
|
||||
<GeneDef Name="GeneExtraGenitaliaBase" Abstract="True">
|
||||
<displayCategory>rjw_genes_genitalia_extras</displayCategory>
|
||||
</GeneDef>
|
||||
|
||||
|
||||
<GeneDef ParentName="GeneExtraGenitaliaBase">
|
||||
<defName>rjw_genes_extra_penis</defName>
|
||||
<label>extra penis</label>
|
||||
|
@ -127,5 +126,19 @@
|
|||
<li>BreastAmount</li>
|
||||
</exclusionTags>
|
||||
</GeneDef>
|
||||
|
||||
<!--
|
||||
See Comment in `RJW_Genes.Gene_UdderBreasts` why this is currently commented out.
|
||||
|
||||
<GeneDef ParentName="GeneExtraGenitaliaBase">
|
||||
<defName>rjw_genes_udder</defName>
|
||||
<label>udder</label>
|
||||
<description>Carriers of this gene have udders instead of breasts.</description>
|
||||
<iconPath>Things/Mote/Heart</iconPath>
|
||||
<geneClass>RJW_Genes.Gene_UdderBreasts</geneClass>
|
||||
<displayOrderInCategory>711</displayOrderInCategory>
|
||||
<exclusionTags>
|
||||
<li>BreastAmount</li>
|
||||
</exclusionTags>
|
||||
</GeneDef>
|
||||
-->
|
||||
</Defs>
|
|
@ -72,4 +72,5 @@
|
|||
<displayOrderInCategory>808</displayOrderInCategory>
|
||||
</GeneDef>
|
||||
|
||||
|
||||
</Defs>
|
|
@ -151,7 +151,7 @@
|
|||
<GeneDef>
|
||||
<defName>rjw_genes_spawn_spelopede</defName>
|
||||
<label>Spelopede Dispenser</label>
|
||||
<labelShortAdj>cocooner</labelShortAdj>
|
||||
<labelShortAdj>spelopede</labelShortAdj>
|
||||
<description>Carriers of this gene can generate tame spelopedes. Higher psychic-sensitivity will spawn more spelopedes.</description>
|
||||
<iconPath>World/WorldObjects/Expanding/Insects</iconPath>
|
||||
<displayOrderInCategory>12</displayOrderInCategory>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
using Verse;
|
||||
using rjw;
|
||||
using RimWorld;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
|
@ -54,7 +53,7 @@ namespace RJW_Genes
|
|||
internal void AddFeaturelessBreast()
|
||||
{
|
||||
var partBPR = Genital_Helper.get_breastsBPR(pawn);
|
||||
this.added_nipples = pawn.health.AddHediff(Genital_Helper.featureless_chest, partBPR);
|
||||
added_nipples = pawn.health.AddHediff(Genital_Helper.featureless_chest, partBPR);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,9 +9,6 @@ namespace RJW_Genes
|
|||
|
||||
internal Hediff removed_anus;
|
||||
|
||||
// TODO: This gene only works if another Gene was set specifying the genitalia.
|
||||
// If it is added later, it still works, but on creation it needs a different
|
||||
// TODO: If all Genitalia are removed by genes, RJW adds some to the pawns at spawn
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
|
|
|
@ -52,15 +52,5 @@ namespace RJW_Genes
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/// <summary>
|
||||
/// Adds a "rjw.featurelesschest", which means nipples but nothing else (like male human pawns do).
|
||||
/// </summary>
|
||||
internal void AddFeaturelessBreast()
|
||||
{
|
||||
var partBPR = Genital_Helper.get_breastsBPR(pawn);
|
||||
//this.added_nipples = pawn.health.AddHediff(Genital_Helper.featureless_chest, partBPR);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,9 +9,6 @@ namespace RJW_Genes
|
|||
|
||||
internal Hediff removed_penis;
|
||||
|
||||
// TODO: This gene only works if another Gene was set specifying the genitalia.
|
||||
// If it is added later, it still works, but on creation it needs a different
|
||||
// TODO: If all Genitalia are removed by genes, RJW adds some to the pawns at spawn
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
|
|
|
@ -8,10 +8,7 @@ namespace RJW_Genes
|
|||
{
|
||||
|
||||
internal Hediff removed_vagina;
|
||||
|
||||
// TODO: This gene only works if another Gene was set specifying the genitalia.
|
||||
// If it is added later, it still works, but on creation it needs a different
|
||||
// TODO: If all Genitalia are removed by genes, RJW adds some to the pawns at spawn
|
||||
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
|
|
78
Source/Genes/ExtraGenitalia/Gene_UdderBreasts.cs
Normal file
78
Source/Genes/ExtraGenitalia/Gene_UdderBreasts.cs
Normal file
|
@ -0,0 +1,78 @@
|
|||
using rjw;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Removes breasts for female (and trap, futa) pawns and adds Udders.
|
||||
/// Wished for in Issue #27.
|
||||
///
|
||||
/// TODO: Currently, the sexualizer over-writes the added udders and just adds another pair of breasts!
|
||||
/// I commented out the gene in .xml for now.
|
||||
/// </summary>
|
||||
public class Gene_UdderBreasts : RJW_Gene
|
||||
{
|
||||
|
||||
Hediff removed_breasts;
|
||||
Hediff added_udders;
|
||||
|
||||
public override void PostMake()
|
||||
{
|
||||
base.PostMake();
|
||||
|
||||
// Breasts are replaced for female,trap and futa pawns
|
||||
if ( removed_breasts == null
|
||||
&& (GenderUtility.IsFemale(pawn) || GenderHelper.GetSex(pawn) == GenderHelper.Sex.futa || GenderHelper.GetSex(pawn) == GenderHelper.Sex.trap)
|
||||
)
|
||||
{
|
||||
RemoveButStoreBreasts();
|
||||
AddUdders();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public override void PostAdd()
|
||||
{
|
||||
base.PostAdd();
|
||||
|
||||
// Breasts are replaced for female,trap and futa pawns
|
||||
if (removed_breasts == null
|
||||
&& (GenderUtility.IsFemale(pawn) || GenderHelper.GetSex(pawn) == GenderHelper.Sex.futa || GenderHelper.GetSex(pawn) == GenderHelper.Sex.trap)
|
||||
)
|
||||
{
|
||||
RemoveButStoreBreasts();
|
||||
AddUdders();
|
||||
}
|
||||
}
|
||||
|
||||
public override void PostRemove()
|
||||
{
|
||||
base.PostRemove();
|
||||
// Re-Add the old breasts
|
||||
if (removed_breasts != null)
|
||||
pawn.health.AddHediff(removed_breasts);
|
||||
if (added_udders != null)
|
||||
pawn.health.RemoveHediff(added_udders);
|
||||
}
|
||||
|
||||
internal void RemoveButStoreBreasts()
|
||||
{
|
||||
var partBPR = Genital_Helper.get_breastsBPR(pawn);
|
||||
Hediff breastsToRemove = Genital_Helper.get_AllPartsHediffList(pawn).FindLast(x => GenitaliaUtility.IsBreasts(x));
|
||||
|
||||
if (breastsToRemove != null)
|
||||
{
|
||||
removed_breasts = breastsToRemove;
|
||||
pawn.health.RemoveHediff(breastsToRemove);
|
||||
}
|
||||
}
|
||||
|
||||
internal void AddUdders()
|
||||
{
|
||||
BodyPartRecord bpr = Genital_Helper.get_uddersBPR(pawn);
|
||||
added_udders = pawn.health.AddHediff(Genital_Helper.udder_breasts, bpr);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -99,6 +99,7 @@ namespace RJW_Genes
|
|||
case "rjw_genes_demonic_genitalia": return Genital_Helper.average_breasts;
|
||||
case "rjw_genes_dragon_genitalia": return Genital_Helper.average_breasts;
|
||||
case "rjw_genes_slime_genitalia": return Genital_Helper.slime_breasts;
|
||||
case "rjw_genes_udder_breasts": return Genital_Helper.udder_breasts;
|
||||
case "rjw_genes_ovipositor_genitalia": return Genital_Helper.average_breasts;
|
||||
|
||||
default: return Genital_Helper.generic_breasts;
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
<Compile Include="GeneDefOf.cs" />
|
||||
<Compile Include="Genes\Breeding\Gene_MechBreeder.cs" />
|
||||
<Compile Include="Genes\Breeding\PatchMechBirth.cs" />
|
||||
<Compile Include="Genes\ExtraGenitalia\Gene_UdderBreasts.cs" />
|
||||
<Compile Include="Genes\Hive\Defs\HiveOffspringChanceDef.cs" />
|
||||
<Compile Include="Genes\Hive\Genes\Gene_FerventOvipositor.cs" />
|
||||
<Compile Include="Genes\Hive\Genes\Gene_InsectIncubator.cs" />
|
||||
|
|
Loading…
Reference in a new issue