mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Added Generous Donor Gene, updated some docs
This commit is contained in:
parent
dd40ae40ee
commit
b5033deef6
10 changed files with 70 additions and 13 deletions
Binary file not shown.
|
@ -65,13 +65,19 @@
|
||||||
<description>This Xenotype cannot get cumflated.</description>
|
<description>This Xenotype cannot get cumflated.</description>
|
||||||
<iconPath>Genes/Icons/Placeholder</iconPath>
|
<iconPath>Genes/Icons/Placeholder</iconPath>
|
||||||
<displayOrderInCategory>537</displayOrderInCategory>
|
<displayOrderInCategory>537</displayOrderInCategory>
|
||||||
<!--
|
|
||||||
Note: This Gene has an accompanying patch for LicentiaLabs in ../Patches
|
|
||||||
-->
|
|
||||||
<exclusionTags>
|
<exclusionTags>
|
||||||
<li>NotCumflatable</li>
|
<li>NotCumflatable</li>
|
||||||
</exclusionTags>
|
</exclusionTags>
|
||||||
</GeneDef>
|
</GeneDef>
|
||||||
|
|
||||||
|
|
||||||
|
<GeneDef MayRequire="LustLicentia.RJWLabs">
|
||||||
|
<defName>rjw_genes_generous_donor</defName>
|
||||||
|
<label>Generous Donor</label>
|
||||||
|
<displayCategory>rjw_genes_cum</displayCategory>
|
||||||
|
<description>When this Xenotype transfers nutrition via cumshot, the giver will not get hungry. (Licentia Configuration for Transfer Nutrition must be enabled).</description>
|
||||||
|
<iconPath>Genes/Icons/Placeholder</iconPath>
|
||||||
|
<displayOrderInCategory>538</displayOrderInCategory>
|
||||||
|
</GeneDef>
|
||||||
|
|
||||||
</Defs>
|
</Defs>
|
|
@ -9,8 +9,8 @@ This is my first Mod I started from scratch so any feedback is very welcome.
|
||||||
- Different Genitalia Types
|
- Different Genitalia Types
|
||||||
- Genitalia Size Scaling
|
- Genitalia Size Scaling
|
||||||
- Extra Genitalia (and a Futa Attempt)
|
- Extra Genitalia (and a Futa Attempt)
|
||||||
- Some Traits
|
- Some Traits, Cumflation Immunity, Elasticity
|
||||||
- Cum-Amount Changes
|
- Cum-Amount Changes, Transfer Nutrition
|
||||||
- Mech Breeding / Insect Breeding Support
|
- Mech Breeding / Insect Breeding Support
|
||||||
|
|
||||||
See [planned things](TODOS.md) and feel free to contribute.
|
See [planned things](TODOS.md) and feel free to contribute.
|
||||||
|
@ -23,5 +23,5 @@ Please consider looking at [the known bugs](./KNOWN_BUGS.md)
|
||||||
|
|
||||||
## Genes vs. Races
|
## Genes vs. Races
|
||||||
|
|
||||||
I currently don't use Genes after Biotech was introduced.
|
I currently don't use Races after Biotech was introduced.
|
||||||
One of the main motivations was to have genes being added to the xenotypes that other mods and the base game add, e.g. adding demonic penis for impids.
|
One of the main motivations was to have genes being added to the xenotypes that other mods and the base game add, e.g. adding demonic penis for impids.
|
|
@ -60,8 +60,9 @@ namespace RJW_Genes
|
||||||
public static readonly GeneDef rjw_genes_much_cum;
|
public static readonly GeneDef rjw_genes_much_cum;
|
||||||
public static readonly GeneDef rjw_genes_very_much_cum;
|
public static readonly GeneDef rjw_genes_very_much_cum;
|
||||||
[MayRequire("LustLicentia.RJWLabs")] public static readonly GeneDef rjw_genes_likes_cumflation;
|
[MayRequire("LustLicentia.RJWLabs")] public static readonly GeneDef rjw_genes_likes_cumflation;
|
||||||
[MayRequire("LustLicentia.RJWLabs")] public static readonly GeneDef rjw_genes_cumflation_immunity; //Does currently not work like this
|
[MayRequire("LustLicentia.RJWLabs")] public static readonly GeneDef rjw_genes_cumflation_immunity;
|
||||||
|
[MayRequire("LustLicentia.RJWLabs")] public static readonly GeneDef rjw_genes_generous_donor;
|
||||||
|
|
||||||
// Reproduction
|
// Reproduction
|
||||||
public static readonly GeneDef rjw_genes_hypersexual;
|
public static readonly GeneDef rjw_genes_hypersexual;
|
||||||
public static readonly GeneDef rjw_genes_rapist;
|
public static readonly GeneDef rjw_genes_rapist;
|
||||||
|
|
|
@ -16,6 +16,7 @@ namespace RJW_Genes
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Changes LicentiaLabs (if Present) to not cumflate pawns that are cumflation immune.
|
/// Changes LicentiaLabs (if Present) to not cumflate pawns that are cumflation immune.
|
||||||
/// This code is exercised / loaded in the HarmonyInit.
|
/// This code is exercised / loaded in the HarmonyInit.
|
||||||
|
/// Patched File: https://gitgud.io/John-the-Anabaptist/licentia-labs/-/blob/master/Source/LicentiaLabs/LicentiaLabs/Cumflation.cs
|
||||||
/// </summary>
|
/// </summary>
|
||||||
///
|
///
|
||||||
class Patch_Cumflation
|
class Patch_Cumflation
|
||||||
|
|
41
Source/Genes/Cum/Patch_TransferNutrition.cs
Normal file
41
Source/Genes/Cum/Patch_TransferNutrition.cs
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Reflection.Emit;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using HarmonyLib;
|
||||||
|
using rjw;
|
||||||
|
using RimWorld;
|
||||||
|
using Verse;
|
||||||
|
using LicentiaLabs;
|
||||||
|
|
||||||
|
namespace RJW_Genes
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Changes LicentiaLabs (if Present) to alter the TransferNutrition for rjw_genes_generous_donor.
|
||||||
|
/// This code is exercised / loaded in the HarmonyInit.
|
||||||
|
/// Patched File: https://gitgud.io/John-the-Anabaptist/licentia-labs/-/blob/master/Source/LicentiaLabs/LicentiaLabs/Cumflation.cs
|
||||||
|
/// </summary>
|
||||||
|
///
|
||||||
|
class Patch_TransferNutrition
|
||||||
|
{
|
||||||
|
// This patch does not need the normal Harmony Targetting,
|
||||||
|
// as it needs to be added only on demand (See HarmonyInit.cs)
|
||||||
|
public static void Postfix(Pawn giver, Pawn receiver, float cumAmount)
|
||||||
|
{
|
||||||
|
// Design decision:
|
||||||
|
// I could have done some transpiler stuff, but that is scary and might need to be adjusted quite a lot
|
||||||
|
// Hence, I simply re-book the nutrition back to the giver in the Postfix. That should be robust and easy.
|
||||||
|
|
||||||
|
if (GeneUtility.IsGenerousDonor(giver)) {
|
||||||
|
float donatedNutrition = CumflationHelper.CalculateNutritionAmount(giver, cumAmount);
|
||||||
|
// TODO: In theory, there could be something weird happening if the donor has food less than X and the "IgnoreThermodynamics" is set on.
|
||||||
|
// Then it can happen that the donor ends up with more food than he had before cumshot, but I think that is somewhat funny given that you have ignore Thermodynamics on.
|
||||||
|
Need_Food inflatorFood = giver.needs.TryGetNeed<Need_Food>();
|
||||||
|
inflatorFood.CurLevel += donatedNutrition;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -59,5 +59,13 @@ namespace RJW_Genes
|
||||||
}
|
}
|
||||||
return pawn.genes.HasGene(GeneDefOf.rjw_genes_cumflation_immunity);
|
return pawn.genes.HasGene(GeneDefOf.rjw_genes_cumflation_immunity);
|
||||||
}
|
}
|
||||||
|
public static bool IsGenerousDonor(Pawn pawn)
|
||||||
|
{
|
||||||
|
if (pawn.genes == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return pawn.genes.HasGene(GeneDefOf.rjw_genes_generous_donor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -21,9 +21,12 @@ namespace RJW_Genes
|
||||||
{
|
{
|
||||||
if (ModsConfig.IsActive("LustLicentia.RJWLabs"))
|
if (ModsConfig.IsActive("LustLicentia.RJWLabs"))
|
||||||
{
|
{
|
||||||
// Gene: Cumflation Immunity
|
// Gene: Cumflation Immunity [Prefix Patch]
|
||||||
harmony.Patch(AccessTools.Method(typeof(LicentiaLabs.CumflationHelper), nameof(LicentiaLabs.CumflationHelper.Cumflation)),
|
harmony.Patch(AccessTools.Method(typeof(LicentiaLabs.CumflationHelper), nameof(LicentiaLabs.CumflationHelper.Cumflation)),
|
||||||
prefix: new HarmonyMethod(typeof(Patch_Cumflation), nameof(Patch_Cumflation.Prefix)));
|
prefix: new HarmonyMethod(typeof(Patch_Cumflation), nameof(Patch_Cumflation.Prefix)));
|
||||||
|
// Gene: Generous Donor [Postfix Patch]
|
||||||
|
harmony.Patch(AccessTools.Method(typeof(LicentiaLabs.CumflationHelper), nameof(LicentiaLabs.CumflationHelper.TransferNutrition)),
|
||||||
|
postfix: new HarmonyMethod(typeof(Patch_TransferNutrition), nameof(Patch_TransferNutrition.Postfix)));
|
||||||
}
|
}
|
||||||
}))();
|
}))();
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,7 @@
|
||||||
<Compile Include="Genes\Cum\Gene_VeryMuchCum.cs" />
|
<Compile Include="Genes\Cum\Gene_VeryMuchCum.cs" />
|
||||||
<Compile Include="Genes\Cum\Gene_MuchCum.cs" />
|
<Compile Include="Genes\Cum\Gene_MuchCum.cs" />
|
||||||
<Compile Include="Genes\Cum\Gene_NoCum.cs" />
|
<Compile Include="Genes\Cum\Gene_NoCum.cs" />
|
||||||
|
<Compile Include="Genes\Cum\Patch_TransferNutrition.cs" />
|
||||||
<Compile Include="Genes\Damage\Gene_Elasticity.cs" />
|
<Compile Include="Genes\Damage\Gene_Elasticity.cs" />
|
||||||
<Compile Include="Genes\Cum\Patch_Cumflation.cs" />
|
<Compile Include="Genes\Cum\Patch_Cumflation.cs" />
|
||||||
<Compile Include="Genes\ExtraGenitalia\Gene_ExtraBreasts.cs" />
|
<Compile Include="Genes\ExtraGenitalia\Gene_ExtraBreasts.cs" />
|
||||||
|
|
4
TODOS.md
4
TODOS.md
|
@ -8,10 +8,6 @@ So any help is very appreciated, even if it is just pointing me to existing simi
|
||||||
**Sanguophage like Cumwhores** adding Hemogen and refilling it by getting semen.
|
**Sanguophage like Cumwhores** adding Hemogen and refilling it by getting semen.
|
||||||
Showstopper here is the amount of code required, and that I need to understand a bit better of harmony to run the AfterSexUtility and modulate SexChances.
|
Showstopper here is the amount of code required, and that I need to understand a bit better of harmony to run the AfterSexUtility and modulate SexChances.
|
||||||
|
|
||||||
**Immunity to Soreness / Ignoring Cumflation Mali**
|
|
||||||
|
|
||||||
**LicentiaLabs TransferNutrition _Generous Donor_** pawns that get head do not loose nutrition or only part of what they fire.
|
|
||||||
|
|
||||||
**Adjustable Cock-Size** like e.g. artificial genitalia have
|
**Adjustable Cock-Size** like e.g. artificial genitalia have
|
||||||
|
|
||||||
## Animal Gene Inheritance
|
## Animal Gene Inheritance
|
||||||
|
|
Loading…
Reference in a new issue