diff --git a/CHANGELOG.md b/CHANGELOG.md index 22ede1f..fce2807 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,20 +1,3 @@ -# 1.1.0 (2023-xx-xx) - -Features: - -- Succubus (see below) -- Orgasm Rush got a Hediff -- Unbreakable Gene -- Age-Transfer and Youth-Fountain per Sex Gene -- Balancing some Genes by changing metabolism and complexity - -Succubus: - -Fixes: - -- Issue with Breast-Size (#8) fixed by lowercasing breast-match (Shabakur) -- Error on Game Load when Licentia Genes are tried to be added to Xenotypes for players without Licentia (#5) - # 1.0.1 (2022-12-20) - Fix issue with Orgasm Rush throwing an Error on Animal Orgasm (Thanks Shabakur) diff --git a/Common/Defs/Genes/GeneDefs_Breeding.xml b/Common/Defs/Genes/GeneDefs_Breeding.xml index bd201cc..fa65c52 100644 --- a/Common/Defs/Genes/GeneDefs_Breeding.xml +++ b/Common/Defs/Genes/GeneDefs_Breeding.xml @@ -8,9 +8,7 @@ Pawns with this gene are able to birth mechanoids unharmed. World/WorldObjects/Expanding/Mechanoids 51 - rjw_genes_breeding - 1 - -1 + rjw_genes_breeding @@ -19,9 +17,7 @@ Pawns with this gene are able to hold more insect eggs. Genes/Icons/More_Egg_Space 52 - rjw_genes_breeding - 1 - -1 + rjw_genes_breeding @@ -31,8 +27,6 @@ World/WorldObjects/Expanding/Insects 53 rjw_genes_breeding - 1 - -1 diff --git a/Common/Defs/Genes/GeneDefs_Damage.xml b/Common/Defs/Genes/GeneDefs_Damage.xml index f2b0e07..b3c21ef 100644 --- a/Common/Defs/Genes/GeneDefs_Damage.xml +++ b/Common/Defs/Genes/GeneDefs_Damage.xml @@ -8,25 +8,7 @@ This Xenotype cannot get stretched by huge penetrators. Genes/Icons/Elasticity RJW_Genes.Gene_Elasticity - -1 - 1 1 - - rjw_genes_unbreakable - - rjw_genes_damage - This Gene makes the Carrier unable to get mood or social penalties from being raped and they cannot be broken for a long period of time. - UI/Icons/Rituals/TrialDefend - 2 - -1 - 1 - - RJW_Genes.Gene_Unbreakable - -
  • FeelingBroken
  • -
    -
    - \ No newline at end of file diff --git a/Common/Defs/Genes/GeneDefs_Reproduction.xml b/Common/Defs/Genes/GeneDefs_Reproduction.xml index 614bb38..ef348fd 100644 --- a/Common/Defs/Genes/GeneDefs_Reproduction.xml +++ b/Common/Defs/Genes/GeneDefs_Reproduction.xml @@ -21,7 +21,6 @@ Reproduction Xenotypes with this Gene are Rapists. Genes/Icons/Rape - 1 2
  • diff --git a/Common/Defs/Genes/GeneDefs_SexSpecial.xml b/Common/Defs/Genes/GeneDefs_SexSpecial.xml index 3257882..51d4269 100644 --- a/Common/Defs/Genes/GeneDefs_SexSpecial.xml +++ b/Common/Defs/Genes/GeneDefs_SexSpecial.xml @@ -6,31 +6,8 @@ rjw_genes_special On Orgasm, carriers of this gene get a boost in activity. (rest-need is partially filled) 1 - -2 UI/Memes/FleshPurity 1 - - rjw_genes_youth_fountain - - rjw_genes_special - Having sex with a carrier of this gene makes the partner slightly younger. (Partner stays adult) - 2 - -2 - UI/Ideoligions/FireLeaves - 2 - - - - rjw_genes_sex_age_drain - - rjw_genes_special - Having sex transfers some of the partners life-time to themselves. (Pawn stays adult) - 2 - -1 - UI/Icons/ColonistBar/Idle - 3 - - \ No newline at end of file diff --git a/Common/Defs/HediffDefs/Hediffs_OrgasmRush.xml b/Common/Defs/HediffDefs/Hediffs_OrgasmRush.xml deleted file mode 100644 index f68663f..0000000 --- a/Common/Defs/HediffDefs/Hediffs_OrgasmRush.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - rjw_genes_orgasm_rush_hediff - HediffWithComps - - Xenotypes with this Gene are pushed beyond normal limits when they have an orgasm. - (240,200,110) - false - 1.0 - false - false - -
  • - -0.75 -
  • - - -
  • - - - 4 - 4 - - -
  • - Consciousness - 0.05 -
  • - - -
  • - - 0.4 - - 8 - 8 - - -
  • - Moving - 0.08 -
  • -
  • - Consciousness - 0.08 -
  • - - -
  • - - 0.7 - - 10 - 10 - - -
  • - Moving - 0.1 -
  • -
  • - Consciousness - 0.1 -
  • -
  • - BloodPumping - 0.1 -
  • - - - -
    - - - - diff --git a/Common/Patches/Genes/Patch_Unbreakable.xml b/Common/Patches/Genes/Patch_Unbreakable.xml deleted file mode 100644 index a2d674a..0000000 --- a/Common/Patches/Genes/Patch_Unbreakable.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - Defs/ThoughtDef[defName="FeelingBroken"] - - -
  • rjw_genes_unbreakable
  • -
    -
    -
    - - - - Defs/ThoughtDef[defName="GotRaped"] - - -
  • rjw_genes_unbreakable
  • -
    -
    -
    - - - Defs/ThoughtDef[defName="GotAnalRaped"] - - -
  • rjw_genes_unbreakable
  • -
    -
    -
    - - - Defs/ThoughtDef[defName="GotAnalRapedByFemale"] - - -
  • rjw_genes_unbreakable
  • -
    -
    -
    - - - Defs/ThoughtDef[defName="GotRapedUnconscious"] - - -
  • rjw_genes_unbreakable
  • -
    -
    -
    - - - Defs/ThoughtDef[defName="HateMyRapist"] - - -
  • rjw_genes_unbreakable
  • -
    -
    -
    - - - Defs/ThoughtDef[defName="AllowedMeToGetRaped"] - - -
  • rjw_genes_unbreakable
  • -
    -
    -
    - -
    \ No newline at end of file diff --git a/Common/Patches/Xenotypes/GenitaliaUpdate.xml b/Common/Patches/Xenotypes/GenitaliaUpdate.xml index 0a1f3e9..f0af1b5 100644 --- a/Common/Patches/Xenotypes/GenitaliaUpdate.xml +++ b/Common/Patches/Xenotypes/GenitaliaUpdate.xml @@ -1,6 +1,44 @@ + + + Defs/XenotypeDef[defName="Neanderthal"]/genes @@ -36,21 +74,8 @@ Defs/XenotypeDef[defName="Highmate"]/genes
  • rjw_genes_hypersexual
  • -
    -
    - - - - -
  • LustLicentia.RJWLabs
  • -
    - - Defs/XenotypeDef[defName="Highmate"]/genes -
  • rjw_genes_likes_cumflation
  • -
    diff --git a/Source/Animal_Inheritance/First.cs b/Source/Animal_Inheritance/First.cs new file mode 100644 index 0000000..8194ab3 --- /dev/null +++ b/Source/Animal_Inheritance/First.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using rjw; +using Verse; +using RimWorld; + +namespace RJW_BGS +{ + [StaticConstructorOnStartup] + internal static class First + { + static First() + { + //RJWcopy.Racegroupdictbuilder(); + //Prints all found race dicts (debugging only) + //logAllFoundRaceGroupGenes + + } + + private static void logAllFoundRaceGroupGenes() + { + foreach (RaceGroupDef def in DefDatabase.AllDefs) + { + Log.Message("defName = " + def.defName); + if (def.raceNames != null) + { + foreach (string race in def.raceNames) + { + Log.Message(race); + } + } + } + } + } +} diff --git a/Source/Animal_Inheritance/InheritanceUtility.cs b/Source/Animal_Inheritance/InheritanceUtility.cs index 1af9e8a..1996589 100644 --- a/Source/Animal_Inheritance/InheritanceUtility.cs +++ b/Source/Animal_Inheritance/InheritanceUtility.cs @@ -5,7 +5,6 @@ using System.Text; using System.Threading.Tasks; using Verse; using RimWorld; -using rjw; namespace RJW_BGS { @@ -116,22 +115,5 @@ namespace RJW_BGS } } - /// - /// Used only for debugging, to see what you loaded and how it looks. - /// - private static void logAllFoundRaceGroupGenes() - { - foreach (RaceGroupDef def in DefDatabase.AllDefs) - { - Log.Message("defName = " + def.defName); - if (def.raceNames != null) - { - foreach (string race in def.raceNames) - { - Log.Message(race); - } - } - } - } } } diff --git a/Source/Animal_Inheritance/PatchRJWBestialityPregnancyUtility.cs b/Source/Animal_Inheritance/PatchRJWBestialityPregnancyUtility.cs index b6b228b..5224c4f 100644 --- a/Source/Animal_Inheritance/PatchRJWBestialityPregnancyUtility.cs +++ b/Source/Animal_Inheritance/PatchRJWBestialityPregnancyUtility.cs @@ -25,21 +25,20 @@ namespace RJW_BGS baby.genes = new Pawn_GeneTracker(baby); } - //Remove the hair and skin genes pawns always start with, should get correct ones from human parent anyway. for (int i = baby.genes.Endogenes.Count - 1; i >= 0; i--) { baby.genes.RemoveGene(baby.genes.Endogenes[i]); } - List humangenes = PregnancyUtility.GetInheritedGenes(dad, mother); + List genes = PregnancyUtility.GetInheritedGenes(dad, mother); List beastgenes = InheritanceUtility.AnimalInheritedGenes(dad, mother); InheritanceUtility.AddGenes(baby, beastgenes); - InheritanceUtility.AddGenes(baby, humangenes); - - // The mix-breed babies should be labelled hybrids - baby.genes.hybrid = true; - baby.genes.xenotypeName = "Hybrid"; + InheritanceUtility.AddGenes(baby, genes); + //foreach (GeneDef gene in genes) + //{ + // baby.genes.AddGene(gene, false); + //} } } } diff --git a/Source/GeneDefOf.cs b/Source/GeneDefOf.cs index d2130af..744eb11 100644 --- a/Source/GeneDefOf.cs +++ b/Source/GeneDefOf.cs @@ -67,14 +67,9 @@ namespace RJW_Genes // Damage & Side Effects [MayRequire("LustLicentia.RJWLabs")] public static readonly GeneDef rjw_genes_elasticity; - public static readonly GeneDef rjw_genes_unbreakable; // Special public static readonly GeneDef rjw_genes_orgasm_rush; - public static readonly GeneDef rjw_genes_youth_fountain; - public static readonly GeneDef rjw_genes_sex_age_drain; - - public static readonly HediffDef rjw_genes_orgasm_rush_hediff; } } diff --git a/Source/Genes/Breeding/Patch_EggFertilization.cs b/Source/Genes/Breeding/Patch_EggFertilization.cs index d2f2dcf..46ec598 100644 --- a/Source/Genes/Breeding/Patch_EggFertilization.cs +++ b/Source/Genes/Breeding/Patch_EggFertilization.cs @@ -14,8 +14,9 @@ namespace RJW_Genes /// Normal Egg-Pregnancy logic is in https://gitgud.io/Ed86/rjw/-/blob/master/1.4/Source/Modules/Pregnancy/Pregnancy_Helper.cs /// [HarmonyPatch(typeof(SexUtility), "Aftersex")] - static class Patch_EggFertilization + static class PatchEggFertilizationHelper { + [HarmonyTranspiler] public static void Postfix(SexProps props) { // Only Fertilize on vaginal / anal sex @@ -58,7 +59,7 @@ namespace RJW_Genes } - private static bool canDoEggFertilization(Pawn a, Pawn b) + private static Boolean canDoEggFertilization(Pawn a, Pawn b) { // No Partner / Other Errors diff --git a/Source/Genes/Damage/Gene_Elasticity.cs b/Source/Genes/Damage/Gene_Elasticity.cs index 5d92b51..603a18d 100644 --- a/Source/Genes/Damage/Gene_Elasticity.cs +++ b/Source/Genes/Damage/Gene_Elasticity.cs @@ -10,6 +10,8 @@ namespace RJW_Genes /// public class Gene_Elasticity : Gene { + + private int ticksToReset = RESET_INTERVAL; private const int RESET_INTERVAL = 60000; // 60k should be 1 day public override void PostAdd() @@ -24,8 +26,11 @@ namespace RJW_Genes public override void Tick() { base.Tick(); - if (pawn.IsHashIntervalTick(RESET_INTERVAL)) - ResetSeverity(); + --this.ticksToReset; + if (this.ticksToReset > 0) + return; + this.ticksToReset = RESET_INTERVAL; + ResetSeverity(); } public override void PostRemove() diff --git a/Source/Genes/Damage/Gene_Unbreakable.cs b/Source/Genes/Damage/Gene_Unbreakable.cs deleted file mode 100644 index 2ebdad3..0000000 --- a/Source/Genes/Damage/Gene_Unbreakable.cs +++ /dev/null @@ -1,41 +0,0 @@ -using LicentiaLabs; -using rjw; -using Verse; - -namespace RJW_Genes -{ - /// - /// This Gene regularly removes the broken hediff of a pawn. - /// Blocking / Removing thoughts are done in an XML Patch. - /// - public class Gene_Unbreakable : Gene - { - /// DevNote: I first tried to Harmony-Postfix the AfterSexUtility and never add it - but that failed? - - private const int RESET_INTERVAL = 30000; // 30k should be 0.5 day - public override void PostAdd() - { - base.PostAdd(); - RemoveBrokenHediff(); - } - - public override void Tick() - { - base.Tick(); - if (pawn.IsHashIntervalTick(RESET_INTERVAL)) - RemoveBrokenHediff(); - } - - - - private void RemoveBrokenHediff() - { - // Clean-Up of existing feeling brokens - var maybeBrokenHediff = pawn.health.hediffSet.GetFirstHediffOfDef(xxx.feelingBroken); - if (maybeBrokenHediff != null) - { - pawn.health.RemoveHediff(maybeBrokenHediff); - } - } - } -} diff --git a/Source/Genes/GeneUtility.cs b/Source/Genes/GeneUtility.cs index 07a5c24..ce022ba 100644 --- a/Source/Genes/GeneUtility.cs +++ b/Source/Genes/GeneUtility.cs @@ -23,24 +23,6 @@ namespace RJW_Genes return pawn.genes.HasGene(GeneDefOf.rjw_genes_insectincubator); } - public static bool IsYouthFountain(Pawn pawn) - { - if (pawn.genes == null) - { - return false; - } - return pawn.genes.HasGene(GeneDefOf.rjw_genes_youth_fountain); - } - - internal static bool IsAgeDrainer(Pawn pawn) - { - if (pawn.genes == null) - { - return false; - } - return pawn.genes.HasGene(GeneDefOf.rjw_genes_sex_age_drain); - } - public static bool IsInsectBreeder(Pawn pawn) { if (pawn.genes == null) @@ -85,15 +67,5 @@ namespace RJW_Genes } return pawn.genes.HasGene(GeneDefOf.rjw_genes_generous_donor); } - - public static bool IsUnbreakable(Pawn pawn) - { - if (pawn.genes == null) - { - return false; - } - return pawn.genes.HasGene(GeneDefOf.rjw_genes_unbreakable); - } - } } \ No newline at end of file diff --git a/Source/Genes/Special/Patch_AgeDrain.cs b/Source/Genes/Special/Patch_AgeDrain.cs deleted file mode 100644 index 981f483..0000000 --- a/Source/Genes/Special/Patch_AgeDrain.cs +++ /dev/null @@ -1,38 +0,0 @@ -using HarmonyLib; -using rjw; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace RJW_Genes.Genes.Special -{ - [HarmonyPatch(typeof(SexUtility), "Aftersex")] - public static class Patch_AgeDrain - { - - const long AGE_TRANSFERED = 120000; // 120k == 2 days - - // Comment Below in for debugging, changes years - // const long AGE_TRANSFERED = 6000000; // 6000k == 100 days - public static void Postfix(SexProps props) - { - if (props == null || props.pawn == null || props.partner == null || props.partner.IsAnimal() ) - { - return; - } - if (GeneUtility.IsAgeDrainer(props.pawn)) - { - var pawnAge = props.pawn.ageTracker.AgeBiologicalTicks; - var pawnMinAge = props.pawn.ageTracker.AdultMinAgeTicks; - - // Make Partner older - props.partner.ageTracker.AgeBiologicalTicks += AGE_TRANSFERED; - // Make Pawn younger - props.pawn.ageTracker.AgeBiologicalTicks = Math.Max(pawnMinAge, pawnAge - AGE_TRANSFERED); - } - - } - } -} diff --git a/Source/Genes/Special/Patch_OrgasmRush.cs b/Source/Genes/Special/Patch_OrgasmRush.cs index fefcb7a..0b881f2 100644 --- a/Source/Genes/Special/Patch_OrgasmRush.cs +++ b/Source/Genes/Special/Patch_OrgasmRush.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Verse; namespace RJW_Genes { @@ -15,7 +14,6 @@ namespace RJW_Genes { private const float REST_INCREASE = 0.05f; - private const float ORGASMS_NEEDED_FOR_SUPERCHARGE = 3.0f; public static void Postfix(SexProps props) { @@ -25,37 +23,9 @@ namespace RJW_Genes if (props.pawn.genes != null && props.pawn.genes.HasGene(GeneDefOf.rjw_genes_orgasm_rush)) { - - // Pump up Wake-Ness - if (props.pawn.needs.rest != null) - props.pawn.needs.rest.CurLevel += REST_INCREASE; - - // Add or Update Hediff for Orgasm Rush - Hediff rush = GetOrgasmRushHediff(props.pawn); - float added_severity = props.orgasms / ORGASMS_NEEDED_FOR_SUPERCHARGE; - rush.Severity += added_severity; - // Severity should be capped to 1 by the XML logic - } - - } - - /// - /// Helps to get the Orgasm Rush Hediff of a Pawn. If it does not exist, one is added. - /// - /// The pawn that had the orgasm, for which a hediff is looked up or created. - /// - public static Hediff GetOrgasmRushHediff(Pawn orgasmed) - { - Hediff orgasmRushHediff = orgasmed.health.hediffSet.GetFirstHediffOfDef(GeneDefOf.rjw_genes_orgasm_rush_hediff); - if (orgasmRushHediff == null) - { - orgasmRushHediff = HediffMaker.MakeHediff(GeneDefOf.rjw_genes_orgasm_rush_hediff, orgasmed); - orgasmRushHediff.Severity = 0; - orgasmed.health.AddHediff(orgasmRushHediff); - } - return orgasmRushHediff; + props.pawn.needs.rest.CurLevel += REST_INCREASE; + } } } - } diff --git a/Source/Genes/Special/Patch_Youth_Fountain.cs b/Source/Genes/Special/Patch_Youth_Fountain.cs deleted file mode 100644 index f2c7e13..0000000 --- a/Source/Genes/Special/Patch_Youth_Fountain.cs +++ /dev/null @@ -1,36 +0,0 @@ -using HarmonyLib; -using rjw; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace RJW_Genes.Genes.Special -{ - [HarmonyPatch(typeof(SexUtility), "Aftersex")] - public static class Patch_Youth_Fountain - { - - const long AGE_REDUCTION = 60000; // 60k == 1 day - - // Comment Below in for debugging - //const long AGE_REDUCTION = 6000000; // 6000k == 100 days - public static void Postfix(SexProps props) - { - if (props == null || props.pawn == null || props.partner == null || props.partner.IsAnimal()) - { - return; - } - if (GeneUtility.IsYouthFountain(props.pawn)) - { - var partnerAge = props.partner.ageTracker.AgeBiologicalTicks; - var minAge = props.partner.ageTracker.AdultMinAgeTicks; - - props.partner.ageTracker.AgeBiologicalTicks = Math.Max(minAge, partnerAge - AGE_REDUCTION); - } - - } - - } -} diff --git a/Source/Rjw-Genes.csproj b/Source/Rjw-Genes.csproj index 48ab4dc..c7b5a48 100644 --- a/Source/Rjw-Genes.csproj +++ b/Source/Rjw-Genes.csproj @@ -27,14 +27,16 @@ False - ..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll + ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll + False ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\licentia-labs-master\Assemblies\LicentiaLabs.dll False - ..\..\rjw\1.4\Assemblies\RJW.dll + ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\rjw-master\1.4\Assemblies\RJW.dll + False @@ -49,14 +51,12 @@ - ..\..\..\RimWorldWin64_Data\Managed\UnityEngine.dll + ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.dll False - ..\..\..\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll - - - ..\..\..\RimWorldWin64_Data\Managed\UnityEngine.IMGUIModule.dll + ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll + False