mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Asexual Pawns wont go raping anymore, fixes #100
This commit is contained in:
parent
ae9baa2d6b
commit
77b81d28cc
2 changed files with 32 additions and 0 deletions
|
@ -26,6 +26,9 @@
|
|||
- Issues when generating relations (#98, fixed in #106 thanks @Jaaldabaoth)
|
||||
- Hardening of Licentia Dependencies (#105)
|
||||
- Littered Birth and Chest-Burst Pregnancy are now mutually exclusive (#96)
|
||||
- Youth Fountain cannot youth on masturbation anymore (#99)
|
||||
- Documented the HasActiveGene Error Message (#104)
|
||||
- Pawns with "rjw_genes_no_sexneed" wont go raping (or atleast way less, #100)
|
||||
|
||||
|
||||
**Changes**:
|
||||
|
@ -37,6 +40,7 @@
|
|||
- Translate-Key for Animal Hybrid Race-Names
|
||||
- "Tick-Speed" for Evergrowth moved from Mod-Settings to XML
|
||||
- Some new Icons thanks to Kira-Bad-Artist
|
||||
- Some new Icons thanks to Archer
|
||||
|
||||
# 2.0.0
|
||||
|
||||
|
|
28
Source/Genes/Patches/Patch_Asexual_CanRape.cs
Normal file
28
Source/Genes/Patches/Patch_Asexual_CanRape.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
using HarmonyLib;
|
||||
using rjw;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_Genes.Genes.Patches
|
||||
{
|
||||
/// <summary>
|
||||
/// This Patch hooks after "can_rape" and changes it to false for pawns that have no sex_need (are a-sexual).
|
||||
/// This helps with #100, and is more of a non-intrusive improvement over the base game.
|
||||
/// </summary>
|
||||
[HarmonyPatch(typeof(xxx), nameof(xxx.can_rape))]
|
||||
public class Patch_Asexual_CanRape
|
||||
{
|
||||
public static bool PostFix(Pawn pawn, ref bool __result)
|
||||
{
|
||||
if (pawn != null && pawn.genes != null && pawn.genes.HasActiveGene(GeneDefOf.rjw_genes_no_sex_need))
|
||||
{
|
||||
__result = false;
|
||||
}
|
||||
return __result;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue