diff --git a/Common/Assemblies/Rjw-Genes.dll b/Common/Assemblies/Rjw-Genes.dll
index 4c7463c..d3be5b0 100644
Binary files a/Common/Assemblies/Rjw-Genes.dll and b/Common/Assemblies/Rjw-Genes.dll differ
diff --git a/Common/Defs/Genes/GeneDefs_SexSpecial.xml b/Common/Defs/Genes/GeneDefs_SexSpecial.xml
index 3257882..6c27711 100644
--- a/Common/Defs/Genes/GeneDefs_SexSpecial.xml
+++ b/Common/Defs/Genes/GeneDefs_SexSpecial.xml
@@ -10,6 +10,7 @@
UI/Memes/FleshPurity
1
+
rjw_genes_youth_fountain
@@ -33,4 +34,16 @@
3
+
+ rjw_genes_aphrodisiac_pheromones
+
+ rjw_genes_special
+ RJW_Genes.Gene_Aphrodisiac_Pheromones
+ Pheremones of this pawn induce an incressed sexdrive to others nearby.
+ UI/Memes/FleshPurity
+ 4
+ 1
+ 1
+
+
\ No newline at end of file
diff --git a/Common/Defs/HediffDefs/Hediffs_Genes.xml b/Common/Defs/HediffDefs/Hediffs_Genes.xml
new file mode 100644
index 0000000..bebfce9
--- /dev/null
+++ b/Common/Defs/HediffDefs/Hediffs_Genes.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+ Aphrodisiac_Pheromone
+ HediffWithComps
+
+ Aphrodisiac pheromone effects.
+ (1,0,0.5)
+ true
+ 1.0
+
+
+ -4.0
+
+
+
+
+ false
+
+ 2
+
+
+
+
+
\ No newline at end of file
diff --git a/Common/Defs/RaceGeneDefs/RaceGeneDefs_Vanilla_Racegroups.xml b/Common/Defs/RaceGeneDefs/RaceGeneDefs_Vanilla_Racegroups.xml
index cfd2154..6148308 100644
--- a/Common/Defs/RaceGeneDefs/RaceGeneDefs_Vanilla_Racegroups.xml
+++ b/Common/Defs/RaceGeneDefs/RaceGeneDefs_Vanilla_Racegroups.xml
@@ -2,7 +2,12 @@
Canine
- Canine_Group
+
+ Canine_Group
+ CanineAnimal
+ CanineSingleGenderAnimal
+ CanineSkinAnimal
+
Ears_Floppy
@@ -38,7 +43,11 @@
Insect
- Insect_Group
+
+ Insect_Group
+ ArthropodOvipositorAnimal
+ ArthropodOvipositorHornyAnimal
+
Beauty_Ugly
@@ -73,7 +82,14 @@
Feline
- Feline_Group
+
+ Feline_Group
+ FelineAnimal
+ FelineHornyAnimal
+ FelineSingleGenderAnimal
+ AA_SandProwlerAnimal
+
+
Tail_Furry
@@ -108,7 +124,10 @@
Equine
- Equine_Group
+
+ Equine_Group
+ HorseAnimal
+
Furskin
@@ -143,7 +162,12 @@
Dragon
- Dragon_Group
+
+ Dragon_Group
+ ThrumboAnimal
+ DragonAnimal
+ DragonSingleGenderAnimal
+
Unstoppable
@@ -166,7 +190,7 @@
0.1
- rjw_genes_draconic_genitalia
+ rjw_genes_dragon_genitalia
0.6
@@ -190,7 +214,12 @@
Rodent
- Rodent_Group
+
+ Rodent_Group
+ RodentAnimal
+ RodentSingleGenderAnimal
+ DragonSingleGenderAnimal
+
Furskin
@@ -225,7 +254,10 @@
Racoon
- Raccon_Group
+
+ Raccon_Group
+ RaccoonAnimal
+
Furskin
diff --git a/Common/Defs/RaceGeneDefs/RaceGeneDefs_template.xml b/Common/Defs/RaceGeneDefs/RaceGeneDefs_template.xml
index 29e92c6..b092257 100644
--- a/Common/Defs/RaceGeneDefs/RaceGeneDefs_template.xml
+++ b/Common/Defs/RaceGeneDefs/RaceGeneDefs_template.xml
@@ -1,12 +1,17 @@
-
-
+this is to disable the xml, remove it for your own xml -->
-
+
+
+this is to disable the xml, remove it for your own xml -->
\ No newline at end of file
diff --git a/Source/Animal_Inheritance/InheritanceUtility.cs b/Source/Animal_Inheritance/InheritanceUtility.cs
index 1af9e8a..d860b14 100644
--- a/Source/Animal_Inheritance/InheritanceUtility.cs
+++ b/Source/Animal_Inheritance/InheritanceUtility.cs
@@ -48,7 +48,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.GetNamed(gene.defName));
}
@@ -65,8 +65,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)
diff --git a/Source/Animal_Inheritance/PatchRJWBestialityPregnancyUtility.cs b/Source/Animal_Inheritance/PatchRJWBestialityPregnancyUtility.cs
index b6b228b..31f9bfd 100644
--- a/Source/Animal_Inheritance/PatchRJWBestialityPregnancyUtility.cs
+++ b/Source/Animal_Inheritance/PatchRJWBestialityPregnancyUtility.cs
@@ -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)
diff --git a/Source/Animal_Inheritance/PatchVanillaPregnancyUtility.cs b/Source/Animal_Inheritance/PatchVanillaPregnancyUtility.cs
index 0f5cc90..baa72f5 100644
--- a/Source/Animal_Inheritance/PatchVanillaPregnancyUtility.cs
+++ b/Source/Animal_Inheritance/PatchVanillaPregnancyUtility.cs
@@ -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 genes = InheritanceUtility.AnimalInheritedGenes(father, mother);
if (genes.Any())
{
diff --git a/Source/Animal_Inheritance/RJW_BGSSettings.cs b/Source/Animal_Inheritance/RJW_BGSSettings.cs
index 1d5d859..4847d89 100644
--- a/Source/Animal_Inheritance/RJW_BGSSettings.cs
+++ b/Source/Animal_Inheritance/RJW_BGSSettings.cs
@@ -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(ref RJW_BGSSettings.enabled, "enabled", RJW_BGSSettings.enabled, true);
+ Scribe_Values.Look(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;
}
}
diff --git a/Source/Animal_Inheritance/RJW_BGSSettingsController.cs b/Source/Animal_Inheritance/RJW_BGSSettingsController.cs
index 53a7659..12ef107 100644
--- a/Source/Animal_Inheritance/RJW_BGSSettingsController.cs
+++ b/Source/Animal_Inheritance/RJW_BGSSettingsController.cs
@@ -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
{
diff --git a/Source/Animal_Inheritance/RaceGeneDef.cs b/Source/Animal_Inheritance/RaceGeneDef.cs
index 02ac62d..5c4b0ad 100644
--- a/Source/Animal_Inheritance/RaceGeneDef.cs
+++ b/Source/Animal_Inheritance/RaceGeneDef.cs
@@ -11,11 +11,11 @@ namespace RJW_BGS
public class RaceGeneDef : Def
{
public int priority;
- public String raceGroup;
+ public string raceGroup; //keeping this for backwards compatibility
+ public List raceGroups; //racegroup, but in list form so multiple can be entered, preference to use this over racegroup
public List raceNames;
public List pawnKindNames;
public List genes;
- //public List genechances;
public String hybridName;
}
}
diff --git a/Source/Animal_Inheritance/RaceGeneDef_Helper.cs b/Source/Animal_Inheritance/RaceGeneDef_Helper.cs
index 3db664c..3e32609 100644
--- a/Source/Animal_Inheritance/RaceGeneDef_Helper.cs
+++ b/Source/Animal_Inheritance/RaceGeneDef_Helper.cs
@@ -55,8 +55,10 @@ namespace RJW_BGS
{
raceGroupDefs = allDefs.Where(delegate (RaceGeneDef group)
{
- String raceGroupDefName = group.raceGroup;
- return raceGroupDefName != null && raceGroupDefName == raceGroupDef.defName;
+ string raceGroupDefName = group.raceGroup;
+ List list_raceGroupDefName = group.raceGroups;
+ return (raceGroupDefName != null && raceGroupDefName == raceGroupDef.defName)
+ || (list_raceGroupDefName != null && list_raceGroupDefName.Contains(raceGroupDef.defName));
}).ToList();
}
diff --git a/Source/GeneDefOf.cs b/Source/GeneDefOf.cs
index 6b13cfb..00299e4 100644
--- a/Source/GeneDefOf.cs
+++ b/Source/GeneDefOf.cs
@@ -75,8 +75,9 @@ namespace RJW_Genes
public static readonly GeneDef rjw_genes_orgasm_rush;
public static readonly GeneDef rjw_genes_youth_fountain;
public static readonly GeneDef rjw_genes_sex_age_drain;
+ public static readonly GeneDef rjw_genes_aphrodisiac_pheromones;
-
+ // Others & Non-Genes
public static readonly HediffDef rjw_genes_orgasm_rush_hediff;
}
}
diff --git a/Source/Genes/Special/Gene_Aphrodisiac_Pheromones_.cs b/Source/Genes/Special/Gene_Aphrodisiac_Pheromones_.cs
new file mode 100644
index 0000000..267f625
--- /dev/null
+++ b/Source/Genes/Special/Gene_Aphrodisiac_Pheromones_.cs
@@ -0,0 +1,53 @@
+using HarmonyLib;
+using rjw;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Verse;
+using RimWorld;
+
+namespace RJW_Genes
+{
+ public class Gene_Aphrodisiac_Pheromones : Gene
+ {
+ public override void Tick()
+ {
+ base.Tick();
+ if (this.pawn.IsHashIntervalTick(2500))
+ {
+ foreach (Pawn pawn in this.AffectedPawns(this.pawn.Position, this.pawn.Map))
+ {
+ this.InduceAphrodisiac(pawn);
+ }
+ }
+ }
+
+ private IEnumerable AffectedPawns(IntVec3 pos, Map map)
+ {
+ foreach (Pawn pawn in map.mapPawns.AllPawns)
+ {
+ if (pos.DistanceTo(pawn.Position) < 5)
+ {
+ yield return pawn;
+ }
+ }
+ //IEnumerator enumerator = null;
+ yield break;
+ }
+
+ private void InduceAphrodisiac(Pawn pawn)
+ {
+ Hediff hediff = pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.Aphrodisiac_Pheromone);
+ if (hediff != null)
+ {
+ hediff.Severity = 1f;
+ }
+ else
+ {
+ pawn.health.AddHediff(HediffDefOf.Aphrodisiac_Pheromone);
+ }
+ }
+ }
+}
diff --git a/Source/HediffDefOf.cs b/Source/HediffDefOf.cs
new file mode 100644
index 0000000..9e70ad2
--- /dev/null
+++ b/Source/HediffDefOf.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Verse;
+using RimWorld;
+
+namespace RJW_Genes
+{
+ [DefOf]
+ public static class HediffDefOf
+ {
+ public static readonly HediffDef Aphrodisiac_Pheromone;
+ }
+}
diff --git a/Source/Rjw-Genes.csproj b/Source/Rjw-Genes.csproj
index 48ab4dc..8c92644 100644
--- a/Source/Rjw-Genes.csproj
+++ b/Source/Rjw-Genes.csproj
@@ -116,8 +116,10 @@
+
+