Name change fixes and removing genes which moved to RJW_Genes
This commit is contained in:
parent
ed3bdefa86
commit
8a988f48a5
Binary file not shown.
|
@ -8,6 +8,7 @@
|
|||
<stunTargetWhileCasting>false</stunTargetWhileCasting>
|
||||
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
|
||||
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
|
||||
<cooldownTicksRange>60000</cooldownTicksRange>
|
||||
<warmupMote>Mote_CoagulateStencil</warmupMote>
|
||||
<warmupEffecter>Coagulate</warmupEffecter>
|
||||
<warmupStartSound>Coagulate_Cast</warmupStartSound>
|
||||
|
@ -27,15 +28,15 @@
|
|||
</targetParams>
|
||||
</verbProperties>
|
||||
<comps>
|
||||
<li Class="shabe_genesaddons.CompProperties_AbilityPussyHeal"> <!-- namespace needs to be changed when copied to another mod-->
|
||||
<li Class="RJW_More_Genes.CompProperties_AbilityPussyHeal"> <!-- namespace needs to be changed when copied to another mod-->
|
||||
<tendQualityRange>0.4~0.8</tendQualityRange>
|
||||
</li>
|
||||
<li Class="CompProperties_AbilityRequiresCapacity">
|
||||
<capacity>Manipulation</capacity>
|
||||
</li>
|
||||
<li Class="shabe_genesaddons.CompProperties_SexInteractionRequirements">
|
||||
<li Class="RJW_More_Genes.CompProperties_SexInteractionRequirements">
|
||||
<tags>
|
||||
<li>Consensual</li>
|
||||
<!-- <li>Consensual</li> -->
|
||||
<li>Rape</li>
|
||||
</tags>
|
||||
<dominantRequirement>
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Defs>
|
||||
<!-- Mechbreeder -->
|
||||
<GeneDef>
|
||||
<defName>rjw_genes_mechbreeder</defName>
|
||||
<label>Mechbreeder</label>
|
||||
<description>Pawns with this gene are able to birth mechanoids unharmed.</description>
|
||||
<iconPath>World/WorldObjects/Expanding/Mechanoids</iconPath>
|
||||
<displayOrderInCategory>51</displayOrderInCategory>
|
||||
<displayCategory>Reproduction</displayCategory>
|
||||
</GeneDef>
|
||||
|
||||
<GeneDef>
|
||||
<defName>rjw_genes_insectincubator</defName>
|
||||
<label>InsectIncubator</label>
|
||||
<description>Pawns with this gene are able to hold more insect eggs.</description>
|
||||
<iconPath>World/WorldObjects/Expanding/Mechanoids</iconPath>
|
||||
<displayOrderInCategory>52</displayOrderInCategory>
|
||||
<displayCategory>Reproduction</displayCategory>
|
||||
</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/Mechanoids</iconPath>
|
||||
<displayOrderInCategory>53</displayOrderInCategory>
|
||||
<displayCategory>Reproduction</displayCategory>
|
||||
</GeneDef>
|
||||
</Defs>
|
|
@ -3,7 +3,7 @@
|
|||
<Defs>
|
||||
<JobDef>
|
||||
<defName>HealPussy</defName>
|
||||
<driverClass>shabe_genesaddons.JobDriver_CastAbilityAfterSex</driverClass>
|
||||
<driverClass>RJW_More_Genes.JobDriver_CastAbilityAfterSex</driverClass>
|
||||
<reportString>Healing someone with sex.</reportString>
|
||||
<casualInterruptible>false</casualInterruptible>
|
||||
</JobDef>
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -9,7 +9,7 @@ using RimWorld;
|
|||
using rjw;
|
||||
using rjw.Modules.Interactions.Helpers;
|
||||
|
||||
namespace shabe_genesaddons
|
||||
namespace RJW_More_Genes
|
||||
{
|
||||
public class CompAbilityEffect_PussyHeal : CompAbilityEffect
|
||||
{
|
|
@ -5,7 +5,7 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
namespace shabe_genesaddons
|
||||
namespace RJW_More_Genes
|
||||
{
|
||||
public class CompAbility_SexInteractionRequirements : AbilityComp
|
||||
{
|
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||
using Verse;
|
||||
using RimWorld;
|
||||
|
||||
namespace shabe_genesaddons
|
||||
namespace RJW_More_Genes
|
||||
{
|
||||
public class CompProperties_AbilityPussyHeal : CompProperties_AbilityEffect
|
||||
{
|
|
@ -8,7 +8,8 @@ using RimWorld;
|
|||
using rjw;
|
||||
using rjw.Modules.Interactions.Defs.DefFragment;
|
||||
using rjw.Modules.Interactions.Enums;
|
||||
namespace shabe_genesaddons
|
||||
|
||||
namespace RJW_More_Genes
|
||||
{
|
||||
public class CompProperties_SexInteractionRequirements : AbilityCompProperties
|
||||
{
|
|
@ -6,14 +6,11 @@ using System.Threading.Tasks;
|
|||
using Verse;
|
||||
using RimWorld;
|
||||
|
||||
namespace shabe_genesaddons
|
||||
namespace RJW_More_Genes
|
||||
{
|
||||
[DefOf]
|
||||
public static class GeneDefOf
|
||||
{
|
||||
public static readonly GeneDef rjw_genes_mechbreeder;
|
||||
public static readonly GeneDef rjw_genes_insectincubator;
|
||||
public static readonly GeneDef rjw_genes_insectbreeder;
|
||||
public static readonly GeneDef rjw_genes_pussyhealer;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_More_Genes
|
||||
{
|
||||
public class GeneUtility
|
||||
{
|
||||
public static bool isPussyHealer(Pawn pawn)
|
||||
{
|
||||
if (pawn.genes == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return pawn.genes.HasGene(GeneDefOf.rjw_genes_pussyhealer);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,14 +7,14 @@ using Verse;
|
|||
using HarmonyLib;
|
||||
|
||||
|
||||
namespace shabe_genesaddons
|
||||
namespace RJW_More_Genes
|
||||
{
|
||||
[StaticConstructorOnStartup]
|
||||
internal static class HarmonyInit
|
||||
{
|
||||
static HarmonyInit()
|
||||
{
|
||||
Harmony harmony = new Harmony("shabe_genesaddons");
|
||||
Harmony harmony = new Harmony("RJW_More_Genes");
|
||||
harmony.PatchAll();
|
||||
}
|
||||
}
|
|
@ -8,7 +8,7 @@ using Verse;
|
|||
using Verse.AI;
|
||||
using rjw;
|
||||
|
||||
namespace shabe_genesaddons
|
||||
namespace RJW_More_Genes
|
||||
{
|
||||
public class JobDriver_CastAbilityAfterSex : JobDriver_SexBaseInitiator
|
||||
{
|
|
@ -64,9 +64,6 @@
|
|||
<Compile Include="GeneDefOf.cs" />
|
||||
<Compile Include="HarmonyInit.cs" />
|
||||
<Compile Include="JobDriver_CastAbilityAfterSex.cs" />
|
||||
<Compile Include="PatchMechBirth.cs" />
|
||||
<Compile Include="PatchPawnExtensions.cs" />
|
||||
<Compile Include="PatchPregnancyHelper.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="GeneUtility.cs" />
|
||||
<Compile Include="SexInteractionUtility.cs" />
|
|
@ -13,7 +13,7 @@ using rjw.Modules.Interactions.Implementation;
|
|||
using rjw.Modules.Interactions.Defs.DefFragment;
|
||||
//using rjw.Modules.Interactions.Enums;
|
||||
|
||||
namespace shabe_genesaddons
|
||||
namespace RJW_More_Genes
|
||||
{
|
||||
class SexInteractionUtility
|
||||
{
|
|
@ -5,7 +5,8 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
namespace shabe_genesaddons
|
||||
|
||||
namespace RJW_More_Genes
|
||||
{
|
||||
[DefOf]
|
||||
public static class ThoughtDefOf
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
4d7ff98164d1cf091715f5b60c92ca5ce544b757
|
|
@ -2,3 +2,7 @@ C:\Users\tyrob\OneDrive\Documenten\GitHub\RJW_Genes_Addons\RJW-Genes-Addons\Comm
|
|||
C:\Users\tyrob\OneDrive\Documenten\GitHub\RJW_Genes_Addons\RJW-Genes-Addons\Source\shabe_genesaddons\obj\Debug\RJW_More_Genes.csproj.AssemblyReference.cache
|
||||
C:\Users\tyrob\OneDrive\Documenten\GitHub\RJW_Genes_Addons\RJW-Genes-Addons\Source\shabe_genesaddons\obj\Debug\RJW_More_Genes.csproj.CoreCompileInputs.cache
|
||||
C:\Users\tyrob\OneDrive\Documenten\GitHub\RJW_Genes_Addons\RJW-Genes-Addons\Source\shabe_genesaddons\obj\Debug\RJW_More_Genes.dll
|
||||
C:\Users\tyrob\OneDrive\Documenten\GitHub\RJW_More_Genes\RJW_More_Genes\Common\Assemblies\RJW_More_Genes.dll
|
||||
C:\Users\tyrob\OneDrive\Documenten\GitHub\RJW_More_Genes\RJW_More_Genes\Source\RJW_More_Genes\obj\Debug\RJW_More_Genes.csproj.AssemblyReference.cache
|
||||
C:\Users\tyrob\OneDrive\Documenten\GitHub\RJW_More_Genes\RJW_More_Genes\Source\RJW_More_Genes\obj\Debug\RJW_More_Genes.csproj.CoreCompileInputs.cache
|
||||
C:\Users\tyrob\OneDrive\Documenten\GitHub\RJW_More_Genes\RJW_More_Genes\Source\RJW_More_Genes\obj\Debug\RJW_More_Genes.dll
|
Binary file not shown.
Binary file not shown.
|
@ -1,58 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
|
||||
namespace shabe_genesaddons
|
||||
{
|
||||
public class GeneUtility
|
||||
{
|
||||
public static bool IsMechbreeder(Pawn pawn)
|
||||
{
|
||||
if (pawn.genes == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return pawn.genes.HasGene(GeneDefOf.rjw_genes_mechbreeder);
|
||||
}
|
||||
|
||||
public static bool IsInsectIncubator(Pawn pawn)
|
||||
{
|
||||
if (pawn.genes == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return pawn.genes.HasGene(GeneDefOf.rjw_genes_insectincubator);
|
||||
}
|
||||
|
||||
public static bool isInsectBreeder(Pawn pawn)
|
||||
{
|
||||
if (pawn.genes == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return pawn.genes.HasGene(GeneDefOf.rjw_genes_insectbreeder);
|
||||
}
|
||||
|
||||
public static bool isPussyHealer(Pawn pawn)
|
||||
{
|
||||
if (pawn.genes == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return pawn.genes.HasGene(GeneDefOf.rjw_genes_pussyhealer);
|
||||
}
|
||||
|
||||
public static float MaxEggSizeMul(Pawn pawn)
|
||||
{
|
||||
float MaxEggSize = 1;
|
||||
if (IsInsectIncubator(pawn))
|
||||
{
|
||||
MaxEggSize *= 2;
|
||||
}
|
||||
return MaxEggSize;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using HarmonyLib;
|
||||
using rjw;
|
||||
namespace shabe_genesaddons
|
||||
{
|
||||
[HarmonyPatch(typeof(Hediff_MechanoidPregnancy), "GiveBirth")]
|
||||
public static class PatchMechBirth
|
||||
{
|
||||
[HarmonyTranspiler]
|
||||
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator il)
|
||||
{
|
||||
bool found_call = false;
|
||||
bool found_skip = false;
|
||||
Label skip_label = il.DefineLabel();
|
||||
MethodInfo ismechbreeder = AccessTools.Method(typeof(GeneUtility), "IsMechbreeder");
|
||||
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;
|
||||
|
||||
if (codeInstruction.opcode == OpCodes.Call)
|
||||
{
|
||||
//Log.Message(codeInstruction.operand.ToString());
|
||||
if (codeInstruction.operand.ToString() == "Boolean TryMakeFilth(Verse.IntVec3, Verse.Map, Verse.ThingDef, System.String, Int32, RimWorld.FilthSourceFlags)")
|
||||
{
|
||||
found_call = true;
|
||||
}
|
||||
}
|
||||
//Triggers after the pop opcode (after generating filth in c#).
|
||||
else if (found_call)
|
||||
{
|
||||
//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.Call, ismechbreeder);
|
||||
yield return new CodeInstruction(OpCodes.Brtrue_S, skip_label);
|
||||
found_call = false;
|
||||
}
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using HarmonyLib;
|
||||
using rjw;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
namespace shabe_genesaddons
|
||||
{
|
||||
[HarmonyPatch(typeof(PawnExtensions), "RaceImplantEggs")]
|
||||
public static class PatchPawnExtensions
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
public static void Postfix(Pawn pawn, ref bool __result)
|
||||
{
|
||||
if (!__result)
|
||||
{
|
||||
__result = GeneUtility.isInsectBreeder(pawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection.Emit;
|
||||
using System.Reflection;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using HarmonyLib;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
|
||||
namespace shabe_genesaddons
|
||||
{
|
||||
[HarmonyPatch(typeof(PregnancyHelper), "DoEgg")]
|
||||
static class PatchPregnancyHelper
|
||||
{
|
||||
[HarmonyTranspiler]
|
||||
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator il)
|
||||
{
|
||||
//MethodInfo isinsectincubator = AccessTools.Method(typeof(GeneUtility), "IsInsectIncubator");
|
||||
MethodInfo maxeggsizemul = AccessTools.Method(typeof(GeneUtility), "MaxEggSizeMul");
|
||||
FieldInfo partner = AccessTools.Field(typeof(SexProps), "partner");
|
||||
|
||||
Label skiplabel = il.DefineLabel();
|
||||
bool finished = false;
|
||||
foreach (CodeInstruction codeInstruction in instructions)
|
||||
{
|
||||
if (!finished)
|
||||
{
|
||||
if (codeInstruction.opcode == OpCodes.Ldc_R4 && codeInstruction.operand.ToString() == "0")
|
||||
{
|
||||
yield return new CodeInstruction(OpCodes.Ldarg_0, null);
|
||||
yield return new CodeInstruction(OpCodes.Ldfld, partner);
|
||||
//yield return new CodeInstruction(OpCodes.Call, isinsectincubator);
|
||||
yield return new CodeInstruction(OpCodes.Callvirt, maxeggsizemul);
|
||||
//yield return new CodeInstruction(OpCodes.Brfalse_S, skiplabel);
|
||||
yield return new CodeInstruction(OpCodes.Ldloc_0, null);
|
||||
//yield return new CodeInstruction(OpCodes.Ldc_R4, 2f);
|
||||
yield return new CodeInstruction(OpCodes.Mul, null);
|
||||
yield return new CodeInstruction(OpCodes.Stloc_0, null);
|
||||
//codeInstruction.labels.Add(skiplabel);
|
||||
finished = true;
|
||||
}
|
||||
}
|
||||
yield return codeInstruction;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
6ecf46e37be50c69fa3cb87cd34ade9851fe6e74
|
Binary file not shown.
Loading…
Reference in New Issue