mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Compare commits
No commits in common. "df513f8c0995413447cfb1152a9a10e1373ed002" and "8605a09941c75cb96a9fef7fc2249885092929cb" have entirely different histories.
df513f8c09
...
8605a09941
12 changed files with 41 additions and 191 deletions
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -1,18 +1,15 @@
|
||||||
# 1.2
|
# 1.2
|
||||||
|
|
||||||
**Changes:**
|
Changes:
|
||||||
|
|
||||||
- Cocoon Weaver Gene
|
- Cocoon Weaver Gene
|
||||||
- Spawn Spelopede Gene (Can be changed to spawn Megascarabs or other insects via xml)
|
- Spawn Spelopede Gene (Can re changed to spawn Megascarabs or other insects)
|
||||||
- Queens & Caste Logic (see below)
|
|
||||||
- Addition to InsectIncubator: Now fertilizes eggs once placed inside a host, and breeds out eggs twice as fast.
|
|
||||||
|
|
||||||
**Internal:**
|
Internal:
|
||||||
|
|
||||||
- Renamed Abilities to have _ability_ in their name, to not exactly match the gene-defnames.
|
- Renamed Abilities to have _ability_ in their name, to not exactly match the gene-defnames.
|
||||||
- Moved Insect-Incubator & Insect-Breeder to Hive Category and Folders
|
|
||||||
|
|
||||||
**Fixes:**
|
Fixes:
|
||||||
|
|
||||||
- Cockeater Ability has now Icon of Cockeater Gene
|
- Cockeater Ability has now Icon of Cockeater Gene
|
||||||
- Cockeater now leaves a bite wound!
|
- Cockeater now leaves a bite wound!
|
||||||
|
@ -30,12 +27,11 @@ In general, the logic is the following:
|
||||||
- The assignemnt is done by xenotypes for queen and drones. The baby will get all xenogenes of their parents xenotypes.
|
- The assignemnt is done by xenotypes for queen and drones. The baby will get all xenogenes of their parents xenotypes.
|
||||||
- For workers, every queen can have a set of genes for their workers defined in [a special def](./Common/Defs/QueenWorkerMappingDefs/QueenWorkerMappingDefs_base.xml). These will be added as endogenes, so that pawns can still become xenotypes.
|
- For workers, every queen can have a set of genes for their workers defined in [a special def](./Common/Defs/QueenWorkerMappingDefs/QueenWorkerMappingDefs_base.xml). These will be added as endogenes, so that pawns can still become xenotypes.
|
||||||
- There is a default set for worker genes, making mentally dumb, sterile and servile pawns.
|
- There is a default set for worker genes, making mentally dumb, sterile and servile pawns.
|
||||||
- Chances for Offsprings (Drone, Queen, Worker) is defined in an [XML-Def](./Common/Defs/HiveOffspringChanceDef/HiveOffspringChanceDefs.xml)
|
|
||||||
|
|
||||||
I am not sure if I want to have a specific mapping defining that Queen can only mate with certain Drones, let me know how you feel about it.
|
I am not sure if I want to have a specific mapping defining that Queen can only mate with certain Drones, let me know how you feel about it.
|
||||||
*Queens can be male*. I just used the female-term, but implementation is gender-neutral.
|
*Queens can be male*. I just used the female-term, but implementation is gender-neutral.
|
||||||
|
|
||||||
**ToDo:**
|
ToDo:
|
||||||
|
|
||||||
- Icons: Cocoon, Spelopede Spawn
|
- Icons: Cocoon, Spelopede Spawn
|
||||||
- Sound: Spelopede Spawn
|
- Sound: Spelopede Spawn
|
||||||
|
|
|
@ -13,6 +13,27 @@
|
||||||
<biostatMet>-1</biostatMet>
|
<biostatMet>-1</biostatMet>
|
||||||
</GeneDef>
|
</GeneDef>
|
||||||
|
|
||||||
|
<GeneDef>
|
||||||
|
<defName>rjw_genes_insectincubator</defName>
|
||||||
|
<label>InsectIncubator</label>
|
||||||
|
<description>Pawns with this gene are able to hold more insect eggs.</description>
|
||||||
|
<iconPath>Genes/Icons/More_Egg_Space</iconPath>
|
||||||
|
<displayOrderInCategory>52</displayOrderInCategory>
|
||||||
|
<displayCategory>rjw_genes_breeding</displayCategory>
|
||||||
|
<biostatCpx>1</biostatCpx>
|
||||||
|
<biostatMet>-1</biostatMet>
|
||||||
|
</GeneDef>
|
||||||
|
|
||||||
|
<GeneDef>
|
||||||
|
<defName>rjw_genes_insectbreeder</defName>
|
||||||
|
<label>InsectBreeder</label>
|
||||||
|
<description>Pawns with this gene are able to fertilize eggs with any fertile penis.</description>
|
||||||
|
<iconPath>World/WorldObjects/Expanding/Insects</iconPath>
|
||||||
|
<displayOrderInCategory>53</displayOrderInCategory>
|
||||||
|
<displayCategory>rjw_genes_breeding</displayCategory>
|
||||||
|
<biostatCpx>1</biostatCpx>
|
||||||
|
<biostatMet>-1</biostatMet>
|
||||||
|
</GeneDef>
|
||||||
|
|
||||||
<GeneDef>
|
<GeneDef>
|
||||||
<defName>rjw_genes_zoophile</defName>
|
<defName>rjw_genes_zoophile</defName>
|
||||||
|
|
|
@ -165,29 +165,4 @@
|
||||||
<biostatCpx>1</biostatCpx>
|
<biostatCpx>1</biostatCpx>
|
||||||
<biostatMet>-1</biostatMet>
|
<biostatMet>-1</biostatMet>
|
||||||
</GeneDef>
|
</GeneDef>
|
||||||
|
|
||||||
|
|
||||||
<GeneDef>
|
|
||||||
<defName>rjw_genes_insectincubator</defName>
|
|
||||||
<label>InsectIncubator</label>
|
|
||||||
<geneClass>RJW_Genes.Gene_InsectIncubator</geneClass>
|
|
||||||
<description>Pawns with this gene are able to host more insect eggs, hatch them faster and fertilize any inserted egg.</description>
|
|
||||||
<iconPath>Genes/Icons/More_Egg_Space</iconPath>
|
|
||||||
<displayOrderInCategory>52</displayOrderInCategory>
|
|
||||||
<displayCategory>rjw_genes_hive</displayCategory>
|
|
||||||
<biostatCpx>1</biostatCpx>
|
|
||||||
<biostatMet>-1</biostatMet>
|
|
||||||
</GeneDef>
|
|
||||||
|
|
||||||
<GeneDef>
|
|
||||||
<defName>rjw_genes_insectbreeder</defName>
|
|
||||||
<label>InsectBreeder</label>
|
|
||||||
<description>Pawns with this gene are able to fertilize eggs with any fertile penis.</description>
|
|
||||||
<iconPath>World/WorldObjects/Expanding/Insects</iconPath>
|
|
||||||
<displayOrderInCategory>53</displayOrderInCategory>
|
|
||||||
<displayCategory>rjw_genes_hive</displayCategory>
|
|
||||||
<biostatCpx>1</biostatCpx>
|
|
||||||
<biostatMet>-1</biostatMet>
|
|
||||||
</GeneDef>
|
|
||||||
|
|
||||||
</Defs>
|
</Defs>
|
|
@ -1,36 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Defs>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
For writing your own:
|
|
||||||
1. specify your queenXenotype with an exactly matching name
|
|
||||||
2. defName is not important
|
|
||||||
3. queen + drone + worker == 1
|
|
||||||
|
|
||||||
Otherwise, it should default to the ones specified for rjw_genes_default_hive_offspring_chances
|
|
||||||
-->
|
|
||||||
|
|
||||||
<RJW_Genes.HiveOffspringChanceDef>
|
|
||||||
<!-- Important: this default defName cannot be renamed! It is a protected keyword.-->
|
|
||||||
<!-- Changing the queenXenotype-Name will also throw an error.-->
|
|
||||||
<!-- But you can change the workerGenes list.-->
|
|
||||||
<defName>rjw_genes_default_hive_offspring_chances</defName>
|
|
||||||
<queenXenotype>default</queenXenotype>
|
|
||||||
|
|
||||||
<queenChance>0.02</queenChance>
|
|
||||||
<droneChance>0.48</droneChance>
|
|
||||||
<workerChance>0.5</workerChance>
|
|
||||||
|
|
||||||
</RJW_Genes.HiveOffspringChanceDef>
|
|
||||||
|
|
||||||
<RJW_Genes.HiveOffspringChanceDef>
|
|
||||||
<defName>rjw_genes_test_queen_offspring_chances</defName>
|
|
||||||
<queenXenotype>rjw_genes_test_queen_xenotype</queenXenotype>
|
|
||||||
|
|
||||||
<queenChance>0.02</queenChance>
|
|
||||||
<droneChance>0.28</droneChance>
|
|
||||||
<workerChance>0.7</workerChance>
|
|
||||||
|
|
||||||
</RJW_Genes.HiveOffspringChanceDef>
|
|
||||||
|
|
||||||
</Defs>
|
|
|
@ -15,11 +15,9 @@ namespace RJW_Genes
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This Class patches the RJW-DoEgg to allow up to MaxEggSizeMul times the original amount of eggs.
|
/// This Class patches the RJW-DoEgg to allow up to MaxEggSizeMul times the original amount of eggs.
|
||||||
/// This harmony patch was kindly provided by 'shabalox' https://github.com/Shabalox/RJW_Genes_Addons/
|
/// This harmony patch was kindly provided by 'shabalox' https://github.com/Shabalox/RJW_Genes_Addons/
|
||||||
///
|
|
||||||
/// For Gene: rjw_genes_insectincubator
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[HarmonyPatch(typeof(PregnancyHelper), "DoEgg")]
|
[HarmonyPatch(typeof(PregnancyHelper), "DoEgg")]
|
||||||
static class Patch_InsectIncubator_PregnancyHelper
|
static class PatchPregnancyHelper
|
||||||
{
|
{
|
||||||
[HarmonyTranspiler]
|
[HarmonyTranspiler]
|
||||||
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator il)
|
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator il)
|
|
@ -12,10 +12,9 @@ namespace RJW_Genes
|
||||||
/// Patched Class is https://gitgud.io/Ed86/rjw/-/blob/master/1.4/Source/Common/Helpers/SexUtility.cs
|
/// Patched Class is https://gitgud.io/Ed86/rjw/-/blob/master/1.4/Source/Common/Helpers/SexUtility.cs
|
||||||
///
|
///
|
||||||
/// Normal Egg-Pregnancy logic is in https://gitgud.io/Ed86/rjw/-/blob/master/1.4/Source/Modules/Pregnancy/Pregnancy_Helper.cs
|
/// Normal Egg-Pregnancy logic is in https://gitgud.io/Ed86/rjw/-/blob/master/1.4/Source/Modules/Pregnancy/Pregnancy_Helper.cs
|
||||||
/// Gene: rjw_genes_insectbreeder
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[HarmonyPatch(typeof(SexUtility), "Aftersex")]
|
[HarmonyPatch(typeof(SexUtility), "Aftersex")]
|
||||||
static class Patch_InsectBreeder_EggFertilization
|
static class Patch_EggFertilization
|
||||||
{
|
{
|
||||||
public static void Postfix(SexProps props)
|
public static void Postfix(SexProps props)
|
||||||
{
|
{
|
|
@ -1,23 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Verse;
|
|
||||||
|
|
||||||
namespace RJW_Genes
|
|
||||||
{
|
|
||||||
public class HiveOffspringChanceDef : Def
|
|
||||||
{
|
|
||||||
|
|
||||||
public string queenXenotype;
|
|
||||||
|
|
||||||
// Chance of the below should be 1 when summed up!
|
|
||||||
// Otherwise the roll-logic fails.
|
|
||||||
|
|
||||||
public double queenChance;
|
|
||||||
public double droneChance;
|
|
||||||
public double workerChance;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,53 +0,0 @@
|
||||||
using RimWorld;
|
|
||||||
using rjw;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Verse;
|
|
||||||
|
|
||||||
namespace RJW_Genes
|
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// This Gene checks for all parasitic Insect-Eggs in a Pawn:
|
|
||||||
/// 1. Is it fertilized ? => tick it down "extra".
|
|
||||||
/// 2. Is it not fertilized? => fertilize it with the Incubator as parent
|
|
||||||
///
|
|
||||||
/// Important: The other half of the behavior for the gene (more egg-capacity) is in `Patch_InsectINcubator_PregnancyHelper`.
|
|
||||||
/// </summary>
|
|
||||||
public class Gene_InsectIncubator : Gene
|
|
||||||
{
|
|
||||||
|
|
||||||
const int TICK_INTERVAL = 60000 / 48; // 60k = 1 day, we want 0.5h which is 1/48th of 1 day.
|
|
||||||
|
|
||||||
public override void Tick()
|
|
||||||
{
|
|
||||||
base.Tick();
|
|
||||||
|
|
||||||
// Don't check too often, only in the HashTickInterval to safe some computing power
|
|
||||||
if (this.pawn.IsHashIntervalTick(TICK_INTERVAL) && this.pawn.Map != null)
|
|
||||||
{
|
|
||||||
List<Hediff_InsectEgg> eggs = new List<Hediff_InsectEgg>();
|
|
||||||
pawn.health.hediffSet.GetHediffs<Hediff_InsectEgg>(ref eggs);
|
|
||||||
|
|
||||||
foreach (Hediff_InsectEgg egg in eggs)
|
|
||||||
{
|
|
||||||
// The implanter check checks if the egg is still in an ovipositor.
|
|
||||||
if (egg.implanter == null || egg.implanter == pawn)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (!egg.fertilized && egg.implanter != null) {
|
|
||||||
egg.Fertilize(pawn);
|
|
||||||
if (RJW_Genes_Settings.rjw_genes_detailed_debug) ModLog.Message($"Gene_InsectIncubator: fertilized egg {egg} in {pawn}");
|
|
||||||
}
|
|
||||||
else if (egg.fertilized)
|
|
||||||
{
|
|
||||||
egg.lastTick += TICK_INTERVAL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -128,6 +128,8 @@ namespace RJW_Genes
|
||||||
Dictionary<XenotypeDef,List<GeneDef>> dict = new Dictionary<XenotypeDef, List<GeneDef>>();
|
Dictionary<XenotypeDef,List<GeneDef>> dict = new Dictionary<XenotypeDef, List<GeneDef>>();
|
||||||
IEnumerable<QueenWorkerMappingDef> mappingDefs = DefDatabase<QueenWorkerMappingDef>.AllDefs;
|
IEnumerable<QueenWorkerMappingDef> mappingDefs = DefDatabase<QueenWorkerMappingDef>.AllDefs;
|
||||||
|
|
||||||
|
if (RJW_Genes_Settings.rjw_genes_detailed_debug) ModLog.Message($"Found {mappingDefs.Count()} Queen-Worker mappings in defs");
|
||||||
|
|
||||||
// Dev-Note: I first a nice lambda here, but I used nesting in favour of logging.
|
// Dev-Note: I first a nice lambda here, but I used nesting in favour of logging.
|
||||||
foreach (QueenWorkerMappingDef mappingDef in mappingDefs)
|
foreach (QueenWorkerMappingDef mappingDef in mappingDefs)
|
||||||
{
|
{
|
||||||
|
@ -202,27 +204,5 @@ namespace RJW_Genes
|
||||||
return DefDatabase<XenotypeDef>.AllDefs.Where(type => type.genes.Contains(GeneDefOf.rjw_genes_drone));
|
return DefDatabase<XenotypeDef>.AllDefs.Where(type => type.genes.Contains(GeneDefOf.rjw_genes_drone));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static HiveOffspringChanceDef LookupDefaultHiveInheritanceChances()
|
|
||||||
{
|
|
||||||
IEnumerable<HiveOffspringChanceDef> offspringChanceDefs = DefDatabase<HiveOffspringChanceDef>.AllDefs;
|
|
||||||
|
|
||||||
List<GeneDef> workerGenes = new List<GeneDef>();
|
|
||||||
|
|
||||||
var defaultChance = offspringChanceDefs.First(m => m.defName == "rjw_genes_default_hive_offspring_chances");
|
|
||||||
|
|
||||||
if (defaultChance == null)
|
|
||||||
ModLog.Warning("Did not find `rjw_genes_default_hive_offspring_chances`. Someone likely changed the defname!");
|
|
||||||
|
|
||||||
return defaultChance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static HiveOffspringChanceDef LookupHiveInheritanceChances(XenotypeDef queenDef)
|
|
||||||
{
|
|
||||||
IEnumerable<HiveOffspringChanceDef> offspringChanceDefs = DefDatabase<HiveOffspringChanceDef>.AllDefs;
|
|
||||||
|
|
||||||
return offspringChanceDefs.FirstOrFallback(t => t.queenXenotype == queenDef.defName, LookupDefaultHiveInheritanceChances());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,9 @@ namespace RJW_Genes
|
||||||
[HarmonyPatch(typeof(PregnancyUtility), nameof(PregnancyUtility.ApplyBirthOutcome))]
|
[HarmonyPatch(typeof(PregnancyUtility), nameof(PregnancyUtility.ApplyBirthOutcome))]
|
||||||
public class Patch_BirthOutcome_SetHiveGenes
|
public class Patch_BirthOutcome_SetHiveGenes
|
||||||
{
|
{
|
||||||
|
const double QUEEN_CHANCE = 0.01f;
|
||||||
|
const double DRONE_CHANCE = 0.49f;
|
||||||
|
const double WORKER_CHANCE = 1 - QUEEN_CHANCE - DRONE_CHANCE;
|
||||||
|
|
||||||
|
|
||||||
[HarmonyPostfix]
|
[HarmonyPostfix]
|
||||||
|
@ -42,8 +45,6 @@ namespace RJW_Genes
|
||||||
if (RJW_Genes_Settings.rjw_genes_detailed_debug) ModLog.Message($"PostFix PregnancyUtility::ApplyBirthOutcome - Checking Hive Inheritance because {pawn} has a queen parent.");
|
if (RJW_Genes_Settings.rjw_genes_detailed_debug) ModLog.Message($"PostFix PregnancyUtility::ApplyBirthOutcome - Checking Hive Inheritance because {pawn} has a queen parent.");
|
||||||
|
|
||||||
XenotypeDef queenDef = TryFindParentQueenXenotype(pawn);
|
XenotypeDef queenDef = TryFindParentQueenXenotype(pawn);
|
||||||
HiveOffspringChanceDef hiveOffspringChanceDef = HiveUtility.LookupHiveInheritanceChances(queenDef);
|
|
||||||
|
|
||||||
// Case 1: Mother is Queen, Father is something else. Produce Worker.
|
// Case 1: Mother is Queen, Father is something else. Produce Worker.
|
||||||
if (!hasDroneParent)
|
if (!hasDroneParent)
|
||||||
{
|
{
|
||||||
|
@ -55,22 +56,22 @@ namespace RJW_Genes
|
||||||
{
|
{
|
||||||
double roll = (new Random()).NextDouble();
|
double roll = (new Random()).NextDouble();
|
||||||
// Case 2.a: New Queen born
|
// Case 2.a: New Queen born
|
||||||
if (roll < hiveOffspringChanceDef.queenChance)
|
if (roll < QUEEN_CHANCE)
|
||||||
{
|
{
|
||||||
pawn.genes.SetXenotype(queenDef);
|
pawn.genes.SetXenotype(queenDef);
|
||||||
if (RJW_Genes_Settings.rjw_genes_detailed_debug) ModLog.Message($"{pawn} born as a new queen with xenotype {queenDef.defName} ({hiveOffspringChanceDef.queenChance * 100}% chance,rolled {roll})");
|
if (RJW_Genes_Settings.rjw_genes_detailed_debug) ModLog.Message($"{pawn} born as a new queen with xenotype {queenDef.defName} ({QUEEN_CHANCE*100}% chance,rolled {roll})");
|
||||||
// TODO: Make a letter ?
|
// TODO: Make a letter ?
|
||||||
}
|
}
|
||||||
// Case 2.b: New Drone born
|
// Case 2.b: New Drone born
|
||||||
else if (roll < hiveOffspringChanceDef.droneChance + hiveOffspringChanceDef.queenChance)
|
else if (roll < DRONE_CHANCE + QUEEN_CHANCE)
|
||||||
{
|
{
|
||||||
XenotypeDef droneDef = TryFindParentDroneXenotype(pawn);
|
XenotypeDef droneDef = TryFindParentDroneXenotype(pawn);
|
||||||
pawn.genes.SetXenotype(droneDef);
|
pawn.genes.SetXenotype(droneDef);
|
||||||
if (RJW_Genes_Settings.rjw_genes_detailed_debug) ModLog.Message($"{pawn} born as a new drone with xenotype {droneDef.defName} ({(hiveOffspringChanceDef.droneChance + hiveOffspringChanceDef.queenChance) * 100}% chance,rolled {roll}))");
|
if (RJW_Genes_Settings.rjw_genes_detailed_debug) ModLog.Message($"{pawn} born as a new drone with xenotype {droneDef.defName} ({(DRONE_CHANCE + QUEEN_CHANCE) * 100}% chance,rolled {roll}))");
|
||||||
}
|
}
|
||||||
// Case 2.c: Worker
|
// Case 2.c: Worker
|
||||||
else {
|
else {
|
||||||
if (RJW_Genes_Settings.rjw_genes_detailed_debug) ModLog.Message($"{pawn} born as a worker ({(hiveOffspringChanceDef.workerChance) * 100}% chance,rolled {roll}))");
|
if (RJW_Genes_Settings.rjw_genes_detailed_debug) ModLog.Message($"{pawn} born as a worker ({(WORKER_CHANCE) * 100}% chance,rolled {roll}))");
|
||||||
MakeWorker(pawn, queenDef);
|
MakeWorker(pawn, queenDef);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System.Collections.Generic;
|
using System.Linq;
|
||||||
using System.Linq;
|
|
||||||
using Verse;
|
using Verse;
|
||||||
|
|
||||||
namespace RJW_Genes
|
namespace RJW_Genes
|
||||||
|
@ -15,11 +14,6 @@ namespace RJW_Genes
|
||||||
ModLog.Message($"{HiveUtility.getQueenXenotypes().EnumerableCount()} Queen-Xenotypes ({string.Join(",", HiveUtility.getQueenXenotypes().Select(t => t.defName))})");
|
ModLog.Message($"{HiveUtility.getQueenXenotypes().EnumerableCount()} Queen-Xenotypes ({string.Join(",", HiveUtility.getQueenXenotypes().Select(t => t.defName))})");
|
||||||
ModLog.Message($"{HiveUtility.getDroneXenotypes().EnumerableCount()} Drone-Xenotypes ({string.Join(",", HiveUtility.getDroneXenotypes().Select(t => t.defName))})");
|
ModLog.Message($"{HiveUtility.getDroneXenotypes().EnumerableCount()} Drone-Xenotypes ({string.Join(",", HiveUtility.getDroneXenotypes().Select(t => t.defName))})");
|
||||||
ModLog.Message($"Found {HiveUtility.GetQueenWorkerMappings().Count} Queen-Worker Mappings ({string.Join(",", HiveUtility.GetQueenWorkerMappings().Keys.Select(t => t.defName))} + Default) ");
|
ModLog.Message($"Found {HiveUtility.GetQueenWorkerMappings().Count} Queen-Worker Mappings ({string.Join(",", HiveUtility.GetQueenWorkerMappings().Keys.Select(t => t.defName))} + Default) ");
|
||||||
|
|
||||||
|
|
||||||
IEnumerable<HiveOffspringChanceDef> offspringChanceDefs = DefDatabase<HiveOffspringChanceDef>.AllDefs;
|
|
||||||
IEnumerable<HiveOffspringChanceDef> faultOffspringDefs = offspringChanceDefs.Where(t => t.queenChance + t.workerChance + t.workerChance > 1.02 || t.queenChance + t.workerChance + t.workerChance < 0.98 );
|
|
||||||
ModLog.Message($"Found {offspringChanceDefs.Count()} OffspringChanceDefs, of which {faultOffspringDefs.Count()} had faulty chances ({string.Join(",", faultOffspringDefs.Select(t => t.defName))})");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,10 +43,8 @@
|
||||||
<Compile Include="GeneDefOf.cs" />
|
<Compile Include="GeneDefOf.cs" />
|
||||||
<Compile Include="Genes\Breeding\Gene_MechBreeder.cs" />
|
<Compile Include="Genes\Breeding\Gene_MechBreeder.cs" />
|
||||||
<Compile Include="Genes\Breeding\PatchMechBirth.cs" />
|
<Compile Include="Genes\Breeding\PatchMechBirth.cs" />
|
||||||
<Compile Include="Genes\Hive\Defs\HiveOffspringChanceDef.cs" />
|
<Compile Include="Genes\Breeding\Patch_EggFertilization.cs" />
|
||||||
<Compile Include="Genes\Hive\Genes\Gene_InsectIncubator.cs" />
|
<Compile Include="Genes\Breeding\PatchPregnancyHelper.cs" />
|
||||||
<Compile Include="Genes\Hive\Patches\Patch_InsectBreeder_EggFertilization.cs" />
|
|
||||||
<Compile Include="Genes\Hive\Patches\Patch_InsectIncubator_PregnancyHelper.cs" />
|
|
||||||
<Compile Include="Genes\Cum\CumUtility.cs" />
|
<Compile Include="Genes\Cum\CumUtility.cs" />
|
||||||
<Compile Include="Genes\Cum\Gene_VeryMuchCum.cs" />
|
<Compile Include="Genes\Cum\Gene_VeryMuchCum.cs" />
|
||||||
<Compile Include="Genes\Cum\Gene_MuchCum.cs" />
|
<Compile Include="Genes\Cum\Gene_MuchCum.cs" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue