Compare commits

..

No commits in common. "5000d918fedc2841027793974b3bcff8da0b440a" and "3cc62ba8186df10203f93e18e60e36153968f782" have entirely different histories.

16 changed files with 42 additions and 66 deletions

View file

@ -27,6 +27,5 @@
<li>brrainz.harmony</li>
<li>ludeon.rimworld.biotech</li>
<li>rim.job.world</li>
<li>ASMR.RJW.RaceSupport</li>
</loadAfter>
</ModMetaData>

Binary file not shown.

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Defs>
<RJW_BGS.RaceGeneDef Name = "Canine">
<RJW_BGS.RaceGeneDef>
<defName>Canine</defName>
<raceGroup>Canine_Group</raceGroup>
<genes>
@ -10,20 +10,7 @@
<li>0.9</li>
</genechances>
</RJW_BGS.RaceGeneDef>
<!-- You can use parents to have animals get specific genes in addition to the group.
<RJW_BGS.RaceGeneDef ParentName = "Canine">
<defName>Warg</defName>
<raceNames>
<li>Warg</li>
</raceNames>
<genes>
<li>DarkVision</li>
</genes>
<genechances>
<li>0.9</li>
</genechances>
</RJW_BGS.RaceGeneDef>
-->
<RJW_BGS.RaceGeneDef>
<defName>Insect</defName>
<raceGroup>Insect_Group</raceGroup>

Binary file not shown.

View file

@ -9,9 +9,9 @@ using RimWorld;
namespace RJW_BGS
{
[StaticConstructorOnStartup]
internal static class First
internal static class Class1
{
static First()
static Class1()
{
RJWcopy.Racegroupdictbuilder();
//foreach (RaceGroupDef raceGroupDef2 in DefDatabase<RaceGroupDef>.AllDefs)

View file

@ -24,8 +24,7 @@ namespace RJW_BGS
foreach (CodeInstruction instruction in instructions)
{
yield return instruction;
if (instruction.opcode == OpCodes.Call && instruction.operand.ToString() == "Void BabyPostBirth(Verse.Pawn, Verse.Pawn, Verse.Pawn)")
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);
@ -34,7 +33,7 @@ namespace RJW_BGS
yield return new CodeInstruction(OpCodes.Ldloc_1, null);
yield return new CodeInstruction(OpCodes.Call, newgenes);
}
yield return instruction;
}
}
}

View file

@ -57,7 +57,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="First.cs" />
<Compile Include="Class1.cs" />
<Compile Include="Harmony_Init.cs" />
<Compile Include="InheritanceUtility.cs" />
<Compile Include="PatchRJWBestialityPregnancyUtility.cs" />

View file

@ -34,7 +34,6 @@ 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;
@ -72,14 +71,9 @@ namespace RJW_BGS
public static RaceGeneDef GetRaceGenDefInternal(PawnKindDef kindDef)
{
if (kindDef == null)
{
return null;
}
string raceName = kindDef.race.defName;
string pawnKindName = kindDef.defName;
RaceGroupDef raceGroupDef = GetRaceGroupDef(kindDef);
//string raceGroupName = GetRaceGroupDef(kindDef).defName;
string raceGroupName = GetRaceGroupDef(kindDef).defName;
IEnumerable<RaceGeneDef> allDefs = DefDatabase<RaceGeneDef>.AllDefs;
List<RaceGeneDef> list = allDefs.Where(delegate (RaceGeneDef group)
{
@ -91,15 +85,12 @@ namespace RJW_BGS
List<string> raceNames = group.raceNames;
return raceNames != null && raceNames.Contains(raceName);
}).ToList<RaceGeneDef>();
List<RaceGeneDef> list3 = new List<RaceGeneDef>();
if (raceGroupDef != null)
{
list3 = allDefs.Where(delegate (RaceGeneDef group)
List<RaceGeneDef> list3 = allDefs.Where(delegate (RaceGeneDef group)
{
String raceGroupDefName = group.raceGroup;
return raceGroupDefName != null && raceGroupDefName == raceGroupDef.defName;
return raceGroupDefName != null && raceGroupDefName == raceGroupName;
}).ToList<RaceGeneDef>();
}
RaceGeneDef result = null;
//First check if there is a matching pawnkinddef then race, then racegroup
if (list.Any())

View file

@ -1 +1 @@
0b0a8825bf7e783f74047adfd92c6a9898735e8c
bbcef32adb57331bca8d9d64ae20e770e4ed1e71

Binary file not shown.