mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Anal/Vaginal Cumabsorption genes, fertilin category, pussyheal requires fertilin now
This commit is contained in:
parent
0d15873bd2
commit
e642942c1e
13 changed files with 300 additions and 39 deletions
Binary file not shown.
|
@ -8,7 +8,6 @@
|
||||||
<stunTargetWhileCasting>false</stunTargetWhileCasting>
|
<stunTargetWhileCasting>false</stunTargetWhileCasting>
|
||||||
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
|
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
|
||||||
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
|
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
|
||||||
<cooldownTicksRange>60000</cooldownTicksRange>
|
|
||||||
<warmupMote>Mote_CoagulateStencil</warmupMote>
|
<warmupMote>Mote_CoagulateStencil</warmupMote>
|
||||||
<warmupEffecter>Coagulate</warmupEffecter>
|
<warmupEffecter>Coagulate</warmupEffecter>
|
||||||
<warmupStartSound>Coagulate_Cast</warmupStartSound>
|
<warmupStartSound>Coagulate_Cast</warmupStartSound>
|
||||||
|
@ -28,6 +27,9 @@
|
||||||
</targetParams>
|
</targetParams>
|
||||||
</verbProperties>
|
</verbProperties>
|
||||||
<comps>
|
<comps>
|
||||||
|
<li Class="RJW_Genes.CompProperties_AbilityLifeForceCost">
|
||||||
|
<fertilinCost>0.2</fertilinCost>
|
||||||
|
</li>
|
||||||
<li Class="RJW_Genes.CompProperties_AbilityPussyHeal"> <!-- namespace needs to be changed when copied to another mod-->
|
<li Class="RJW_Genes.CompProperties_AbilityPussyHeal"> <!-- namespace needs to be changed when copied to another mod-->
|
||||||
<tendQualityRange>0.4~0.8</tendQualityRange>
|
<tendQualityRange>0.4~0.8</tendQualityRange>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -37,6 +37,12 @@
|
||||||
<displayPriorityInXenotype>15</displayPriorityInXenotype>
|
<displayPriorityInXenotype>15</displayPriorityInXenotype>
|
||||||
</GeneCategoryDef>
|
</GeneCategoryDef>
|
||||||
|
|
||||||
|
<GeneCategoryDef>
|
||||||
|
<defName>rjw_genes_fertilin</defName>
|
||||||
|
<label>Fertilin</label>
|
||||||
|
<displayPriorityInXenotype>14</displayPriorityInXenotype>
|
||||||
|
</GeneCategoryDef>
|
||||||
|
|
||||||
<GeneCategoryDef>
|
<GeneCategoryDef>
|
||||||
<defName>rjw_genes_breeding</defName>
|
<defName>rjw_genes_breeding</defName>
|
||||||
<label>Breeding</label>
|
<label>Breeding</label>
|
||||||
|
@ -61,4 +67,6 @@
|
||||||
<displayPriorityInXenotype>8</displayPriorityInXenotype>
|
<displayPriorityInXenotype>8</displayPriorityInXenotype>
|
||||||
</GeneCategoryDef>
|
</GeneCategoryDef>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Defs>
|
</Defs>
|
|
@ -2,8 +2,8 @@
|
||||||
<Defs>
|
<Defs>
|
||||||
<GeneDef>
|
<GeneDef>
|
||||||
<defName>rjw_genes_lifeforce</defName>
|
<defName>rjw_genes_lifeforce</defName>
|
||||||
<label>lifeforce</label>
|
<label>fertilin</label>
|
||||||
<description>Carriers of this gene have a reserve of biological strength powered by a resource called lifeforce. The resource can be gained and spent in various ways, all of which are unlocked by other genes.\n\nCarriers lose 10 lifeforce per day from biological entropy.</description>
|
<description>Carriers of this gene have a reserve of biological strength powered by a resource called fertilin. The resource can be gained and spent in various ways, all of which are unlocked by other genes.\n\nCarriers lose 10 lifeforce per day from biological entropy.</description>
|
||||||
<geneClass>RJW_Genes.Gene_LifeForce</geneClass>
|
<geneClass>RJW_Genes.Gene_LifeForce</geneClass>
|
||||||
<resourceGizmoType>RJW_Genes.GeneGizmo_ResourceLifeForce</resourceGizmoType>
|
<resourceGizmoType>RJW_Genes.GeneGizmo_ResourceLifeForce</resourceGizmoType>
|
||||||
<resourceLabel>lifeforce</resourceLabel>
|
<resourceLabel>lifeforce</resourceLabel>
|
||||||
|
@ -14,13 +14,13 @@
|
||||||
</resourceGizmoThresholds>
|
</resourceGizmoThresholds>
|
||||||
<showGizmoOnWorldView>true</showGizmoOnWorldView>
|
<showGizmoOnWorldView>true</showGizmoOnWorldView>
|
||||||
<showGizmoWhenDrafted>true</showGizmoWhenDrafted>
|
<showGizmoWhenDrafted>true</showGizmoWhenDrafted>
|
||||||
<resourceDescription>A reserve of biological strength which can be gained and spent in a variety of ways. \n\nLifeforce can be increased by absorbing cum, typically through oral sex or stored cum. \n\nIf lifeforce reaches zero, {PAWN_nameDef} will become very unhappy and may try to obtain some forcefully.</resourceDescription>
|
<resourceDescription>A reserve of biological strength which can be gained and spent in a variety of ways. \n\nFertilin can be increased by absorbing cum, typically through oral sex or stored cum. \n\nIf fertilin reaches zero, {PAWN_nameDef} will become very unhappy and may try to obtain some forcefully.</resourceDescription>
|
||||||
<iconPath>UI/Icons/Genes/Gene_Hemogenic</iconPath>
|
<iconPath>UI/Icons/Genes/Gene_Hemogenic</iconPath>
|
||||||
<selectionWeight>0</selectionWeight>
|
<selectionWeight>0</selectionWeight>
|
||||||
<displayCategory>Hemogen</displayCategory>
|
<displayCategory>rjw_genes_fertilin</displayCategory>
|
||||||
<displayOrderInCategory>-2</displayOrderInCategory>
|
<displayOrderInCategory>-2</displayOrderInCategory>
|
||||||
<customEffectDescriptions>
|
<customEffectDescriptions>
|
||||||
<li>Gives lifeforce supply.</li>
|
<li>Gives fertilin supply.</li>
|
||||||
</customEffectDescriptions>
|
</customEffectDescriptions>
|
||||||
<symbolPack>
|
<symbolPack>
|
||||||
<prefixSymbols>
|
<prefixSymbols>
|
||||||
|
@ -28,33 +28,60 @@
|
||||||
</prefixSymbols>
|
</prefixSymbols>
|
||||||
</symbolPack>
|
</symbolPack>
|
||||||
<mentalBreakDef>rjw_genes_lifeforce_randomrape</mentalBreakDef>
|
<mentalBreakDef>rjw_genes_lifeforce_randomrape</mentalBreakDef>
|
||||||
<minAgeActive>13</minAgeActive>
|
<minAgeActive>18</minAgeActive>
|
||||||
<resourceLossPerDay>0.02</resourceLossPerDay>
|
<resourceLossPerDay>0.02</resourceLossPerDay>
|
||||||
<biostatCpx>1</biostatCpx>
|
<biostatCpx>1</biostatCpx>
|
||||||
<biostatMet>1</biostatMet>
|
<biostatMet>1</biostatMet>
|
||||||
</GeneDef>
|
</GeneDef>
|
||||||
|
|
||||||
<GeneDef>
|
<GeneDef>
|
||||||
<defName>rjw_genes_pussyhealer</defName>
|
<defName>rjw_genes_pussyhealer</defName>
|
||||||
<label>Pussy Healer</label>
|
<label>Pussy Healer</label>
|
||||||
<labelShortAdj>pussyhealer</labelShortAdj>
|
<labelShortAdj>pussyhealer</labelShortAdj>
|
||||||
<description>Carriers of this gene are able use vaginal sex to tend to other's wounds.</description>
|
<description>Carriers of this gene are able use vaginal sex to tend to other's wounds.</description>
|
||||||
<iconPath>Things/Mote/Heart</iconPath>
|
<iconPath>Things/Mote/Heart</iconPath>
|
||||||
<displayCategory>Ability</displayCategory>
|
<prerequisite>rjw_genes_lifeforce</prerequisite>
|
||||||
<abilities>
|
<displayOrderInCategory>10</displayOrderInCategory>
|
||||||
<li>rjw_genes_pussyheal</li>
|
<displayCategory>rjw_genes_fertilin</displayCategory>
|
||||||
</abilities>
|
<abilities>
|
||||||
<descriptionHyperlinks>
|
<li>rjw_genes_pussyheal</li>
|
||||||
<AbilityDef>rjw_genes_pussyheal</AbilityDef>
|
</abilities>
|
||||||
</descriptionHyperlinks>
|
<descriptionHyperlinks>
|
||||||
<biostatMet>1</biostatMet>
|
<AbilityDef>rjw_genes_pussyheal</AbilityDef>
|
||||||
<minAgeActive>13</minAgeActive>
|
</descriptionHyperlinks>
|
||||||
<symbolPack>
|
<biostatCpx>1</biostatCpx>
|
||||||
<suffixSymbols>
|
<biostatMet>-1</biostatMet>
|
||||||
<li><symbol>life</symbol></li>
|
<minAgeActive>18</minAgeActive>
|
||||||
<li><symbol>clotter</symbol></li>
|
<symbolPack>
|
||||||
<li><symbol>tender</symbol></li>
|
<suffixSymbols>
|
||||||
</suffixSymbols>
|
<li><symbol>life</symbol></li>
|
||||||
</symbolPack>
|
<li><symbol>clotter</symbol></li>
|
||||||
</GeneDef>
|
<li><symbol>tender</symbol></li>
|
||||||
|
</suffixSymbols>
|
||||||
|
</symbolPack>
|
||||||
|
</GeneDef>
|
||||||
|
|
||||||
|
<GeneDef>
|
||||||
|
<defName>rjw_genes_vaginal_absorber</defName>
|
||||||
|
<label>Vaginal Fertilin Absorber</label>
|
||||||
|
<description>Pawns with this gene are able to absorb ferilin through their vagina.</description>
|
||||||
|
<iconPath>Things/Mote/Heart</iconPath>
|
||||||
|
<prerequisite>rjw_genes_lifeforce</prerequisite>
|
||||||
|
<displayOrderInCategory>2</displayOrderInCategory>
|
||||||
|
<displayCategory>rjw_genes_fertilin</displayCategory>
|
||||||
|
<biostatCpx>1</biostatCpx>
|
||||||
|
<biostatMet>-1</biostatMet>
|
||||||
|
</GeneDef>
|
||||||
|
|
||||||
|
<GeneDef>
|
||||||
|
<defName>rjw_genes_anal_absorber</defName>
|
||||||
|
<label>Anal Fertilin Absorber</label>
|
||||||
|
<description>Pawns with this gene are able to absorb ferilin through their anus.</description>
|
||||||
|
<iconPath>Things/Mote/Heart</iconPath>
|
||||||
|
<prerequisite>rjw_genes_lifeforce</prerequisite>
|
||||||
|
<displayOrderInCategory>3</displayOrderInCategory>
|
||||||
|
<displayCategory>rjw_genes_fertilin</displayCategory>
|
||||||
|
<biostatCpx>1</biostatCpx>
|
||||||
|
<biostatMet>-1</biostatMet>
|
||||||
|
</GeneDef>
|
||||||
</Defs>
|
</Defs>
|
|
@ -15,7 +15,7 @@
|
||||||
<label>Aphrodisiac Pheromones</label>
|
<label>Aphrodisiac Pheromones</label>
|
||||||
<displayCategory>rjw_genes_special</displayCategory>
|
<displayCategory>rjw_genes_special</displayCategory>
|
||||||
<geneClass>RJW_Genes.Gene_Aphrodisiac_Pheromones</geneClass>
|
<geneClass>RJW_Genes.Gene_Aphrodisiac_Pheromones</geneClass>
|
||||||
<description>Pheremones of this pawn induce an incressed sexdrive to others nearby.</description>
|
<description>Pheremones of this pawn induce an increased sexdrive to others nearby.</description>
|
||||||
<iconPath>UI/Memes/FleshPurity</iconPath>
|
<iconPath>UI/Memes/FleshPurity</iconPath>
|
||||||
<displayOrderInCategory>2</displayOrderInCategory>
|
<displayOrderInCategory>2</displayOrderInCategory>
|
||||||
<biostatCpx>1</biostatCpx>
|
<biostatCpx>1</biostatCpx>
|
||||||
|
|
|
@ -75,5 +75,7 @@ namespace RJW_Genes
|
||||||
// LifeForce
|
// LifeForce
|
||||||
public static readonly GeneDef rjw_genes_lifeforce;
|
public static readonly GeneDef rjw_genes_lifeforce;
|
||||||
public static readonly GeneDef rjw_genes_pussyhealer;
|
public static readonly GeneDef rjw_genes_pussyhealer;
|
||||||
|
public static readonly GeneDef rjw_genes_vaginal_absorber;
|
||||||
|
public static readonly GeneDef rjw_genes_anal_absorber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,38 @@
|
||||||
using System;
|
using System;
|
||||||
using Verse;
|
using Verse;
|
||||||
|
using RimWorld;
|
||||||
namespace RJW_Genes
|
namespace RJW_Genes
|
||||||
{
|
{
|
||||||
public class GeneUtility
|
public class GeneUtility
|
||||||
{
|
{
|
||||||
|
//Instead of seperate functions this should be simpeler
|
||||||
|
public static bool HasGeneNullCheck(Pawn pawn, GeneDef genedef)
|
||||||
|
{
|
||||||
|
if (pawn.genes == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return pawn.genes.HasGene(genedef);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void OffsetLifeForce(Pawn pawn, float offset, bool applyStatFactor = true)
|
||||||
|
{
|
||||||
|
if (!ModsConfig.BiotechActive)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//if (offset > 0f && applyStatFactor)
|
||||||
|
//{
|
||||||
|
// offset *= pawn.GetStatValue(StatDefOf.HemogenGainFactor, true, -1);
|
||||||
|
//}
|
||||||
|
Pawn_GeneTracker genes2 = pawn.genes;
|
||||||
|
Gene_LifeForce gene_LifeFroce = (genes2 != null) ? genes2.GetFirstGeneOfType<Gene_LifeForce>() : null;
|
||||||
|
if (gene_LifeFroce != null)
|
||||||
|
{
|
||||||
|
gene_LifeFroce.Value += offset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static bool IsMechbreeder(Pawn pawn)
|
public static bool IsMechbreeder(Pawn pawn)
|
||||||
{
|
{
|
||||||
if (pawn.genes == null)
|
if (pawn.genes == null)
|
||||||
|
|
|
@ -48,5 +48,24 @@ namespace RJW_Genes
|
||||||
}
|
}
|
||||||
return any_wound_tended;
|
return any_wound_tended;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static float LifeForceCost(Ability ability)
|
||||||
|
{
|
||||||
|
if (ability.comps != null)
|
||||||
|
{
|
||||||
|
using (List<AbilityComp>.Enumerator enumerator = ability.comps.GetEnumerator())
|
||||||
|
{
|
||||||
|
while (enumerator.MoveNext())
|
||||||
|
{
|
||||||
|
CompAbilityEffect_LifeForceCost compAbilityEffect_HemogenCost;
|
||||||
|
if ((compAbilityEffect_HemogenCost = (enumerator.Current as CompAbilityEffect_LifeForceCost)) != null)
|
||||||
|
{
|
||||||
|
return compAbilityEffect_HemogenCost.Props.fertilinCost;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
118
Source/Genes/Life_Force/CompAbilityEffect_LifeForceCost.cs
Normal file
118
Source/Genes/Life_Force/CompAbilityEffect_LifeForceCost.cs
Normal file
|
@ -0,0 +1,118 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Text;
|
||||||
|
using Verse;
|
||||||
|
using Verse.AI;
|
||||||
|
using RimWorld;
|
||||||
|
namespace RJW_Genes
|
||||||
|
{
|
||||||
|
// Token: 0x02000F66 RID: 3942
|
||||||
|
public class CompAbilityEffect_LifeForceCost : CompAbilityEffect
|
||||||
|
{
|
||||||
|
// Token: 0x17000FFB RID: 4091
|
||||||
|
// (get) Token: 0x06005D18 RID: 23832 RVA: 0x001FA767 File Offset: 0x001F8967
|
||||||
|
public new CompProperties_AbilityLifeForceCost Props
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (CompProperties_AbilityLifeForceCost)this.props;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Token: 0x17000FFC RID: 4092
|
||||||
|
// (get) Token: 0x06005D19 RID: 23833 RVA: 0x001FA774 File Offset: 0x001F8974
|
||||||
|
private bool HasEnoughFertilin
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
Pawn_GeneTracker genes = this.parent.pawn.genes;
|
||||||
|
Gene_LifeForce gene_lifeforce = (genes != null) ? genes.GetFirstGeneOfType < Gene_LifeForce>() : null;
|
||||||
|
return gene_lifeforce != null && gene_lifeforce.Value >= this.Props.fertilinCost;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Token: 0x06005D1A RID: 23834 RVA: 0x001FA7B7 File Offset: 0x001F89B7
|
||||||
|
public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
|
||||||
|
{
|
||||||
|
base.Apply(target, dest);
|
||||||
|
GeneUtility.OffsetLifeForce(this.parent.pawn, -this.Props.fertilinCost, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Token: 0x06005D1B RID: 23835 RVA: 0x001FA7E0 File Offset: 0x001F89E0
|
||||||
|
public override bool GizmoDisabled(out string reason)
|
||||||
|
{
|
||||||
|
Pawn_GeneTracker genes = this.parent.pawn.genes;
|
||||||
|
Gene_LifeForce gene_LifeForce = (genes != null) ? genes.GetFirstGeneOfType<Gene_LifeForce>() : null;
|
||||||
|
if (gene_LifeForce == null)
|
||||||
|
{
|
||||||
|
reason = "AbilityDisabledNoFertilinGene".Translate(this.parent.pawn);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (gene_LifeForce.Value < this.Props.fertilinCost)
|
||||||
|
{
|
||||||
|
reason = "AbilityDisabledNoFertilin".Translate(this.parent.pawn);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
float num = this.TotalLifeForceCostOfQueuedAbilities();
|
||||||
|
float num2 = this.Props.fertilinCost + num;
|
||||||
|
if (this.Props.fertilinCost > 1E-45f && num2 > gene_LifeForce.Value)
|
||||||
|
{
|
||||||
|
reason = "AbilityDisabledNoFertilin".Translate(this.parent.pawn);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
reason = null;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool AICanTargetNow(LocalTargetInfo target)
|
||||||
|
{
|
||||||
|
return this.HasEnoughFertilin;
|
||||||
|
}
|
||||||
|
|
||||||
|
private float TotalLifeForceCostOfQueuedAbilities()
|
||||||
|
{
|
||||||
|
Pawn_JobTracker jobs = this.parent.pawn.jobs;
|
||||||
|
object obj;
|
||||||
|
if (jobs == null)
|
||||||
|
{
|
||||||
|
obj = null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Job curJob = jobs.curJob;
|
||||||
|
obj = ((curJob != null) ? curJob.verbToUse : null);
|
||||||
|
}
|
||||||
|
Verb_CastAbility verb_CastAbility = obj as Verb_CastAbility;
|
||||||
|
float num;
|
||||||
|
if (verb_CastAbility == null)
|
||||||
|
{
|
||||||
|
num = 0f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Ability ability = verb_CastAbility.ability;
|
||||||
|
num = ((ability != null) ? AbilityUtility.LifeForceCost(ability) : 0f);
|
||||||
|
}
|
||||||
|
float num2 = num;
|
||||||
|
if (this.parent.pawn.jobs != null)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < this.parent.pawn.jobs.jobQueue.Count; i++)
|
||||||
|
{
|
||||||
|
Verb_CastAbility verb_CastAbility2;
|
||||||
|
if ((verb_CastAbility2 = (this.parent.pawn.jobs.jobQueue[i].job.verbToUse as Verb_CastAbility)) != null)
|
||||||
|
{
|
||||||
|
float num3 = num2;
|
||||||
|
Ability ability2 = verb_CastAbility2.ability;
|
||||||
|
num2 = num3 + ((ability2 != null) ? AbilityUtility.LifeForceCost(ability2) : 0f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return num2;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Modified version of HemogenCost in Ability
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using Verse;
|
||||||
|
using RimWorld;
|
||||||
|
|
||||||
|
namespace RJW_Genes
|
||||||
|
{
|
||||||
|
// Token: 0x02000F65 RID: 3941
|
||||||
|
public class CompProperties_AbilityLifeForceCost : CompProperties_AbilityEffect
|
||||||
|
{
|
||||||
|
// Token: 0x06005D16 RID: 23830 RVA: 0x001FA73F File Offset: 0x001F893F
|
||||||
|
public CompProperties_AbilityLifeForceCost()
|
||||||
|
{
|
||||||
|
this.compClass = typeof(CompAbilityEffect_LifeForceCost);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Token: 0x06005D17 RID: 23831 RVA: 0x001FA757 File Offset: 0x001F8957
|
||||||
|
public override IEnumerable<string> ExtraStatSummary()
|
||||||
|
{
|
||||||
|
yield return "AbilityFertilinCost" + ": " + Mathf.RoundToInt(this.fertilinCost * 100f);
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Token: 0x040038CD RID: 14541
|
||||||
|
public float fertilinCost;
|
||||||
|
}
|
||||||
|
}
|
|
@ -30,11 +30,11 @@ namespace RJW_Genes
|
||||||
{
|
{
|
||||||
if (this.gene.targetValue <= 0f)
|
if (this.gene.targetValue <= 0f)
|
||||||
{
|
{
|
||||||
text += "NeverConsumeCum";
|
text += "NeverSeekFertilin";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
text = text + ("ConsumeCumBelow" + ": ") + this.gene.PostProcessValue(this.gene.targetValue);
|
text = text + ("SeekFertilinBelow" + ": ") + this.gene.PostProcessValue(this.gene.targetValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!this.drainGenes.NullOrEmpty<IGeneResourceDrain>())
|
if (!this.drainGenes.NullOrEmpty<IGeneResourceDrain>())
|
||||||
|
|
|
@ -10,7 +10,7 @@ using Verse;
|
||||||
|
|
||||||
namespace RJW_Genes
|
namespace RJW_Genes
|
||||||
{
|
{
|
||||||
|
|
||||||
[HarmonyPatch(typeof(SexUtility), nameof(SexUtility.SatisfyPersonal))]
|
[HarmonyPatch(typeof(SexUtility), nameof(SexUtility.SatisfyPersonal))]
|
||||||
public static class Patch_LifeForce
|
public static class Patch_LifeForce
|
||||||
{
|
{
|
||||||
|
@ -20,16 +20,43 @@ namespace RJW_Genes
|
||||||
if (props.pawn == null || !props.hasPartner())
|
if (props.pawn == null || !props.hasPartner())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
float factor = 1f;
|
||||||
if (GeneUtility.HasLifeForce(props.pawn))
|
if (GeneUtility.HasLifeForce(props.pawn))
|
||||||
{
|
{
|
||||||
if (props.sexType == xxx.rjwSextype.Oral || props.sexType == xxx.rjwSextype.Fellatio || props.sexType == xxx.rjwSextype.Sixtynine)
|
if (props.sexType == xxx.rjwSextype.Oral || props.sexType == xxx.rjwSextype.Fellatio || props.sexType == xxx.rjwSextype.Sixtynine)
|
||||||
{
|
{
|
||||||
Pawn_GeneTracker genes = props.pawn.genes;
|
AbsorbFertilin(props, factor);
|
||||||
Gene_LifeForce gene = genes.GetFirstGeneOfType<Gene_LifeForce>();
|
//Currently taking the sum of all penises, maybe I should just consider one at random
|
||||||
gene.Resource.Value += CumUtility.GetTotalFluidAmount(props.partner); //total amount may need to be modified to be balanced or maybe I should just consider one at random
|
|
||||||
}
|
}
|
||||||
}
|
else if (props.sexType == xxx.rjwSextype.Vaginal && GeneUtility.HasGeneNullCheck(props.pawn, GeneDefOf.rjw_genes_vaginal_absorber))
|
||||||
|
{
|
||||||
|
AbsorbFertilin(props, factor);
|
||||||
|
}
|
||||||
|
else if (props.sexType == xxx.rjwSextype.Anal && GeneUtility.HasGeneNullCheck(props.pawn, GeneDefOf.rjw_genes_anal_absorber))
|
||||||
|
{
|
||||||
|
AbsorbFertilin(props, factor);
|
||||||
|
}
|
||||||
|
else if (props.sexType == xxx.rjwSextype.DoublePenetration)
|
||||||
|
{
|
||||||
|
if (GeneUtility.HasGeneNullCheck(props.pawn, GeneDefOf.rjw_genes_vaginal_absorber))
|
||||||
|
{
|
||||||
|
AbsorbFertilin(props, 0.5f);
|
||||||
|
}
|
||||||
|
if (GeneUtility.HasGeneNullCheck(props.pawn, GeneDefOf.rjw_genes_anal_absorber))
|
||||||
|
{
|
||||||
|
AbsorbFertilin(props, 0.5f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void AbsorbFertilin(SexProps props, float factor = 1f)
|
||||||
|
{
|
||||||
|
Pawn_GeneTracker genes = props.pawn.genes;
|
||||||
|
Gene_LifeForce gene = genes.GetFirstGeneOfType<Gene_LifeForce>();
|
||||||
|
gene.Resource.Value += CumUtility.GetTotalFluidAmount(props.partner) / 100 * factor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,8 +115,10 @@
|
||||||
<Compile Include="Genes\Genitalia\Gene_EquineGenitalia.cs" />
|
<Compile Include="Genes\Genitalia\Gene_EquineGenitalia.cs" />
|
||||||
<Compile Include="Genes\Genitalia\GenitaliaChanger.cs" />
|
<Compile Include="Genes\Genitalia\GenitaliaChanger.cs" />
|
||||||
<Compile Include="Genes\Life_Force\AbilityUtility.cs" />
|
<Compile Include="Genes\Life_Force\AbilityUtility.cs" />
|
||||||
|
<Compile Include="Genes\Life_Force\CompAbilityEffect_LifeForceCost.cs" />
|
||||||
<Compile Include="Genes\Life_Force\CompAbility_SexInteractionRequirements.cs" />
|
<Compile Include="Genes\Life_Force\CompAbility_SexInteractionRequirements.cs" />
|
||||||
<Compile Include="Genes\Life_Force\CompAbilityEffect_PussyHeal.cs" />
|
<Compile Include="Genes\Life_Force\CompAbilityEffect_PussyHeal.cs" />
|
||||||
|
<Compile Include="Genes\Life_Force\CompProperties_AbilityLifeForceCost.cs" />
|
||||||
<Compile Include="Genes\Life_Force\CompProperties_SexInteractionRequirements.cs" />
|
<Compile Include="Genes\Life_Force\CompProperties_SexInteractionRequirements.cs" />
|
||||||
<Compile Include="Genes\Life_Force\CompProperties_AbilityPussyHeal.cs" />
|
<Compile Include="Genes\Life_Force\CompProperties_AbilityPussyHeal.cs" />
|
||||||
<Compile Include="Genes\Life_Force\GeneGizmo_ResourceLifeForce.cs" />
|
<Compile Include="Genes\Life_Force\GeneGizmo_ResourceLifeForce.cs" />
|
||||||
|
|
Loading…
Reference in a new issue