Compare commits
34 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b70b975b67 |
||
|
|
4946df511e | ||
|
|
ef953fa1b7 | ||
|
|
be27255832 | ||
|
|
83e9f9ef5b |
||
|
|
45a451a127 | ||
|
|
7692ce3425 | ||
|
|
b13f761ede | ||
|
|
ed761327d2 | ||
|
|
e0a333f539 | ||
|
|
5025700727 | ||
|
|
a407f3f400 | ||
|
|
6e26d596cf | ||
|
|
670361a748 | ||
|
|
c7ea7144dc | ||
|
|
97eabd540d | ||
|
|
61fdb2c3b7 | ||
|
|
27511a29f3 | ||
|
|
ef05a5bbc3 | ||
|
|
7f6dc2a668 | ||
|
|
ba53413687 | ||
|
|
aa3d3985bc | ||
|
|
11226249b3 | ||
|
|
dde1c98b18 | ||
|
|
7540b96ecb |
||
|
|
b0da74ebd3 |
||
|
|
e9fa05d218 |
||
|
|
8577c3ee55 | ||
|
|
19148cc768 | ||
|
|
72acfbb8bf | ||
|
|
f5975212b1 | ||
|
|
f1ea695516 | ||
|
|
2d055a134f | ||
|
|
e402a6b2a8 |
2
.gitignore
vendored
|
|
@ -255,3 +255,5 @@ paket-files/
|
||||||
# Python Tools for Visual Studio (PTVS)
|
# Python Tools for Visual Studio (PTVS)
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|
||||||
|
*.dds
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Defs>
|
||||||
|
|
||||||
|
<GeneDef ParentName="GeneGenitalTypeBase">
|
||||||
|
<defName>rjw_genes_Pig_genitalia</defName>
|
||||||
|
<label>Pig genitalia</label>
|
||||||
|
<description>Carriers of this gene develop pig genitalia.</description>
|
||||||
|
<iconPath>Genes/Icons/Genitalia_screw_icon</iconPath>
|
||||||
|
<modExtensions>
|
||||||
|
<li Class="RJW_Genes.GenitaliaTypeExtension">
|
||||||
|
<penis>PigPenis</penis>
|
||||||
|
<vagina>PigVagina</vagina>
|
||||||
|
</li>
|
||||||
|
</modExtensions>
|
||||||
|
<displayOrderInCategory>807</displayOrderInCategory>
|
||||||
|
</GeneDef>
|
||||||
|
|
||||||
|
<GeneDef ParentName="GeneGenitalTypeBase">
|
||||||
|
<defName>rjw_genes_Orc_genitalia</defName>
|
||||||
|
<label>Orc genitalia</label>
|
||||||
|
<description>Carriers of this gene develop orc genitalia.</description>
|
||||||
|
<iconPath>Genes/Icons/Genitalia_orc_icon</iconPath>
|
||||||
|
<modExtensions>
|
||||||
|
<li Class="RJW_Genes.GenitaliaTypeExtension">
|
||||||
|
<penis>OrcPenis</penis>
|
||||||
|
<vagina>OrcVagina</vagina>
|
||||||
|
</li>
|
||||||
|
</modExtensions>
|
||||||
|
<displayOrderInCategory>807</displayOrderInCategory>
|
||||||
|
</GeneDef>
|
||||||
|
|
||||||
|
</Defs>
|
||||||
|
|
@ -1,14 +1,11 @@
|
||||||
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Reflection.Emit;
|
using System.Reflection.Emit;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using rjw;
|
using rjw;
|
||||||
|
using Verse;
|
||||||
|
|
||||||
namespace RJW_Genes
|
namespace RJW_Genes
|
||||||
{
|
{
|
||||||
|
|
@ -23,42 +20,35 @@ namespace RJW_Genes
|
||||||
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator il)
|
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator il)
|
||||||
{
|
{
|
||||||
bool found_call = false;
|
bool found_call = false;
|
||||||
bool found_skip = false;
|
bool finished = false;
|
||||||
Label skip_label = il.DefineLabel();
|
Label skip_label = il.DefineLabel();
|
||||||
|
MethodInfo removeHediff = AccessTools.Method(typeof(Pawn_HealthTracker), nameof(Pawn_HealthTracker.RemoveHediff));
|
||||||
MethodInfo ismechbreeder = AccessTools.Method(typeof(GeneUtility), "IsMechbreeder");
|
MethodInfo ismechbreeder = AccessTools.Method(typeof(GeneUtility), "IsMechbreeder");
|
||||||
foreach (CodeInstruction codeInstruction in instructions)
|
foreach (CodeInstruction codeInstruction in instructions)
|
||||||
{
|
{
|
||||||
//Check if the first opcode after endfinally ldloc_0 is and in that case add the label to skip the code
|
|
||||||
if (found_skip && codeInstruction.opcode == OpCodes.Ldloc_0)
|
|
||||||
{
|
|
||||||
codeInstruction.labels.Add(skip_label);
|
|
||||||
}
|
|
||||||
found_skip = false;
|
|
||||||
if (codeInstruction.opcode == OpCodes.Endfinally)
|
|
||||||
{
|
|
||||||
found_skip = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
yield return codeInstruction;
|
yield return codeInstruction;
|
||||||
|
|
||||||
if (codeInstruction.opcode == OpCodes.Call)
|
if (finished)
|
||||||
{
|
{
|
||||||
if (codeInstruction.operand.ToString() == "Boolean TryMakeFilth(Verse.IntVec3, Verse.Map, Verse.ThingDef, System.String, Int32, RimWorld.FilthSourceFlags)")
|
continue;
|
||||||
{
|
|
||||||
found_call = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//Triggers after the pop opcode (after generating filth in c#).
|
|
||||||
else if (found_call)
|
if (!found_call && codeInstruction.Calls(removeHediff))
|
||||||
{
|
{
|
||||||
//Load pawn, call function to check if a mechbreeder, and skip past the part which does damage
|
//Load pawn, call function to check if a mechbreeder, and skip past the part which does damage
|
||||||
yield return new CodeInstruction(OpCodes.Ldloc_0, null);
|
yield return new CodeInstruction(OpCodes.Ldloc_0);
|
||||||
yield return new CodeInstruction(OpCodes.Call, ismechbreeder);
|
yield return new CodeInstruction(OpCodes.Call, ismechbreeder);
|
||||||
yield return new CodeInstruction(OpCodes.Brtrue_S, skip_label);
|
yield return new CodeInstruction(OpCodes.Brfalse_S, skip_label);
|
||||||
found_call = false;
|
yield return new CodeInstruction(OpCodes.Ret);
|
||||||
|
found_call = true;
|
||||||
|
}
|
||||||
|
else if (found_call)
|
||||||
|
{
|
||||||
|
// next instruction after the insert
|
||||||
|
codeInstruction.labels.Add(skip_label);
|
||||||
|
finished = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
yield break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -16,7 +16,7 @@ namespace RJW_Genes
|
||||||
{
|
{
|
||||||
// Right now: Ignore Breasts, only do
|
// Right now: Ignore Breasts, only do
|
||||||
if (part is ISexPartHediff sexPart && (Genital_Helper.is_penis(part) || Genital_Helper.is_vagina(part)))
|
if (part is ISexPartHediff sexPart && (Genital_Helper.is_penis(part) || Genital_Helper.is_vagina(part)))
|
||||||
sexPart.GetPartComp().partFluidFactor *= multiplier;
|
sexPart.GetPartComp().partFluidMultiplier *= multiplier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,11 @@
|
||||||
using RimWorld;
|
using RimWorld;
|
||||||
using rjw;
|
using rjw;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace RJW_Genes
|
namespace RJW_Genes
|
||||||
{
|
{
|
||||||
public class Gene_EvergrowingGenitalia : RJW_Gene
|
public class Gene_EvergrowingGenitalia : RJW_Gene
|
||||||
{
|
{
|
||||||
|
|
||||||
const int BASE_TICKS = 60000;
|
const int BASE_TICKS = 60000;
|
||||||
|
|
||||||
public override void Tick()
|
public override void Tick()
|
||||||
|
|
@ -28,19 +26,20 @@ namespace RJW_Genes
|
||||||
private void GrowPenisses()
|
private void GrowPenisses()
|
||||||
{
|
{
|
||||||
List<Hediff> AllPenisses = Genital_Helper.get_AllPartsHediffList(pawn).FindAll(x => Genital_Helper.is_penis(x));
|
List<Hediff> AllPenisses = Genital_Helper.get_AllPartsHediffList(pawn).FindAll(x => Genital_Helper.is_penis(x));
|
||||||
foreach(Hediff penis in AllPenisses)
|
float bodySizeOverride = -1f; //this is just hackjob to temporary fix an issue. It need to be remade
|
||||||
|
foreach (Hediff penis in AllPenisses)
|
||||||
{
|
{
|
||||||
HediffComp_SexPart CompHediff = penis.TryGetComp<rjw.HediffComp_SexPart>();
|
HediffComp_SexPart CompHediff = penis.TryGetComp<rjw.HediffComp_SexPart>();
|
||||||
if (CompHediff.baseSize <= 1.00f)
|
if (CompHediff.baseSize <= 1.00f)
|
||||||
CompHediff.baseSize += 0.10f;
|
CompHediff.baseSize += 0.10f;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (CompHediff.bodySizeOverride <= 1.0) CompHediff.bodySizeOverride = 1.0f;
|
if (bodySizeOverride <= 1.0) bodySizeOverride = 1.0f;
|
||||||
CompHediff.bodySizeOverride += 0.05f;
|
bodySizeOverride += 0.05f;
|
||||||
}
|
}
|
||||||
CompHediff.UpdateSeverity();
|
CompHediff.UpdateSeverity();
|
||||||
|
|
||||||
if (CompHediff.bodySizeOverride > 3.0f)
|
if (bodySizeOverride > 3.0f)
|
||||||
{
|
{
|
||||||
// Add Mental Hediff
|
// Add Mental Hediff
|
||||||
HandleGenitaliaSizeThoughts(pawn);
|
HandleGenitaliaSizeThoughts(pawn);
|
||||||
|
|
@ -48,13 +47,14 @@ namespace RJW_Genes
|
||||||
|
|
||||||
// Increase Fluid
|
// Increase Fluid
|
||||||
if (CompHediff != null)
|
if (CompHediff != null)
|
||||||
CompHediff.partFluidFactor *= 1.05f;
|
CompHediff.partFluidMultiplier *= 1.05f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GrowVaginas()
|
private void GrowVaginas()
|
||||||
{
|
{
|
||||||
List<Hediff> AllVaginas = Genital_Helper.get_AllPartsHediffList(pawn).FindAll(x => Genital_Helper.is_vagina(x));
|
List<Hediff> AllVaginas = Genital_Helper.get_AllPartsHediffList(pawn).FindAll(x => Genital_Helper.is_vagina(x));
|
||||||
|
float bodySizeOverride = -1f; //this is just hackjob to temporary fix an issue. It need to be remade
|
||||||
foreach (Hediff vagina in AllVaginas)
|
foreach (Hediff vagina in AllVaginas)
|
||||||
{
|
{
|
||||||
HediffComp_SexPart CompHediff = vagina.TryGetComp<rjw.HediffComp_SexPart>();
|
HediffComp_SexPart CompHediff = vagina.TryGetComp<rjw.HediffComp_SexPart>();
|
||||||
|
|
@ -62,21 +62,21 @@ namespace RJW_Genes
|
||||||
CompHediff.baseSize += 0.10f;
|
CompHediff.baseSize += 0.10f;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (CompHediff.bodySizeOverride <= 1.0) CompHediff.bodySizeOverride = 1.0f;
|
if (bodySizeOverride <= 1.0) bodySizeOverride = 1.0f;
|
||||||
CompHediff.bodySizeOverride += 0.05f;
|
bodySizeOverride += 0.05f;
|
||||||
}
|
}
|
||||||
//CompHediff.ForceSize(CompHediff.Size + 0.05f);
|
//CompHediff.ForceSize(CompHediff.Size + 0.05f);
|
||||||
//CompHediff.originalOwnerSize += 0.05f;
|
//CompHediff.originalOwnerSize += 0.05f;
|
||||||
CompHediff.UpdateSeverity();
|
CompHediff.UpdateSeverity();
|
||||||
|
|
||||||
if (CompHediff.bodySizeOverride > 3.0f)
|
if (bodySizeOverride > 3.0f)
|
||||||
{
|
{
|
||||||
// Add Mental Hediff
|
// Add Mental Hediff
|
||||||
HandleGenitaliaSizeThoughts(pawn);
|
HandleGenitaliaSizeThoughts(pawn);
|
||||||
}
|
}
|
||||||
// Increase Fluid
|
// Increase Fluid
|
||||||
if (CompHediff != null)
|
if (CompHediff != null)
|
||||||
CompHediff.partFluidFactor *= 1.025f;
|
CompHediff.partFluidMultiplier *= 1.025f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,13 +29,13 @@ namespace RJW_Genes.Interactions
|
||||||
{
|
{
|
||||||
weight *= 2.5f;
|
weight *= 2.5f;
|
||||||
}
|
}
|
||||||
if (pawn.genes.HasGene(GeneDefOf.rjw_genes_cum_eater))
|
if (pawn.genes.HasActiveGene(GeneDefOf.rjw_genes_cum_eater))
|
||||||
{
|
{
|
||||||
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Mouth);
|
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Mouth);
|
||||||
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Beak);
|
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Beak);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pawn.genes.HasGene(GeneDefOf.rjw_genes_fertilin_absorber))
|
if (pawn.genes.HasActiveGene(GeneDefOf.rjw_genes_fertilin_absorber))
|
||||||
{
|
{
|
||||||
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Vagina);
|
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Vagina);
|
||||||
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Anus);
|
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Anus);
|
||||||
|
|
@ -62,7 +62,7 @@ namespace RJW_Genes.Interactions
|
||||||
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Mouth);
|
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Mouth);
|
||||||
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Beak);
|
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Beak);
|
||||||
|
|
||||||
if (pawn.genes.HasGene(GeneDefOf.rjw_genes_fertilin_absorber))
|
if (pawn.genes.HasActiveGene(GeneDefOf.rjw_genes_fertilin_absorber))
|
||||||
{
|
{
|
||||||
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Vagina);
|
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Vagina);
|
||||||
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Anus);
|
yield return new Weighted<LewdablePartKind>(weight, LewdablePartKind.Anus);
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ namespace RJW_Genes
|
||||||
|
|
||||||
// Increase Fluid
|
// Increase Fluid
|
||||||
if (CompHediff != null)
|
if (CompHediff != null)
|
||||||
CompHediff.partFluidFactor *= cum_multiplier;
|
CompHediff.partFluidMultiplier *= cum_multiplier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |