mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Added Gene Aphrodisiac Pheromones and some settings
This commit is contained in:
parent
7bf8efb00d
commit
f0a9cce9c9
12 changed files with 134 additions and 6 deletions
|
@ -47,7 +47,7 @@ namespace RJW_BGS
|
|||
{
|
||||
foreach (BestialityGeneInheritanceDef gene in raceGeneDef.genes)
|
||||
{
|
||||
if (gene.chance >= Rand.Range(0.01f,1f))
|
||||
if (gene.chance * RJW_BGSSettings.global_gene_chance >= Rand.Range(0.01f,1f))
|
||||
{
|
||||
genelist.Add(DefDatabase<GeneDef>.GetNamed(gene.defName));
|
||||
}
|
||||
|
@ -64,8 +64,13 @@ namespace RJW_BGS
|
|||
}
|
||||
}
|
||||
|
||||
//For ParchRJWHediffInsect_egg
|
||||
public static void NewGenes(Pawn mother, Pawn dad, Pawn baby)
|
||||
{
|
||||
if (!RJW_BGSSettings.enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (baby.RaceProps.Humanlike)
|
||||
{
|
||||
if (baby.genes == null)
|
||||
|
|
|
@ -16,6 +16,10 @@ namespace RJW_BGS
|
|||
[HarmonyPostfix]
|
||||
public static void AddGenes(Pawn mother, Pawn dad, ref Hediff_BasePregnancy __instance)
|
||||
{
|
||||
if (!RJW_BGSSettings.enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
foreach (Pawn baby in __instance.babies)
|
||||
{
|
||||
if (baby.RaceProps.Humanlike)
|
||||
|
|
|
@ -22,6 +22,10 @@ namespace RJW_BGS
|
|||
[HarmonyPostfix]
|
||||
public static void AnimalInheritedGenes(Pawn father, Pawn mother, ref GeneSet __result)
|
||||
{
|
||||
if (!RJW_BGSSettings.enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
List<GeneDef> genes = InheritanceUtility.AnimalInheritedGenes(father, mother);
|
||||
if (genes.Any())
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||
using Verse;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RJW_Genes.Animal_Inheritance
|
||||
namespace RJW_BGS
|
||||
{
|
||||
public class RJW_BGSSettings : ModSettings
|
||||
{
|
||||
|
@ -23,6 +23,10 @@ namespace RJW_Genes.Animal_Inheritance
|
|||
listing_Standard.Gap(24f);
|
||||
listing_Standard.CheckboxLabeled("enabled", ref enabled, "no function yet", 0f, 1f);
|
||||
//listing_Standard.CheckboxLabeled("sexfrenzy", ref sexfrenzy, "disable the effects", 0f, 1f);
|
||||
listing_Standard.Gap(5f);
|
||||
listing_Standard.Label("gene inheritance chance"+ ": " +
|
||||
Math.Round((double)(RJW_BGSSettings.global_gene_chance * 100f), 0).ToString() + "%", -1f, "modify chance for a gene to be inherited.");
|
||||
RJW_BGSSettings.global_gene_chance = listing_Standard.Slider(RJW_BGSSettings.global_gene_chance, 0f, 5f);
|
||||
listing_Standard.End();
|
||||
}
|
||||
|
||||
|
@ -30,8 +34,10 @@ namespace RJW_Genes.Animal_Inheritance
|
|||
{
|
||||
base.ExposeData();
|
||||
Scribe_Values.Look<bool>(ref RJW_BGSSettings.enabled, "enabled", RJW_BGSSettings.enabled, true);
|
||||
Scribe_Values.Look<float>(ref RJW_BGSSettings.global_gene_chance, "global_gene_chance", RJW_BGSSettings.global_gene_chance, true);
|
||||
}
|
||||
|
||||
public static bool enabled;
|
||||
public static float global_gene_chance = 1f;
|
||||
public static bool enabled = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||
using Verse;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RJW_Genes.Animal_Inheritance
|
||||
namespace RJW_BGS
|
||||
{
|
||||
public class RJW_BGSSettingsController : Mod
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue