diff --git a/Common/Defs/GeneDefs/GeneDefs_SpecifiedGender.xml b/Common/Defs/GeneDefs/GeneDefs_SpecifiedGender.xml
index 12ba760..82a302c 100644
--- a/Common/Defs/GeneDefs/GeneDefs_SpecifiedGender.xml
+++ b/Common/Defs/GeneDefs/GeneDefs_SpecifiedGender.xml
@@ -65,10 +65,10 @@
Genes/Icons/RJW_Genes_Endogene_Background
Genes/Icons/RJW_Genes_Xenogene_Background
-
+
- 120000
- 0.25
+ 120000
+ 0.25
diff --git a/Source/Common/Defs/TickBasedChanceExtension.cs b/Source/Common/Defs/TickBasedChanceExtension.cs
new file mode 100644
index 0000000..1a8feca
--- /dev/null
+++ b/Source/Common/Defs/TickBasedChanceExtension.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Verse;
+
+namespace RJW_Genes
+{
+ public class TickBasedChanceExtension : TickIntervalExtension
+ {
+ ///
+ /// Set to 1 for "always", set to 0 for "never".
+ /// Everything else is a bit statistics, but e.g. when set to .5 the chances grow per day from [50%, 75%, 82.25%, ...]
+ ///
+ public float eventChance;
+ }
+}
diff --git a/Source/Genes/Gender/Defs/GenderFluidExtension.cs b/Source/Genes/Gender/Defs/GenderFluidExtension.cs
deleted file mode 100644
index 332015f..0000000
--- a/Source/Genes/Gender/Defs/GenderFluidExtension.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using Verse;
-
-namespace RJW_Genes
-{
- public class GenderFluidExtension : DefModExtension
- {
- ///
- /// Number of ticks until the change can be triggered.
- /// Just being "triggered" does not mean changing, see the changeChance below.
- ///
- public int changeInterval;
-
- ///
- /// How high is the chance to change gender?
- /// Set to 1 for "always", set to 0 for "never".
- /// Everything else is a bit statistics, but e.g. when set to .5 the chances grow per day from [50%, 75%, 82.25%, ...]
- ///
- public float changeChance;
- }
-}
\ No newline at end of file
diff --git a/Source/Genes/Gender/Gene_FemaleOnly.cs b/Source/Genes/Gender/Genes/Gene_FemaleOnly.cs
similarity index 100%
rename from Source/Genes/Gender/Gene_FemaleOnly.cs
rename to Source/Genes/Gender/Genes/Gene_FemaleOnly.cs
diff --git a/Source/Genes/Gender/Gene_GenderFluid.cs b/Source/Genes/Gender/Genes/Gene_GenderFluid.cs
similarity index 96%
rename from Source/Genes/Gender/Gene_GenderFluid.cs
rename to Source/Genes/Gender/Genes/Gene_GenderFluid.cs
index bdd5c00..fe75f5d 100644
--- a/Source/Genes/Gender/Gene_GenderFluid.cs
+++ b/Source/Genes/Gender/Genes/Gene_GenderFluid.cs
@@ -39,9 +39,9 @@ namespace RJW_Genes
private bool sexChangeWasBlocked = false;
public Gene_GenderFluid() : base() {
- GenderFluidExtension genderFluidExt = GeneDefOf.rjw_genes_gender_fluid.GetModExtension();
- change_interval = genderFluidExt?.changeInterval ?? CHANGE_INTERVAL_FALLBACK;
- switch_chance = genderFluidExt?.changeChance ?? SWITCH_CHANCE_FALLBACK;
+ TickBasedChanceExtension tickbasedChanceExt = GeneDefOf.rjw_genes_gender_fluid.GetModExtension();
+ change_interval = tickbasedChanceExt?.tickInterval ?? CHANGE_INTERVAL_FALLBACK;
+ switch_chance = tickbasedChanceExt?.eventChance ?? SWITCH_CHANCE_FALLBACK;
}
public override void Tick()
diff --git a/Source/Genes/Gender/Gene_MaleOnly.cs b/Source/Genes/Gender/Genes/Gene_MaleOnly.cs
similarity index 100%
rename from Source/Genes/Gender/Gene_MaleOnly.cs
rename to Source/Genes/Gender/Genes/Gene_MaleOnly.cs
diff --git a/Source/Rjw-Genes.csproj b/Source/Rjw-Genes.csproj
index cf56f5b..aa991a2 100644
--- a/Source/Rjw-Genes.csproj
+++ b/Source/Rjw-Genes.csproj
@@ -58,6 +58,7 @@
+
@@ -88,8 +89,7 @@
-
-
+
@@ -109,8 +109,8 @@
-
-
+
+
@@ -241,7 +241,6 @@
-