Added insectbreeder gene
This commit is contained in:
parent
04ca72ec78
commit
ba8bd9605b
|
@ -18,4 +18,13 @@
|
||||||
<displayOrderInCategory>52</displayOrderInCategory>
|
<displayOrderInCategory>52</displayOrderInCategory>
|
||||||
<displayCategory>Reproduction</displayCategory>
|
<displayCategory>Reproduction</displayCategory>
|
||||||
</GeneDef>
|
</GeneDef>
|
||||||
|
|
||||||
|
<GeneDef>
|
||||||
|
<defName>rjw_genes_insectbreeder</defName>
|
||||||
|
<label>InsectBreeder</label>
|
||||||
|
<description>Pawns with this gene are able to fertilize eggs with any fertile penis.</description>
|
||||||
|
<iconPath>World/WorldObjects/Expanding/Mechanoids</iconPath>
|
||||||
|
<displayOrderInCategory>53</displayOrderInCategory>
|
||||||
|
<displayCategory>Reproduction</displayCategory>
|
||||||
|
</GeneDef>
|
||||||
</Defs>
|
</Defs>
|
Binary file not shown.
Binary file not shown.
|
@ -13,5 +13,6 @@ namespace shabe_genesaddons
|
||||||
{
|
{
|
||||||
public static readonly GeneDef rjw_genes_mechbreeder;
|
public static readonly GeneDef rjw_genes_mechbreeder;
|
||||||
public static readonly GeneDef rjw_genes_insectincubator;
|
public static readonly GeneDef rjw_genes_insectincubator;
|
||||||
|
public static readonly GeneDef rjw_genes_insectbreeder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,15 @@ namespace shabe_genesaddons
|
||||||
return pawn.genes.HasGene(GeneDefOf.rjw_genes_insectincubator);
|
return pawn.genes.HasGene(GeneDefOf.rjw_genes_insectincubator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool isInsectBreeder(Pawn pawn)
|
||||||
|
{
|
||||||
|
if (pawn.genes == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return pawn.genes.HasGene(GeneDefOf.rjw_genes_insectbreeder);
|
||||||
|
}
|
||||||
|
|
||||||
public static float MaxEggSizeMul(Pawn pawn)
|
public static float MaxEggSizeMul(Pawn pawn)
|
||||||
{
|
{
|
||||||
float MaxEggSize = 1;
|
float MaxEggSize = 1;
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using HarmonyLib;
|
||||||
|
using rjw;
|
||||||
|
using Verse;
|
||||||
|
using RimWorld;
|
||||||
|
namespace shabe_genesaddons
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(PawnExtensions), "RaceImplantEggs")]
|
||||||
|
public static class PatchPawnExtensions
|
||||||
|
{
|
||||||
|
[HarmonyPostfix]
|
||||||
|
public static void Postfix(Pawn pawn, ref bool __result)
|
||||||
|
{
|
||||||
|
if (!__result)
|
||||||
|
{
|
||||||
|
__result = GeneUtility.isInsectBreeder(pawn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
// <autogenerated />
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
|
@ -60,6 +60,7 @@
|
||||||
<Compile Include="GeneDefOf.cs" />
|
<Compile Include="GeneDefOf.cs" />
|
||||||
<Compile Include="HarmonyInit.cs" />
|
<Compile Include="HarmonyInit.cs" />
|
||||||
<Compile Include="PatchMechBirth.cs" />
|
<Compile Include="PatchMechBirth.cs" />
|
||||||
|
<Compile Include="PatchPawnExtensions.cs" />
|
||||||
<Compile Include="PatchPregnancyHelper.cs" />
|
<Compile Include="PatchPregnancyHelper.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="GeneUtility.cs" />
|
<Compile Include="GeneUtility.cs" />
|
||||||
|
|
Loading…
Reference in New Issue