rjw-genes/1.6/Source/Genes/Damage/Gene_Elasticity.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

57 lines
No EOL
1.8 KiB
C#

using Verse;
namespace RJW_Genes
{
/// <summary>
/// This Gene adds Licentia-Labs Elasticised Hediff to a Pawn.
/// Note: I had a HarmonyPatch first, similar to skipping cumflation, but the Stretching Logic is called quite a lot and for both pawns actually.
/// Hence, I think choosing the Elasticiced Hediff was good as then everything is covered by "Licentia-Logic".
/// </summary>
public class Gene_Elasticity : Gene
{
private const int RESET_INTERVAL = 60000; // 60k should be 1 day
public override void PostAdd()
{
if (pawn.kindDef == null) return; //Added to catch Rimworld creating statues of pawns.
base.PostAdd();
// Doing it like this will add the hediff with a severity of ~0.5, but it will decay.
// Hence we check with the Ticks to update.
//this.pawn.health.AddHediff(Licentia.HediffDefs.Elasticised);
//ResetSeverity();
}
public override void Tick()
{
base.Tick();
//if (pawn.IsHashIntervalTick(RESET_INTERVAL))
// ResetSeverity();
}
public override void PostRemove()
{
//Hediff candidate = pawn.health.hediffSet.GetFirstHediffOfDef(Licentia.HediffDefs.Elasticised);
//if (candidate != null)
//{
// pawn.health.RemoveHediff(candidate);
//}
base.PostRemove();
}
//private void ResetSeverity(float severity = 0.7f)
//{
// Hediff candidate = pawn.health.hediffSet.GetFirstHediffOfDef(Licentia.HediffDefs.Elasticised);
// if (candidate != null)
// {
// candidate.Severity = severity;
// }
//}
}
}