mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Compare commits
8 commits
cc43a5a5aa
...
28740437e5
Author | SHA1 | Date | |
---|---|---|---|
|
28740437e5 | ||
|
22d5f528d6 | ||
|
68be7aed6f | ||
|
8da452ad3c | ||
|
2847dc2b48 | ||
|
7bf8efb00d | ||
|
7e7e7e5e17 | ||
|
8a7138106a |
11 changed files with 108 additions and 31 deletions
Binary file not shown.
|
@ -18,6 +18,9 @@
|
||||||
</pawnKindNames>
|
</pawnKindNames>
|
||||||
For even more direct control you can use pawnKindNames.
|
For even more direct control you can use pawnKindNames.
|
||||||
|
|
||||||
|
<priority>0</priority>
|
||||||
|
You can use priority incase you have multiple racegenedefs with the same animal under the same list (racegroup, racenames or pawnKindNames). If not assigned the value is 0. Higher priority is chosen.
|
||||||
|
|
||||||
The RaceGeneDef for an animal will first be decided by if it is in the pawnkindNames, after that racenames and lastly racegroup,
|
The RaceGeneDef for an animal will first be decided by if it is in the pawnkindNames, after that racenames and lastly racegroup,
|
||||||
so if there is for a wolf a RaceGeneDef with the canine group and a second which has wolf under raceNames it will always use the second one to determine
|
so if there is for a wolf a RaceGeneDef with the canine group and a second which has wolf under raceNames it will always use the second one to determine
|
||||||
which genes can be inherited
|
which genes can be inherited
|
||||||
|
|
14
Common/Patches/Xenotypes/PatchBiotechNyaron.xml
Normal file
14
Common/Patches/Xenotypes/PatchBiotechNyaron.xml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<Patch>
|
||||||
|
<Operation Class="PatchOperationFindMod">
|
||||||
|
<mods>
|
||||||
|
<li>Biotech Nyaron</li>
|
||||||
|
</mods>
|
||||||
|
<match Class="PatchOperationAdd">
|
||||||
|
<xpath>Defs/XenotypeDef[defName="Nyaron"]/genes</xpath>
|
||||||
|
<value>
|
||||||
|
<li>rjw_genes_feline_genitalia</li>
|
||||||
|
</value>
|
||||||
|
</match>
|
||||||
|
</Operation>
|
||||||
|
</Patch>
|
15
Common/Patches/Xenotypes/PatchNarai.xml
Normal file
15
Common/Patches/Xenotypes/PatchNarai.xml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<Patch>
|
||||||
|
<Operation Class="PatchOperationFindMod">
|
||||||
|
<mods>
|
||||||
|
<li>NaraiXenotype</li>
|
||||||
|
</mods>
|
||||||
|
<match Class="PatchOperationAdd">
|
||||||
|
<xpath>Defs/XenotypeDef[defName="Narai"]/genes</xpath>
|
||||||
|
<value>
|
||||||
|
<li>rjw_genes_canine_genitalia</li>
|
||||||
|
<li>rjw_genes_zoophile</li>
|
||||||
|
</value>
|
||||||
|
</match>
|
||||||
|
</Operation>
|
||||||
|
</Patch>
|
17
Common/Patches/Xenotypes/PatchPapou.xml
Normal file
17
Common/Patches/Xenotypes/PatchPapou.xml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<Patch>
|
||||||
|
<Operation Class="PatchOperationFindMod">
|
||||||
|
<mods>
|
||||||
|
<li>Papou Race : emotional birds</li>
|
||||||
|
</mods>
|
||||||
|
<match Class="PatchOperationAdd">
|
||||||
|
<xpath>Defs/XenotypeDef[defName="papago"]/genes</xpath>
|
||||||
|
<value>
|
||||||
|
<li>rjw_genes_orgasm_rush</li>
|
||||||
|
<li>rjw_genes_damage</li>
|
||||||
|
<li>rjw_genes_tight_female_genitalia</li>
|
||||||
|
<li>rjw_genes_tight_anus</li>
|
||||||
|
</value>
|
||||||
|
</match>
|
||||||
|
</Operation>
|
||||||
|
</Patch>
|
14
Common/Patches/Xenotypes/PatchSaurid.xml
Normal file
14
Common/Patches/Xenotypes/PatchSaurid.xml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<Patch>
|
||||||
|
<Operation Class="PatchOperationFindMod">
|
||||||
|
<mods>
|
||||||
|
<li>Vanilla Races Expanded - Saurid</li>
|
||||||
|
</mods>
|
||||||
|
<match Class="PatchOperationAdd">
|
||||||
|
<xpath>Defs/XenotypeDef[defName="VRESaurids_Saurid"]/genes</xpath>
|
||||||
|
<value>
|
||||||
|
<li>rjw_genes_dragon_genitalia</li>
|
||||||
|
</value>
|
||||||
|
</match>
|
||||||
|
</Operation>
|
||||||
|
</Patch>
|
|
@ -48,7 +48,7 @@ RimWorld.GeneMaker:MakeGene (Verse.GeneDef,Verse.Pawn)
|
||||||
|
|
||||||
Reason:
|
Reason:
|
||||||
|
|
||||||
RJW covers some corner cases when the pawn is changed before creation.
|
RJW covers some corner cases when the pawn is changed before creation. This seems a bit legacy and related to Royalty-Content.
|
||||||
|
|
||||||
Current Solution:
|
Current Solution:
|
||||||
|
|
||||||
|
@ -56,10 +56,25 @@ Ignore this. The pawns seem to have the right sex and genitalia, I cannot "catch
|
||||||
|
|
||||||
Aimed Solution:
|
Aimed Solution:
|
||||||
|
|
||||||
Patch ChangeSex to skip for pawns with the two genes producing this.
|
Patch RJW ChangeSex upstream to skip for pawns with the two genes producing this.
|
||||||
|
|
||||||
|
## Error on Game Load: Verse.GeneDef named rjw_genes_human_genitalia (wanter=genes)
|
||||||
|
|
||||||
|
Error: Issue #4, Game throws a warning on load that some Genes were not found.
|
||||||
|
|
||||||
|
Reason: (Likely) because I removed some genes from Pre-Release to 1.0.0. Now some players have unknown definitions in their safe-files and Xenotype Defs.
|
||||||
|
The removed Genes were the ones that performed default behaviour (e.g. normal breast size, normal penis size, ...)
|
||||||
|
|
||||||
|
Solution: Should be safe to ignore, when you get this on safe-load make a quick new safe. new safe should not throw the error. For Self-Made Xenotypes remove the Genes.
|
||||||
|
|
||||||
|
Sorry about this one, I know removal can break things but hey you were playing with the Prerelease!
|
||||||
|
|
||||||
## Insect Breeder does not fertilize
|
## Insect Breeder does not fertilize
|
||||||
|
|
||||||
|
Update:
|
||||||
|
|
||||||
|
We changed behaviour in [1.0.1](https://github.com/vegapnk/RJW-Genes/releases/tag/1.0.1) and it seems to work now. Please tell us if you still encounter this.
|
||||||
|
|
||||||
Error:
|
Error:
|
||||||
|
|
||||||
A pawn with insect breeder fucks a pawn with unfertilized insect eggs, but the eggs stay unfertilized.
|
A pawn with insect breeder fucks a pawn with unfertilized insect eggs, but the eggs stay unfertilized.
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace RJW_BGS
|
||||||
public static List<GeneDef> SelectGenes(Pawn pawn)
|
public static List<GeneDef> SelectGenes(Pawn pawn)
|
||||||
{
|
{
|
||||||
List<GeneDef> genelist = new List<GeneDef>();
|
List<GeneDef> genelist = new List<GeneDef>();
|
||||||
RaceGeneDef raceGeneDef = RJWcopy.GetRaceGeneDefInternal(pawn);
|
RaceGeneDef raceGeneDef = RaceGeneDef_Helper.GetRaceGeneDefInternal(pawn);
|
||||||
if (raceGeneDef != null)
|
if (raceGeneDef != null)
|
||||||
{
|
{
|
||||||
foreach (BestialityGeneInheritanceDef gene in raceGeneDef.genes)
|
foreach (BestialityGeneInheritanceDef gene in raceGeneDef.genes)
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace RJW_BGS
|
||||||
{
|
{
|
||||||
public class RaceGeneDef : Def
|
public class RaceGeneDef : Def
|
||||||
{
|
{
|
||||||
|
public int priority;
|
||||||
public String raceGroup;
|
public String raceGroup;
|
||||||
public List<string> raceNames;
|
public List<string> raceNames;
|
||||||
public List<string> pawnKindNames;
|
public List<string> pawnKindNames;
|
||||||
|
|
|
@ -9,31 +9,48 @@ using RimWorld;
|
||||||
|
|
||||||
namespace RJW_BGS
|
namespace RJW_BGS
|
||||||
{
|
{
|
||||||
internal class RJWcopy
|
public class RaceGeneDef_Helper
|
||||||
{
|
{
|
||||||
//code based on racegroupdefinternal which has a similar function
|
//code based on racegroupdefinternal which has a similar function
|
||||||
public static RaceGeneDef GetRaceGeneDefInternal(Pawn pawn)
|
public static RaceGeneDef GetRaceGeneDefInternal(Pawn pawn)
|
||||||
{
|
{
|
||||||
|
List<RaceGeneDef> Valids = ValidRaceGeneDefs(pawn);
|
||||||
|
if (Valids.Count > 0)
|
||||||
|
{
|
||||||
|
RaceGeneDef result = Valids.MaxBy(r => r.priority);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
//First check if there is a matching pawnkinddef then race, then racegroup
|
||||||
|
|
||||||
|
}
|
||||||
|
public static List<RaceGeneDef> ValidRaceGeneDefs(Pawn pawn)
|
||||||
|
{
|
||||||
PawnKindDef kindDef = pawn.kindDef;
|
PawnKindDef kindDef = pawn.kindDef;
|
||||||
if (kindDef == null)
|
if (kindDef == null)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
string raceName = kindDef.race.defName;
|
string raceName = kindDef.race.defName;
|
||||||
string pawnKindName = kindDef.defName;
|
string pawnKindName = kindDef.defName;
|
||||||
IEnumerable<RaceGeneDef> allDefs = DefDatabase<RaceGeneDef>.AllDefs;
|
|
||||||
PawnData pawnData = SaveStorage.DataStore.GetPawnData(pawn);
|
PawnData pawnData = SaveStorage.DataStore.GetPawnData(pawn);
|
||||||
RaceGroupDef raceGroupDef = pawnData.RaceSupportDef;
|
RaceGroupDef raceGroupDef = pawnData.RaceSupportDef;
|
||||||
|
|
||||||
|
IEnumerable<RaceGeneDef> allDefs = DefDatabase<RaceGeneDef>.AllDefs;
|
||||||
List<RaceGeneDef> pawnKindDefs = allDefs.Where(delegate (RaceGeneDef group)
|
List<RaceGeneDef> pawnKindDefs = allDefs.Where(delegate (RaceGeneDef group)
|
||||||
{
|
{
|
||||||
List<string> pawnKindNames = group.pawnKindNames;
|
List<string> pawnKindNames = group.pawnKindNames;
|
||||||
return pawnKindNames != null && pawnKindNames.Contains(pawnKindName);
|
return pawnKindNames != null && pawnKindNames.Contains(pawnKindName);
|
||||||
}).ToList<RaceGeneDef>();
|
}).ToList<RaceGeneDef>();
|
||||||
|
if (pawnKindDefs.Count() > 0)
|
||||||
|
return pawnKindDefs;
|
||||||
List<RaceGeneDef> raceKindDefs = allDefs.Where(delegate (RaceGeneDef group)
|
List<RaceGeneDef> raceKindDefs = allDefs.Where(delegate (RaceGeneDef group)
|
||||||
{
|
{
|
||||||
List<string> raceNames = group.raceNames;
|
List<string> raceNames = group.raceNames;
|
||||||
return raceNames != null && raceNames.Contains(raceName);
|
return raceNames != null && raceNames.Contains(raceName);
|
||||||
}).ToList<RaceGeneDef>();
|
}).ToList<RaceGeneDef>();
|
||||||
|
if (raceKindDefs.Count() > 0)
|
||||||
|
return raceKindDefs;
|
||||||
List<RaceGeneDef> raceGroupDefs = new List<RaceGeneDef>();
|
List<RaceGeneDef> raceGroupDefs = new List<RaceGeneDef>();
|
||||||
if (raceGroupDef != null)
|
if (raceGroupDef != null)
|
||||||
{
|
{
|
||||||
|
@ -43,27 +60,9 @@ namespace RJW_BGS
|
||||||
return raceGroupDefName != null && raceGroupDefName == raceGroupDef.defName;
|
return raceGroupDefName != null && raceGroupDefName == raceGroupDef.defName;
|
||||||
}).ToList<RaceGeneDef>();
|
}).ToList<RaceGeneDef>();
|
||||||
}
|
}
|
||||||
RaceGeneDef result = null;
|
if (raceGroupDefs.Count() > 0)
|
||||||
//First check if there is a matching pawnkinddef then race, then racegroup
|
return raceGroupDefs;
|
||||||
if (pawnKindDefs.Any())
|
return new List<RaceGeneDef>();
|
||||||
{
|
|
||||||
result = pawnKindDefs.RandomElement();
|
|
||||||
}
|
|
||||||
else if (raceKindDefs.Any() && result == null)
|
|
||||||
{
|
|
||||||
result = raceKindDefs.RandomElement();
|
|
||||||
}
|
|
||||||
else if (raceGroupDefs.Any() && result == null)
|
|
||||||
{
|
|
||||||
result = raceGroupDefs.RandomElement();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = null;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ namespace RJW_Genes
|
||||||
public static void AdjustAllBreastSizes(Pawn pawn, float lowerLimit = 0.0f, float upperLimit = 1.0f)
|
public static void AdjustAllBreastSizes(Pawn pawn, float lowerLimit = 0.0f, float upperLimit = 1.0f)
|
||||||
{
|
{
|
||||||
|
|
||||||
List<Hediff> AllBreasts = Genital_Helper.get_AllPartsHediffList(pawn).FindAll(x => x.def.defName.Contains("breasts"));
|
List<Hediff> AllBreasts = Genital_Helper.get_AllPartsHediffList(pawn).FindAll(x => x.def.defName.ToLower().Contains("breasts"));
|
||||||
ResizeAll(AllBreasts,lowerLimit,upperLimit);
|
ResizeAll(AllBreasts,lowerLimit,upperLimit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue