mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
merge
This commit is contained in:
parent
951085ec59
commit
25008ce5dc
48 changed files with 2345 additions and 59 deletions
108
Source/Animal_Inheritance/Patches/BasePregnancyPatcher.cs
Normal file
108
Source/Animal_Inheritance/Patches/BasePregnancyPatcher.cs
Normal file
|
@ -0,0 +1,108 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using UnityEngine;
|
||||
using HarmonyLib;
|
||||
using rjw;
|
||||
|
||||
namespace RJW_BGS
|
||||
{
|
||||
[HarmonyPatch(typeof(Hediff_BasePregnancy))]
|
||||
public class BasePregnancyPatcher
|
||||
{
|
||||
public static List<string> racesgen1 = new List<string>()
|
||||
{
|
||||
"GR_Manbear",
|
||||
"GR_Bearman",
|
||||
"GR_Manalope",
|
||||
"GR_Booman",
|
||||
"GR_Manchicken",
|
||||
"GR_Turkeyman",
|
||||
"GR_Manffalo",
|
||||
"GR_Muffaloman",
|
||||
"GR_Manwolf",
|
||||
"GR_Dogman",
|
||||
"GR_Mancat",
|
||||
"GR_Catman",
|
||||
"GR_Mansquirrel",
|
||||
"GR_Moleman",
|
||||
"GR_Thrumboman",
|
||||
"GR_Hurseman",
|
||||
"GR_Manscarab",
|
||||
"GR_Lizardman"
|
||||
};
|
||||
|
||||
public static List<string> racesgen0 = new List<string>()
|
||||
{
|
||||
"Bear_Grizzly",
|
||||
"Bear_Polar",
|
||||
"Boomalope",
|
||||
"Chicken",
|
||||
"Duck",
|
||||
"Turkey",
|
||||
"Goose",
|
||||
"Ostrich",
|
||||
"Emu",
|
||||
"Cassowary",
|
||||
"Cow",
|
||||
"Muffalo",
|
||||
"Bison",
|
||||
"Yak",
|
||||
"Warg",
|
||||
"Wolf_Timber",
|
||||
"Wolf_Arctic",
|
||||
"Fox_Fennec",
|
||||
"Fox_Red",
|
||||
"Fox_Arctic",
|
||||
"Husky",
|
||||
"LabradorRetriever",
|
||||
"YorkshireTerrier",
|
||||
"Cougar",
|
||||
"Panther",
|
||||
"Lynx",
|
||||
"Cat",
|
||||
"GuineaPig",
|
||||
"Hare",
|
||||
"Snowhare",
|
||||
"Squirrel",
|
||||
"Rat",
|
||||
"Raccoon",
|
||||
"Thrumbo",
|
||||
"Dromedary",
|
||||
"Elk",
|
||||
"Horse",
|
||||
"Caribou",
|
||||
"Donkey",
|
||||
"Megascarab",
|
||||
"Spelopede",
|
||||
"Megaspider",
|
||||
"Iguana",
|
||||
"Cobra",
|
||||
"Tortoise"
|
||||
};
|
||||
public static HediffDef controler = DefDatabase<HediffDef>.GetNamed("RJWGenes_AnimalControlHediff", true);
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch("GenerateBabies")]
|
||||
public static void addHedif (Hediff_BasePregnancy __instance)
|
||||
{
|
||||
if (controler == null) return;
|
||||
|
||||
foreach (Pawn p in __instance.babies)
|
||||
{
|
||||
if(p != null)
|
||||
{
|
||||
if (racesgen1.Contains(p.kindDef.race.defName))
|
||||
{
|
||||
p.health.AddHediff(controler);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
55
Source/Animal_Inheritance/Patches/PregnancyHelperPatcher.cs
Normal file
55
Source/Animal_Inheritance/Patches/PregnancyHelperPatcher.cs
Normal file
|
@ -0,0 +1,55 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using RJW_BGS;
|
||||
using HarmonyLib;
|
||||
using rjw;
|
||||
using static rjw.Hediff_BasePregnancy;
|
||||
|
||||
namespace RJW_BGS
|
||||
{
|
||||
[HarmonyPatch(typeof(PregnancyHelper))]
|
||||
public class PregnancyHelperPatcher
|
||||
{
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch("AddPregnancyHediff")]
|
||||
public static bool AddPregnancyHediffPrefix(Pawn mother, Pawn father)
|
||||
{
|
||||
if (!RJW_BGSSettings.rjw_bgs_VE_genetics) return true;
|
||||
if (mother == null || father == null) return true;
|
||||
bool a = mother.IsHuman() && BasePregnancyPatcher.racesgen0.Contains(father.kindDef.race.defName);
|
||||
bool b = mother.IsHuman() && BasePregnancyPatcher.racesgen1.Contains(father.kindDef.race.defName);
|
||||
bool c = father.IsHuman() && BasePregnancyPatcher.racesgen0.Contains(mother.kindDef.race.defName);
|
||||
bool d = father.IsHuman() && BasePregnancyPatcher.racesgen1.Contains(mother.kindDef.race.defName);
|
||||
|
||||
if (!(a || b||c|| d)) return true;
|
||||
if (a)
|
||||
{
|
||||
Hediff_BasePregnancy.Create<Hediff_BestialPregnancy>(mother, father, DnaGivingParent.Father);
|
||||
return false;
|
||||
}
|
||||
else if (b)
|
||||
{
|
||||
ModLog.Message("preg hediffdefof PregnantHuman " + RimWorld.HediffDefOf.PregnantHuman);
|
||||
PregnancyHelper.StartVanillaPregnancy(mother, father);
|
||||
return false;
|
||||
}
|
||||
else if (c)
|
||||
{
|
||||
Hediff_BasePregnancy.Create<Hediff_BestialPregnancy>(mother, father, DnaGivingParent.Mother);
|
||||
return false;
|
||||
}
|
||||
else if (d)
|
||||
{
|
||||
Hediff_BasePregnancy.Create<Hediff_BestialPregnancy>(mother, father, DnaGivingParent.Father);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -30,6 +30,8 @@ namespace RJW_BGS
|
|||
listing_Standard.Gap(5f);
|
||||
listing_Standard.CheckboxLabeled("genes as xenogenes", ref rjw_bgs_animal_genes_as_xenogenes, "If toggled, animal genes will be added as xenogenes.", 0f, 1f);
|
||||
listing_Standard.Gap(5f);
|
||||
listing_Standard.CheckboxLabeled("enable VE genetics hybridation", ref rjw_bgs_VE_genetics, "If enabled and if you have VE genetics it will enable the hybridation system.", 0f, 1f);
|
||||
listing_Standard.Gap(5f);
|
||||
listing_Standard.CheckboxLabeled("detailed-debug", ref rjw_bgs_detailed_debug, "Adds detailed information to the log about pregnancies and genes.", 0f, 1f);
|
||||
listing_Standard.End();
|
||||
}
|
||||
|
@ -41,11 +43,13 @@ namespace RJW_BGS
|
|||
Scribe_Values.Look<float>(ref RJW_BGSSettings.rjw_bgs_global_gene_chance, "rjw_bgs_global_gene_chance", RJW_BGSSettings.rjw_bgs_global_gene_chance, true);
|
||||
Scribe_Values.Look<bool>(ref RJW_BGSSettings.rjw_bgs_animal_genes_as_xenogenes, "rjw_bgs_animal_genes_as_xenogenes", RJW_BGSSettings.rjw_bgs_animal_genes_as_xenogenes, true);
|
||||
Scribe_Values.Look<bool>(ref RJW_BGSSettings.rjw_bgs_detailed_debug, "rjw_bgs_detailed_debug", RJW_BGSSettings.rjw_bgs_detailed_debug, true);
|
||||
Scribe_Values.Look<bool>(ref RJW_BGSSettings.rjw_bgs_VE_genetics, "rjw_bgs_VE_genetics", RJW_BGSSettings.rjw_bgs_VE_genetics, true);
|
||||
}
|
||||
|
||||
public static float rjw_bgs_global_gene_chance = 1f;
|
||||
public static bool rjw_bgs_enabled = true;
|
||||
public static bool rjw_bgs_animal_genes_as_xenogenes = false;
|
||||
public static bool rjw_bgs_detailed_debug = false;
|
||||
public static bool rjw_bgs_VE_genetics = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -125,5 +125,43 @@ namespace RJW_Genes
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch("SetFather")]
|
||||
private static bool SetFatherPrefix(Pawn pawn, Pawn newFather)
|
||||
{
|
||||
Pawn father = pawn.GetFather();
|
||||
if (father != newFather)
|
||||
{
|
||||
if (father != null)
|
||||
{
|
||||
pawn.relations.RemoveDirectRelation(PawnRelationDefOf.Parent, father);
|
||||
}
|
||||
if (newFather != null)
|
||||
{
|
||||
pawn.relations.AddDirectRelation(PawnRelationDefOf.Parent, newFather);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch("SetMother")]
|
||||
private static bool SetMotherPrefix(Pawn pawn, Pawn newMother)
|
||||
{
|
||||
Pawn mother = pawn.GetMother();
|
||||
if (mother != newMother)
|
||||
{
|
||||
if (mother != null)
|
||||
{
|
||||
pawn.relations.RemoveDirectRelation(PawnRelationDefOf.Parent, mother);
|
||||
}
|
||||
if (newMother != null)
|
||||
{
|
||||
pawn.relations.AddDirectRelation(PawnRelationDefOf.Parent, newMother);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,11 @@ namespace RJW_Genes
|
|||
|
||||
Pawn giver = props.pawn; // orgasmer
|
||||
Pawn receiver = props.partner;
|
||||
|
||||
if (receiver.genes == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Hediff vasectomy;
|
||||
receiver.health.hediffSet.TryGetHediff(vasectomydef, out vasectomy);
|
||||
|
||||
|
@ -40,10 +45,7 @@ namespace RJW_Genes
|
|||
List<Hediff> pawnparts = giver.GetGenitalsList();
|
||||
List<Hediff> partnerparts = receiver.GetGenitalsList();
|
||||
var interaction = rjw.Modules.Interactions.Helpers.InteractionHelper.GetWithExtension(props.dictionaryKey);
|
||||
if (receiver.genes == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!(props.sexType == xxx.rjwSextype.Anal && receiver.genes.HasActiveGene(GeneDefOf.rjw_genes_fertile_anus)))
|
||||
return;
|
||||
|
|
|
@ -55,6 +55,18 @@ namespace RJW_Genes
|
|||
compHediffBodyPart.updatesize(0f);
|
||||
}
|
||||
this.pawn.health.AddHediff(this.additional_genital, part, null, null);
|
||||
foreach (Gene g in pawn.genes.GenesListForReading)
|
||||
{
|
||||
if (g.def.defName == "rjw_genes_hydrolic_genitalia")
|
||||
{
|
||||
g.PostAdd();
|
||||
}
|
||||
if (g.def.defName == "rjw_genes_bionic_genitalia")
|
||||
{
|
||||
g.PostAdd();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040001B0 RID: 432
|
||||
|
|
|
@ -36,6 +36,18 @@ namespace RJW_Genes
|
|||
});
|
||||
GenderUtility.AdjustBodyToTargetGender(pawn, Gender.Female);
|
||||
}
|
||||
foreach(Gene g in pawn.genes.GenesListForReading)
|
||||
{
|
||||
if(g.def.defName== "rjw_genes_hydrolic_genitalia")
|
||||
{
|
||||
g.PostAdd();
|
||||
}
|
||||
if (g.def.defName == "rjw_genes_bionic_genitalia")
|
||||
{
|
||||
g.PostAdd();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Notify_OnPawnGeneration()
|
||||
|
|
|
@ -36,6 +36,18 @@ namespace RJW_Genes
|
|||
});
|
||||
GenderUtility.AdjustBodyToTargetGender(pawn, Gender.Male);
|
||||
}
|
||||
foreach (Gene g in pawn.genes.GenesListForReading)
|
||||
{
|
||||
if (g.def.defName == "rjw_genes_hydrolic_genitalia")
|
||||
{
|
||||
g.PostAdd();
|
||||
}
|
||||
if (g.def.defName == "rjw_genes_bionic_genitalia")
|
||||
{
|
||||
g.PostAdd();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Notify_OnPawnGeneration()
|
||||
|
|
|
@ -11,5 +11,8 @@ namespace RJW_Genes
|
|||
public HediffDef_PartBase vagina;
|
||||
|
||||
public HediffDef_PartBase anus;
|
||||
|
||||
public HediffDef_PartBase breasts;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace RJW_Genes
|
|||
Apply();
|
||||
}
|
||||
|
||||
protected virtual void Apply()
|
||||
public virtual void Apply()
|
||||
{
|
||||
if (this.Active)
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ namespace RJW_Genes
|
|||
ModLog.Error($"Gene {def} failed to change genitals - Need a modExtension with Class=\"{typeof(GenitaliaTypeExtension).FullName}\".");
|
||||
return;
|
||||
}
|
||||
GenitaliaChanger.ChangeGenitalia(pawn, genitals.penis, genitals.vagina, genitals.anus);
|
||||
GenitaliaChanger.ChangeGenitalia(pawn, genitals.penis, genitals.vagina, genitals.anus, genitals.breasts);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
using RimWorld;
|
||||
using Verse;
|
||||
using System.Collections.Generic;
|
||||
using rjw.Modules.Interactions.DefModExtensions;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
|
@ -16,7 +17,7 @@ namespace RJW_Genes
|
|||
/// <param name="penisReplacement">the new type of penis</param>
|
||||
/// <param name="vaginaReplacement">the new type of vagina</param>
|
||||
/// <param name="anusReplacement">the new type of anus</param>
|
||||
public static void ChangeGenitalia(Pawn pawn, HediffDef penisReplacement = null, HediffDef vaginaReplacement = null, HediffDef anusReplacement = null)
|
||||
public static void ChangeGenitalia(Pawn pawn, HediffDef penisReplacement = null, HediffDef vaginaReplacement = null, HediffDef anusReplacement = null , HediffDef breastsReplacement = null)
|
||||
{
|
||||
var oldParts = Genital_Helper.get_AllPartsHediffList(pawn);
|
||||
BodyPartRecord correctBPR;
|
||||
|
@ -40,6 +41,12 @@ namespace RJW_Genes
|
|||
if (Genital_Helper.is_vagina(existingGenital) && vaginaReplacement != null && existingGenital.def != vaginaReplacement)
|
||||
replacementGenital = HediffMaker.MakeHediff(vaginaReplacement, pawn, correctBPR);
|
||||
|
||||
if (is_breast(existingGenital) && breastsReplacement != null && existingGenital.def != breastsReplacement)
|
||||
{
|
||||
correctBPR = Genital_Helper.get_breastsBPR(pawn);
|
||||
replacementGenital = HediffMaker.MakeHediff(breastsReplacement, pawn, correctBPR);
|
||||
}
|
||||
|
||||
if (IsAnus(existingGenital) && anusReplacement != null && existingGenital.def != anusReplacement)
|
||||
{
|
||||
correctBPR = Genital_Helper.get_anusBPR(pawn);
|
||||
|
@ -74,7 +81,18 @@ namespace RJW_Genes
|
|||
{
|
||||
return candidate.def.defName.ToLower().Contains("anus"); }
|
||||
|
||||
public static bool IsArtificial(Hediff candidate)
|
||||
|
||||
public static bool is_breast(Hediff hed)
|
||||
{
|
||||
if (!GenitalPartExtension.TryGet(hed, out var ext))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return ext.family == rjw.Modules.Interactions.Enums.GenitalFamily.Breasts;
|
||||
}
|
||||
|
||||
public static bool IsArtificial(Hediff candidate)
|
||||
{
|
||||
return candidate.def.defName.ToLower().Contains("bionic") || candidate.def.defName.ToLower().Contains("archo");
|
||||
}
|
||||
|
@ -88,5 +106,7 @@ namespace RJW_Genes
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,12 +16,11 @@ namespace RJW_Genes
|
|||
/// <returns>The first GeneDef of the pawn related to GenitaliaTypes</returns>
|
||||
public static GeneDef GetGenitaliaTypeGeneForPawn(Pawn pawn)
|
||||
{
|
||||
|
||||
foreach (var gene in pawn.genes.GenesListForReading)
|
||||
{
|
||||
foreach (var gene in pawn.genes.GenesListForReading)
|
||||
{
|
||||
if (gene is Gene_GenitaliaType)
|
||||
if (!gene.Overridden)
|
||||
return gene.def;
|
||||
return gene.def;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -46,23 +45,7 @@ namespace RJW_Genes
|
|||
|
||||
public static HediffDef GetBreastsForGene(GeneDef gene)
|
||||
{
|
||||
if (gene == null)
|
||||
return Genital_Helper.average_breasts;
|
||||
|
||||
switch (gene.defName)
|
||||
{
|
||||
//TODO: Do I want the default to be generic or average?
|
||||
case "rjw_genes_equine_genitalia": return Genital_Helper.average_breasts;
|
||||
case "rjw_genes_canine_genitalia": return Genital_Helper.average_breasts;
|
||||
case "rjw_genes_feline_genitalia": return Genital_Helper.average_breasts;
|
||||
case "rjw_genes_demonic_genitalia": return Genital_Helper.average_breasts;
|
||||
case "rjw_genes_dragon_genitalia": return Genital_Helper.average_breasts;
|
||||
case "rjw_genes_slime_genitalia": return Genital_Helper.slime_breasts;
|
||||
case "rjw_genes_udder_breasts": return Genital_Helper.udder_breasts;
|
||||
case "rjw_genes_ovipositor_genitalia": return Genital_Helper.average_breasts;
|
||||
|
||||
default: return Genital_Helper.average_breasts;
|
||||
}
|
||||
return gene?.GetModExtension<GenitaliaTypeExtension>()?.breasts ?? Genital_Helper.average_breasts;
|
||||
}
|
||||
|
||||
public static bool PawnStillNeedsGenitalia(Pawn pawn)
|
||||
|
|
13
Source/Genes/QuirkPatching/Defs/QirkExtension.cs
Normal file
13
Source/Genes/QuirkPatching/Defs/QirkExtension.cs
Normal file
|
@ -0,0 +1,13 @@
|
|||
using Verse;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
using System;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class QirkExtension : DefModExtension
|
||||
{
|
||||
public String Satisfiedquirk;
|
||||
|
||||
}
|
||||
}
|
60
Source/Genes/QuirkPatching/QuirkPatcher.cs
Normal file
60
Source/Genes/QuirkPatching/QuirkPatcher.cs
Normal file
|
@ -0,0 +1,60 @@
|
|||
using Verse;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
using System.Collections.Generic;
|
||||
using rjw.Modules.Quirks;
|
||||
using System;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class QuirkPatcher
|
||||
{
|
||||
public static void CountSatisfiedPostfix(ref int __result, SexProps props)
|
||||
{
|
||||
Pawn pawn = props.pawn;
|
||||
Pawn partner = props.partner;
|
||||
if(pawn!=null && partner != null)
|
||||
{
|
||||
if(!pawn.IsHuman()||!partner.IsHuman())
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
int count = -1;
|
||||
List<string> listquirk = new List<string>();
|
||||
string s;
|
||||
foreach (Gene g in partner.genes.GenesListForReading)
|
||||
{
|
||||
if (partner.genes.HasActiveGene(g.def))
|
||||
{
|
||||
s = null;
|
||||
s = g.def?.GetModExtension<QirkExtension>()?.Satisfiedquirk;
|
||||
if (!string.IsNullOrEmpty(s))
|
||||
{
|
||||
listquirk.Add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (Quirk q in Quirk.All)
|
||||
{
|
||||
if (pawn.Has(q))
|
||||
{
|
||||
|
||||
foreach (string s2 in listquirk)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(s2))
|
||||
if (q.LocaliztionKey==s2)
|
||||
{
|
||||
count++;
|
||||
Quirk.AddThought(pawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(count>0)__result = __result + count;
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
using HarmonyLib;
|
||||
using RimWorld;
|
||||
using RimWorld.BaseGen;
|
||||
using RimWorld.QuestGen;
|
||||
using rjw;
|
||||
using rjw.Modules.Shared.Extensions;
|
||||
|
@ -10,6 +11,7 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
|
||||
|
@ -24,13 +26,19 @@ namespace RJW_Genes
|
|||
|
||||
private const float SEVERITY_INCREASE_PER_ORGASM = 0.075f;
|
||||
|
||||
public static void Postfix(JobDriver_Sex __instance)
|
||||
public static void Postfix(JobDriver_Sex __instance)
|
||||
{
|
||||
Pawn orgasmingPawn = __instance.pawn;
|
||||
if (orgasmingPawn != null && GeneUtility.HasGeneNullCheck(orgasmingPawn, GeneDefOf.rjw_genes_sexual_mytosis) && ! orgasmingPawn.health.hediffSet.HasHediff(HediffDefOf.rjw_genes_mytosis_shock_hediff))
|
||||
bool hasPollutedMytosis = false;
|
||||
|
||||
if (orgasmingPawn != null && (GeneUtility.HasGeneNullCheck(orgasmingPawn, GeneDefOf.rjw_genes_sexual_mytosis) || hasPollutedMytosis) && ! orgasmingPawn.health.hediffSet.HasHediff(HediffDefOf.rjw_genes_mytosis_shock_hediff))
|
||||
{
|
||||
var mytosisHediff = GetOrgasmMytosisHediff(orgasmingPawn);
|
||||
mytosisHediff.Severity += SEVERITY_INCREASE_PER_ORGASM;
|
||||
if(hasPollutedMytosis && orgasmingPawn.Spawned && GridsUtility.IsPolluted(orgasmingPawn.Position, orgasmingPawn.Map))
|
||||
{
|
||||
mytosisHediff.Severity -= SEVERITY_INCREASE_PER_ORGASM;
|
||||
}
|
||||
|
||||
if (mytosisHediff.Severity >= 1.0)
|
||||
{
|
||||
|
@ -295,6 +303,8 @@ namespace RJW_Genes
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -4,12 +4,14 @@ using System;
|
|||
using rjw;
|
||||
using RJWLoveFeeding;
|
||||
using RimWorld;
|
||||
using System.Linq;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
[StaticConstructorOnStartup]
|
||||
internal static class HarmonyInit
|
||||
{
|
||||
public static Type Gene_Randomizer_Instance = null;
|
||||
static HarmonyInit()
|
||||
{
|
||||
Harmony harmony = new Harmony("rjw_genes");
|
||||
|
@ -22,32 +24,39 @@ namespace RJW_Genes
|
|||
{
|
||||
harmony.Patch(typeof(SexUtility).GetMethod("ProcessSex"), new HarmonyMethod(typeof(LustFeeding), "Postfix", null));
|
||||
}
|
||||
// Non-rapist would_rape bypass for limbic stimulator
|
||||
harmony.Patch(AccessTools.Method(typeof(SexAppraiser), nameof(SexAppraiser.would_rape)),
|
||||
postfix: new HarmonyMethod(typeof(PatchImplants), nameof(PatchImplants.would_rape_PostFix)));
|
||||
|
||||
// Non-rapist is_rapist bypass for limbic stimulator
|
||||
harmony.Patch(AccessTools.Method(typeof(xxx), nameof(xxx.is_rapist)),
|
||||
postfix: new HarmonyMethod(typeof(PatchImplants), nameof(PatchImplants.is_rapist_PostFix)));
|
||||
|
||||
// Non-Rapist trait rape thoughts
|
||||
harmony.Patch(AccessTools.Method(typeof(AfterSexUtility), nameof(AfterSexUtility.think_about_sex_Rapist)),
|
||||
postfix: new HarmonyMethod(typeof(PatchImplants), nameof(PatchImplants.think_about_sex_Rapist_PostFix)));
|
||||
|
||||
// Bioscaffold double gestation speed tick
|
||||
harmony.Patch(AccessTools.Method(typeof(PawnUtility), nameof(PawnUtility.BodyResourceGrowthSpeed)),
|
||||
postfix: new HarmonyMethod(typeof(PatchImplants), nameof(PatchImplants.MultiplyPregnancy)));
|
||||
|
||||
// Hediff_Labor state capture
|
||||
harmony.Patch(AccessTools.Method(typeof(Hediff_Labor), nameof(Hediff_Labor.PostRemoved)),
|
||||
postfix: new HarmonyMethod(typeof(PatchLitteredBirth), nameof(PatchLitteredBirth.Hediff_Labor_PostRemovedPostFix)));
|
||||
|
||||
// OvaryAgitator/Gene_LitteredBirths multibirth logic
|
||||
harmony.Patch(AccessTools.Method(typeof(Hediff_LaborPushing), nameof(Hediff_LaborPushing.PostRemoved)),
|
||||
postfix: new HarmonyMethod(typeof(PatchLitteredBirth), nameof(PatchLitteredBirth.Hediff_LaborPushing_PostRemovedPostFix)));
|
||||
// Patch Licentia, if Licentia exists
|
||||
// Logic & Explanation taken from https://rimworldwiki.com/wiki/Modding_Tutorials/Compatibility_with_DLLs
|
||||
// Adjusted to use ModsConfig (which makes it work, the example above does not run out of the box)
|
||||
|
||||
harmony.Patch(AccessTools.Method(typeof(Quirk), nameof(Quirk.CountSatisfiedQuirks)),
|
||||
postfix: new HarmonyMethod(typeof(QuirkPatcher), nameof(QuirkPatcher.CountSatisfiedPostfix)));
|
||||
|
||||
/*
|
||||
try
|
||||
{
|
||||
Gene_Randomizer_Instance = (from asm in AppDomain.CurrentDomain.GetAssemblies()
|
||||
from type in asm.GetTypes()
|
||||
where type.IsClass && type.Name == "Gene_Randomizer"
|
||||
select type).Single();
|
||||
}
|
||||
catch (Exception ex) { }
|
||||
Def mytosis_mutation = DefDatabase<GeneDef>.GetNamed("rjw_genes_mytosis_mutation", false);
|
||||
if (mytosis_mutation != null)
|
||||
{
|
||||
harmony.Patch(AccessTools.Method(Gene_Randomizer_Instance, "PostAdd"),
|
||||
prefix: new HarmonyMethod(typeof(Patch_Waster), nameof(Patch_Waster.Gene_Randomizer_Prefix)));
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace RJW_Genes
|
|||
public static readonly HediffDef OvaryAgitator;
|
||||
public static readonly HediffDef Bioscaffold;
|
||||
|
||||
public static HediffDef NeedlePenis = HediffDef.Named("NeedlePenis");
|
||||
/*public static HediffDef NeedlePenis = HediffDef.Named("NeedlePenis");
|
||||
public static HediffDef PigPenis = HediffDef.Named("PigPenis");
|
||||
public static HediffDef MarinePenis = HediffDef.Named("MarinePenis");
|
||||
public static HediffDef TentaclePenis = HediffDef.Named("TentaclePenis");
|
||||
|
@ -34,6 +34,6 @@ namespace RJW_Genes
|
|||
public static HediffDef GhostVagina = HediffDef.Named("GhostVagina");
|
||||
public static HediffDef Vagina = HediffDef.Named("Vagina");
|
||||
public static HediffDef Penis = HediffDef.Named("Penis");
|
||||
public static HediffDef Anus = HediffDef.Named("Anus");
|
||||
public static HediffDef Anus = HediffDef.Named("Anus");*/
|
||||
}
|
||||
}
|
||||
|
|
BIN
Source/RJW.dll
BIN
Source/RJW.dll
Binary file not shown.
Binary file not shown.
|
@ -48,11 +48,13 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Animal_Inheritance\InheritanceUtility.cs" />
|
||||
<Compile Include="Animal_Inheritance\Patches\BasePregnancyPatcher.cs" />
|
||||
<Compile Include="Animal_Inheritance\Patches\Patch_RJW_BestialityPregnancyUtility.cs" />
|
||||
<Compile Include="Animal_Inheritance\Patches\Patch_RJW_HediffInsect_Egg.cs" />
|
||||
<Compile Include="Animal_Inheritance\Patches\Patch_Vanilla_PregnancyUtility.cs" />
|
||||
<Compile Include="Animal_Inheritance\Defs\RaceGeneDef.cs" />
|
||||
<Compile Include="Animal_Inheritance\Defs\RaceGeneDef_Helper.cs" />
|
||||
<Compile Include="Animal_Inheritance\Patches\PregnancyHelperPatcher.cs" />
|
||||
<Compile Include="Animal_Inheritance\Settings\RJW_BGSSettings.cs" />
|
||||
<Compile Include="Animal_Inheritance\Settings\RJW_BGSSettingsController.cs" />
|
||||
<Compile Include="Animal_Inheritance\Defs\BestialityGeneInheritanceDef.cs" />
|
||||
|
@ -161,6 +163,8 @@
|
|||
<Compile Include="Genes\Patches\LustFeeding.cs" />
|
||||
<Compile Include="Genes\Patches\MultiplePregnancies.cs" />
|
||||
<Compile Include="Genes\Patch_AddNotifyOnGeneration.cs" />
|
||||
<Compile Include="Genes\QuirkPatching\Defs\QirkExtension.cs" />
|
||||
<Compile Include="Genes\QuirkPatching\QuirkPatcher.cs" />
|
||||
<Compile Include="Genes\Special\Abilities\CompAbilityEffect_CocoonWeaver.cs" />
|
||||
<Compile Include="Genes\Special\Abilities\CompProperties_AbilityCocoonWeaver.cs" />
|
||||
<Compile Include="Genes\Special\Defs\AgeTransferExtension.cs" />
|
||||
|
@ -189,8 +193,6 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="GeneDefs_GenitaliaTypeEndogenes.xml" />
|
||||
<Content Include="RJW.dll" />
|
||||
<Content Include="RJWSexperience.dll" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="0Harmony, Version=2.2.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
|
@ -203,13 +205,12 @@
|
|||
<HintPath>..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="RJW, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<Reference Include="RJW">
|
||||
<HintPath>..\..\rjw\1.5\Assemblies\RJW.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="RJWSexperience">
|
||||
<HintPath>..\..\rjw-sexperience\1.5\Assemblies\RJWSexperience.dll</HintPath>
|
||||
<HintPath>..\..\rjw-sexperience-master\1.5\Assemblies\RJWSexperience.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
|
@ -231,5 +232,8 @@
|
|||
<ItemGroup>
|
||||
<Folder Include="Genes\Gender\Patches\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WCFMetadata Include="Connected Services\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
Loading…
Add table
Add a link
Reference in a new issue