diff --git a/Assemblies/RJW_BGS.dll b/Assemblies/RJW_BGS.dll index 6a03c3a..8096096 100644 Binary files a/Assemblies/RJW_BGS.dll and b/Assemblies/RJW_BGS.dll differ diff --git a/Defs/RaceGeneDefs/RaceGeneDefs _template.xml b/Defs/RaceGeneDefs/RaceGeneDefs _template.xml index d80ce97..5402ef1 100644 --- a/Defs/RaceGeneDefs/RaceGeneDefs _template.xml +++ b/Defs/RaceGeneDefs/RaceGeneDefs _template.xml @@ -6,7 +6,7 @@ defName can be anything you want, as long as it is unique Canine_Group - RJW.Racegroupdef, all animals in the raceGroup will be part of this group + RJW.Racegroupdef, all animals in the raceGroup will be part of this group, RJW race support uses this so those can be used to quickly add a group
  • @@ -27,9 +27,9 @@ The genes which may be inherited. - -
  • 90
  • -
    + +
  • 0.9
  • +
    WIP, the chance of each gene to be inherited. Is in same order as genes, so for the second gene the chance to inherit is based on the second line in geweights. diff --git a/Defs/RaceGeneDefs/RaceGeneDefs.xml b/Defs/RaceGeneDefs/RaceGeneDefs.xml index 7802539..a5bcfba 100644 --- a/Defs/RaceGeneDefs/RaceGeneDefs.xml +++ b/Defs/RaceGeneDefs/RaceGeneDefs.xml @@ -6,9 +6,9 @@
  • Ears_Floppy
  • - -
  • 90
  • -
    + +
  • 0.9
  • +
    @@ -17,9 +17,9 @@
  • Beauty_Ugly
  • - -
  • 50
  • -
    + +
  • 0.5
  • +
    @@ -30,11 +30,11 @@
  • Sleepy
  • DarkVision
  • - -
  • 90
  • -
  • 25
  • -
  • 25
  • -
    + +
  • 0.9
  • +
  • 0.25
  • +
  • 0.25
  • +
    @@ -55,10 +55,10 @@
  • Unstoppable
  • Headbone_CenterHorn
  • - -
  • 25
  • -
  • 90
  • -
    + +
  • 0.25
  • +
  • 0.9
  • +
    @@ -67,9 +67,9 @@
  • Fertile
  • - -
  • 10
  • -
    + +
  • 0.25
  • +
    @@ -78,9 +78,9 @@
  • StrongStomach
  • - -
  • 50
  • -
    + +
  • 0.5
  • +
    \ No newline at end of file diff --git a/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/b230f00c-1c33-474c-8be3-4085e7d89104.vsidx b/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/b230f00c-1c33-474c-8be3-4085e7d89104.vsidx new file mode 100644 index 0000000..724f81a Binary files /dev/null and b/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/b230f00c-1c33-474c-8be3-4085e7d89104.vsidx differ diff --git a/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/read.lock b/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/Source/RJW_BGS/.vs/RJW_BGS/v17/.suo b/Source/RJW_BGS/.vs/RJW_BGS/v17/.suo new file mode 100644 index 0000000..6c57332 Binary files /dev/null and b/Source/RJW_BGS/.vs/RJW_BGS/v17/.suo differ diff --git a/Source/RJW_BGS/InheritanceUtility.cs b/Source/RJW_BGS/InheritanceUtility.cs index 20724fa..1634881 100644 --- a/Source/RJW_BGS/InheritanceUtility.cs +++ b/Source/RJW_BGS/InheritanceUtility.cs @@ -60,5 +60,30 @@ namespace RJW_BGS } return genelist; } + + public static List SelectGenes(Pawn pawn) + { + List genelist = new List(); + PawnKindDef pawnKindDef = pawn.kindDef; + RaceGeneDef raceGeneDef = RJWcopy.GetRaceGenDefInternal(pawnKindDef); + if (raceGeneDef != null) + { + int num1 = raceGeneDef.genes.Count; + int num2 = raceGeneDef.genechances.Count; + if (num1 != num2) + { + Log.Error("The amount of genes and genechanches are different in " + raceGeneDef.defName + ". Can't select genes to inherit"); + return genelist; + } + for (int i = 0; i Rand.Range(0.01f, 1f)) + { + genelist.Add(DefDatabase.GetNamed(raceGeneDef.genes[i])); + } + } + } + return genelist; + } } } diff --git a/Source/RJW_BGS/RJW_BGS.csproj b/Source/RJW_BGS/RJW_BGS.csproj index b1eb624..6ea6495 100644 --- a/Source/RJW_BGS/RJW_BGS.csproj +++ b/Source/RJW_BGS/RJW_BGS.csproj @@ -32,15 +32,15 @@ - ..\..\..\..\..\..\workshop\content\294100\2009463077\Current\Assemblies\0Harmony.dll + ..\..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\workshop\content\294100\2009463077\Current\Assemblies\0Harmony.dll False - ..\..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll + ..\..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll False - ..\..\..\RJW\1.4\Assemblies\RJW.dll + ..\..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\RJW\1.4\Assemblies\RJW.dll False @@ -52,7 +52,7 @@ - ..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.dll + ..\..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.dll False diff --git a/Source/RJW_BGS/RaceGeneDef.cs b/Source/RJW_BGS/RaceGeneDef.cs index 9e9b01e..bab9997 100644 --- a/Source/RJW_BGS/RaceGeneDef.cs +++ b/Source/RJW_BGS/RaceGeneDef.cs @@ -14,7 +14,7 @@ namespace RJW_BGS public List raceNames; public List pawnKindNames; public List genes; - public List geneweights; + public List genechances; public String hybridName; } } diff --git a/Source/RJW_BGS/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/Source/RJW_BGS/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/Source/RJW_BGS/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/Source/RJW_BGS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Source/RJW_BGS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 91c9a9d..b199a39 100644 Binary files a/Source/RJW_BGS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/Source/RJW_BGS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Source/RJW_BGS/obj/Debug/RJW_BGS.csproj.AssemblyReference.cache b/Source/RJW_BGS/obj/Debug/RJW_BGS.csproj.AssemblyReference.cache index b25e0d3..a54b8a5 100644 Binary files a/Source/RJW_BGS/obj/Debug/RJW_BGS.csproj.AssemblyReference.cache and b/Source/RJW_BGS/obj/Debug/RJW_BGS.csproj.AssemblyReference.cache differ diff --git a/Source/RJW_BGS/obj/Debug/RJW_BGS.csproj.FileListAbsolute.txt b/Source/RJW_BGS/obj/Debug/RJW_BGS.csproj.FileListAbsolute.txt index 01ed640..3f8c844 100644 --- a/Source/RJW_BGS/obj/Debug/RJW_BGS.csproj.FileListAbsolute.txt +++ b/Source/RJW_BGS/obj/Debug/RJW_BGS.csproj.FileListAbsolute.txt @@ -2,3 +2,7 @@ C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\RJW_Bestiality_Gene_ C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\RJW_Bestiality_Gene_Support\Source\RJW_BGS\obj\Debug\RJW_BGS.csproj.AssemblyReference.cache C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\RJW_Bestiality_Gene_Support\Source\RJW_BGS\obj\Debug\RJW_BGS.csproj.CoreCompileInputs.cache C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\RJW_Bestiality_Gene_Support\Source\RJW_BGS\obj\Debug\RJW_BGS.dll +C:\Users\tyrob\OneDrive\Documenten\GitHub\RJW_Animal_Gene_Inheritance\Assemblies\RJW_BGS.dll +C:\Users\tyrob\OneDrive\Documenten\GitHub\RJW_Animal_Gene_Inheritance\Source\RJW_BGS\obj\Debug\RJW_BGS.csproj.AssemblyReference.cache +C:\Users\tyrob\OneDrive\Documenten\GitHub\RJW_Animal_Gene_Inheritance\Source\RJW_BGS\obj\Debug\RJW_BGS.csproj.CoreCompileInputs.cache +C:\Users\tyrob\OneDrive\Documenten\GitHub\RJW_Animal_Gene_Inheritance\Source\RJW_BGS\obj\Debug\RJW_BGS.dll diff --git a/Source/RJW_BGS/obj/Debug/RJW_BGS.dll b/Source/RJW_BGS/obj/Debug/RJW_BGS.dll index 6a03c3a..8096096 100644 Binary files a/Source/RJW_BGS/obj/Debug/RJW_BGS.dll and b/Source/RJW_BGS/obj/Debug/RJW_BGS.dll differ