mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Added a fervent Ovipositor Gene, making much more eggs
This commit is contained in:
parent
1d9041a11f
commit
e62dcd23ee
4 changed files with 91 additions and 37 deletions
42
Source/Genes/Hive/Genes/Gene_FerventOvipositor.cs
Normal file
42
Source/Genes/Hive/Genes/Gene_FerventOvipositor.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Verse;
|
||||
using rjw;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Manages the rjw_genes_fervent_ovipositor to grow eggs much faster.
|
||||
///
|
||||
/// TODO: Move the Multiplier into XML
|
||||
/// TODO: This gene only works after the first egg, the first egg for two new pawns spawns at the same time (strange).
|
||||
/// </summary>
|
||||
public class Gene_FerventOvipositor : Gene
|
||||
{
|
||||
|
||||
const int MULTIPLIER = 3; // Tick 3 times as much, making a pawn with this Gene Produce Eggs 4 times as fast as the normal.
|
||||
|
||||
public override void Tick()
|
||||
{
|
||||
base.Tick();
|
||||
|
||||
if (pawn == null) return;
|
||||
|
||||
Hediff_PartBaseNatural OvipositorF = (Hediff_PartBaseNatural) pawn.health.hediffSet.GetFirstHediffOfDef(rjw.Genital_Helper.ovipositorF);
|
||||
|
||||
if (OvipositorF == null) return;
|
||||
|
||||
OvipositorF.nextEggTick = Math.Max(OvipositorF.nextEggTick - MULTIPLIER, -1);
|
||||
|
||||
// DevNote: I first had a for-loop calling OviPositorF.tick(), but I fear that would be a performance sink.
|
||||
// Also, it would double other aspects as well, such as bleeding out through your insect-PP or dropping out the eggs.
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue