diff --git a/About/About.xml b/About/About.xml
index d445da6..ebc2259 100644
--- a/About/About.xml
+++ b/About/About.xml
@@ -27,5 +27,6 @@
brrainz.harmony
ludeon.rimworld.biotech
rim.job.world
+ ASMR.RJW.RaceSupport
\ No newline at end of file
diff --git a/Assemblies/RJW_BGS.dll b/Assemblies/RJW_BGS.dll
index 4e04c9b..067896a 100644
Binary files a/Assemblies/RJW_BGS.dll and b/Assemblies/RJW_BGS.dll differ
diff --git a/Defs/RaceGeneDefs/RaceGeneDefs.xml b/Defs/RaceGeneDefs/RaceGeneDefs.xml
index a5bcfba..e137b8c 100644
--- a/Defs/RaceGeneDefs/RaceGeneDefs.xml
+++ b/Defs/RaceGeneDefs/RaceGeneDefs.xml
@@ -1,6 +1,6 @@
-
+
Canine
Canine_Group
@@ -10,7 +10,20 @@
0.9
-
+
Insect
Insect_Group
diff --git a/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/0eb8971d-5fd5-4e3c-bf07-012e3b83c4ae.vsidx b/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/0eb8971d-5fd5-4e3c-bf07-012e3b83c4ae.vsidx
new file mode 100644
index 0000000..f040402
Binary files /dev/null and b/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/0eb8971d-5fd5-4e3c-bf07-012e3b83c4ae.vsidx differ
diff --git a/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/11af8697-03f0-496e-9b1f-69cf88ff3392.vsidx b/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/11af8697-03f0-496e-9b1f-69cf88ff3392.vsidx
new file mode 100644
index 0000000..c9635ff
Binary files /dev/null and b/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/11af8697-03f0-496e-9b1f-69cf88ff3392.vsidx differ
diff --git a/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/675d72eb-b423-43fc-aa52-c64bd84ba82a.vsidx b/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/675d72eb-b423-43fc-aa52-c64bd84ba82a.vsidx
new file mode 100644
index 0000000..46e09e3
Binary files /dev/null and b/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/675d72eb-b423-43fc-aa52-c64bd84ba82a.vsidx differ
diff --git a/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/6df2cac7-ead0-46d6-a3ec-96409da0265f.vsidx b/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/6df2cac7-ead0-46d6-a3ec-96409da0265f.vsidx
deleted file mode 100644
index 315e6e1..0000000
Binary files a/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/6df2cac7-ead0-46d6-a3ec-96409da0265f.vsidx and /dev/null differ
diff --git a/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/b4651e63-d1f2-4e86-b492-ad7feb733d02.vsidx b/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/b4651e63-d1f2-4e86-b492-ad7feb733d02.vsidx
deleted file mode 100644
index a565d78..0000000
Binary files a/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/b4651e63-d1f2-4e86-b492-ad7feb733d02.vsidx and /dev/null differ
diff --git a/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/d79ca6e2-29c0-42a6-b23a-36d6799644bd.vsidx b/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/d79ca6e2-29c0-42a6-b23a-36d6799644bd.vsidx
new file mode 100644
index 0000000..c9a69f5
Binary files /dev/null and b/Source/RJW_BGS/.vs/RJW_BGS/FileContentIndex/d79ca6e2-29c0-42a6-b23a-36d6799644bd.vsidx differ
diff --git a/Source/RJW_BGS/.vs/RJW_BGS/v17/.suo b/Source/RJW_BGS/.vs/RJW_BGS/v17/.suo
index 16460ae..55eb4a0 100644
Binary files a/Source/RJW_BGS/.vs/RJW_BGS/v17/.suo and b/Source/RJW_BGS/.vs/RJW_BGS/v17/.suo differ
diff --git a/Source/RJW_BGS/Class1.cs b/Source/RJW_BGS/First.cs
similarity index 89%
rename from Source/RJW_BGS/Class1.cs
rename to Source/RJW_BGS/First.cs
index 13fca5d..b37f611 100644
--- a/Source/RJW_BGS/Class1.cs
+++ b/Source/RJW_BGS/First.cs
@@ -1,30 +1,30 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using rjw;
-using Verse;
-using RimWorld;
-namespace RJW_BGS
-{
- [StaticConstructorOnStartup]
- internal static class Class1
- {
- static Class1()
- {
- RJWcopy.Racegroupdictbuilder();
- //foreach (RaceGroupDef raceGroupDef2 in DefDatabase.AllDefs)
- //{
- //Log.Message("defName = " + raceGroupDef2.defName);
- // if (raceGroupDef2.raceNames != null)
- // {
- // foreach (string race in raceGroupDef2.raceNames)
- // {
- //Log.Message(race);
- // }
- // }
- //}
- }
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using rjw;
+using Verse;
+using RimWorld;
+namespace RJW_BGS
+{
+ [StaticConstructorOnStartup]
+ internal static class First
+ {
+ static First()
+ {
+ RJWcopy.Racegroupdictbuilder();
+ //foreach (RaceGroupDef raceGroupDef2 in DefDatabase.AllDefs)
+ //{
+ //Log.Message("defName = " + raceGroupDef2.defName);
+ // if (raceGroupDef2.raceNames != null)
+ // {
+ // foreach (string race in raceGroupDef2.raceNames)
+ // {
+ //Log.Message(race);
+ // }
+ // }
+ //}
+ }
+ }
+}
diff --git a/Source/RJW_BGS/PatchRJWHediffInsect_Egg.cs b/Source/RJW_BGS/PatchRJWHediffInsect_Egg.cs
index 44e720c..d52f62d 100644
--- a/Source/RJW_BGS/PatchRJWHediffInsect_Egg.cs
+++ b/Source/RJW_BGS/PatchRJWHediffInsect_Egg.cs
@@ -24,7 +24,8 @@ namespace RJW_BGS
foreach (CodeInstruction instruction in instructions)
{
- if(instruction.opcode == OpCodes.Call && instruction.operand.ToString() == "Void BabyPostBirth(Verse.Pawn, Verse.Pawn, Verse.Pawn)")
+ yield return instruction;
+ if (instruction.opcode == OpCodes.Call && instruction.operand.ToString() == "Void BabyPostBirth(Verse.Pawn, Verse.Pawn, Verse.Pawn)")
{
yield return new CodeInstruction(OpCodes.Ldloc_0, null);
yield return new CodeInstruction(OpCodes.Ldfld, implanter);
@@ -33,7 +34,7 @@ namespace RJW_BGS
yield return new CodeInstruction(OpCodes.Ldloc_1, null);
yield return new CodeInstruction(OpCodes.Call, newgenes);
}
- yield return instruction;
+
}
}
}
diff --git a/Source/RJW_BGS/RJW_BGS.csproj b/Source/RJW_BGS/RJW_BGS.csproj
index decd98f..b6aa22a 100644
--- a/Source/RJW_BGS/RJW_BGS.csproj
+++ b/Source/RJW_BGS/RJW_BGS.csproj
@@ -57,7 +57,7 @@
-
+
diff --git a/Source/RJW_BGS/RJWcopies.cs b/Source/RJW_BGS/RJWcopies.cs
index c09f95a..1ee2e93 100644
--- a/Source/RJW_BGS/RJWcopies.cs
+++ b/Source/RJW_BGS/RJWcopies.cs
@@ -34,6 +34,7 @@ namespace RJW_BGS
return raceGroupDef != null;
}
+ //slightly modified code so it also works racegroupdefs
public static RaceGroupDef GetRaceGroupDefInternal(PawnKindDef kindDef)
{
string raceName = kindDef.race.defName;
@@ -71,9 +72,14 @@ namespace RJW_BGS
public static RaceGeneDef GetRaceGenDefInternal(PawnKindDef kindDef)
{
+ if (kindDef == null)
+ {
+ return null;
+ }
string raceName = kindDef.race.defName;
string pawnKindName = kindDef.defName;
- string raceGroupName = GetRaceGroupDef(kindDef).defName;
+ RaceGroupDef raceGroupDef = GetRaceGroupDef(kindDef);
+ //string raceGroupName = GetRaceGroupDef(kindDef).defName;
IEnumerable allDefs = DefDatabase.AllDefs;
List list = allDefs.Where(delegate (RaceGeneDef group)
{
@@ -85,12 +91,15 @@ namespace RJW_BGS
List raceNames = group.raceNames;
return raceNames != null && raceNames.Contains(raceName);
}).ToList();
- List list3 = allDefs.Where(delegate (RaceGeneDef group)
+ List list3 = new List();
+ if (raceGroupDef != null)
{
- String raceGroupDefName = group.raceGroup;
- return raceGroupDefName != null && raceGroupDefName == raceGroupName;
- }).ToList();
-
+ list3 = allDefs.Where(delegate (RaceGeneDef group)
+ {
+ String raceGroupDefName = group.raceGroup;
+ return raceGroupDefName != null && raceGroupDefName == raceGroupDef.defName;
+ }).ToList();
+ }
RaceGeneDef result = null;
//First check if there is a matching pawnkinddef then race, then racegroup
if (list.Any())
diff --git a/Source/RJW_BGS/obj/Debug/RJW_BGS.csproj.CoreCompileInputs.cache b/Source/RJW_BGS/obj/Debug/RJW_BGS.csproj.CoreCompileInputs.cache
index e40b314..e68fa6d 100644
--- a/Source/RJW_BGS/obj/Debug/RJW_BGS.csproj.CoreCompileInputs.cache
+++ b/Source/RJW_BGS/obj/Debug/RJW_BGS.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-bbcef32adb57331bca8d9d64ae20e770e4ed1e71
+0b0a8825bf7e783f74047adfd92c6a9898735e8c
diff --git a/Source/RJW_BGS/obj/Debug/RJW_BGS.dll b/Source/RJW_BGS/obj/Debug/RJW_BGS.dll
index 4e04c9b..067896a 100644
Binary files a/Source/RJW_BGS/obj/Debug/RJW_BGS.dll and b/Source/RJW_BGS/obj/Debug/RJW_BGS.dll differ