diff --git a/Common/Assemblies/Rjw-Genes.dll b/Common/Assemblies/Rjw-Genes.dll index 354d880..f4a0a25 100644 Binary files a/Common/Assemblies/Rjw-Genes.dll and b/Common/Assemblies/Rjw-Genes.dll differ diff --git a/Common/Defs/AbilityDefs/Ability_NakedProwess.xml b/Common/Defs/AbilityDefs/Ability_NakedProwess.xml new file mode 100644 index 0000000..a5b8ee7 --- /dev/null +++ b/Common/Defs/AbilityDefs/Ability_NakedProwess.xml @@ -0,0 +1,47 @@ + + + + rjw_genes_naked_prowess + + Enhance the strenght and resilience of your naked body with fertilin. + Things/Mote/Heart + Things/Mote/Heart + CastAbilityOnThing + False + False + True + + 126 + 0 + + + Verb_CastAbility + 2 + 0 + False + False + + true + false + false + false + false + false + + + +
  • + CompAbilityEffect_GiveHediff + rjw_genes_naked_prowess + True + true +
  • +
  • +
  • + 0.1 +
  • +
    + + +
    +
    \ No newline at end of file diff --git a/Common/Defs/Genes/GeneDefs_LifeForce.xml b/Common/Defs/Genes/GeneDefs_LifeForce.xml index c0b529b..54f915e 100644 --- a/Common/Defs/Genes/GeneDefs_LifeForce.xml +++ b/Common/Defs/Genes/GeneDefs_LifeForce.xml @@ -151,9 +151,27 @@ + + rjw_genes_naked_prowess + + Carriers of this gene are able to temporarily increase their strenght and resilience, while they are naked. + Things/Mote/Heart + rjw_genes_lifeforce + 13 + rjw_genes_fertilin + +
  • rjw_genes_naked_prowess
  • +
    + + rjw_genes_naked_prowess + + 1 + -1 +
    + rjw_genes_cum_eater - + Carriers of this gene are able to absorb fertilin through eating cum. Things/Mote/Heart rjw_genes_lifeforce diff --git a/Common/Defs/HediffDefs/Hediffs_Fertilin.xml b/Common/Defs/HediffDefs/Hediffs_Fertilin.xml index cb01a23..8020429 100644 --- a/Common/Defs/HediffDefs/Hediffs_Fertilin.xml +++ b/Common/Defs/HediffDefs/Hediffs_Fertilin.xml @@ -136,4 +136,37 @@ + + + rjw_genes_naked_prowess + + Driven by fertilin, this person has greatly increased strength and resilience. + HediffWithComps + +
  • + + + 0.5 + 0.5 + 0.5 + + + + 0.5 + 1.5 + +
  • +
    + +
  • + True + 5000 +
  • +
  • + + + false + + \ No newline at end of file diff --git a/Source/Animal_Inheritance/RaceGeneDef_Helper.cs b/Source/Animal_Inheritance/RaceGeneDef_Helper.cs index f88084d..cd01a47 100644 --- a/Source/Animal_Inheritance/RaceGeneDef_Helper.cs +++ b/Source/Animal_Inheritance/RaceGeneDef_Helper.cs @@ -28,13 +28,16 @@ namespace RJW_BGS ModLog.Warning($"Error looking up PawnKindDef for {pawn.Name} - Could not lookup Animal Inheritance Genes"); return null; } + string raceName = kindDef.race.defName; string pawnKindName = kindDef.defName; + //Wild animals have no name, so we will use pawnkindname instead + string pawnName = pawn.Name != null ? pawn.Name.ToStringFull : pawnKindName; PawnData pawnData = SaveStorage.DataStore.GetPawnData(pawn); RaceGroupDef raceGroupDef = pawnData.RaceSupportDef; if (RJW_BGSSettings.rjw_bgs_detailed_debug) - ModLog.Message($"Looking up Animal-Inheritable Genes for {pawn.Name} with KindDef {kindDef.defName},RaceName {raceName}, PawnKind {pawnKindName} and RaceGroup {raceGroupDef.defName}"); + ModLog.Message($"Looking up Animal-Inheritable Genes for {pawnName} with KindDef {kindDef.defName},RaceName {raceName}, PawnKind {pawnKindName} and RaceGroup {raceGroupDef.defName}"); IEnumerable allDefs = DefDatabase.AllDefs; List pawnKindDefs = allDefs.Where(delegate (RaceGeneDef group) @@ -44,11 +47,11 @@ namespace RJW_BGS }).ToList(); if (pawnKindDefs.Count() > 0) { - DebugPrintRaceGeneDefs("PawnKindDefs",pawn.Name.ToStringFull,pawnKindDefs); + DebugPrintRaceGeneDefs("PawnKindDefs", pawnName,pawnKindDefs); return pawnKindDefs; } else if (RJW_BGSSettings.rjw_bgs_detailed_debug) - ModLog.Message($"Did not find PawnKindDefs for {pawn.Name.ToStringFull}"); + ModLog.Message($"Did not find PawnKindDefs for {pawnName}"); List raceKindDefs = allDefs.Where(delegate (RaceGeneDef group) { @@ -57,11 +60,11 @@ namespace RJW_BGS }).ToList(); if (raceKindDefs.Count() > 0) { - DebugPrintRaceGeneDefs("PawnKindDefs", pawn.Name.ToStringFull, raceKindDefs); + DebugPrintRaceGeneDefs("PawnKindDefs", pawnName, raceKindDefs); return raceKindDefs; } else if (RJW_BGSSettings.rjw_bgs_detailed_debug) - ModLog.Message($"Did not find RaceKindDefs for {pawn.Name.ToStringFull}"); + ModLog.Message($"Did not find RaceKindDefs for {pawnName}"); List raceGroupDefs = new List(); if (raceGroupDef != null) @@ -77,13 +80,13 @@ namespace RJW_BGS if (raceGroupDefs.Count() > 0) { - DebugPrintRaceGeneDefs("RaceKindDefs", pawn.Name.ToStringFull, raceGroupDefs); + DebugPrintRaceGeneDefs("RaceKindDefs", pawnName, raceGroupDefs); return raceGroupDefs; } else if (RJW_BGSSettings.rjw_bgs_detailed_debug) - ModLog.Message($"Did not find RaceGroupDefs for {pawn.Name.ToStringFull}"); + ModLog.Message($"Did not find RaceGroupDefs for {pawnName}"); - ModLog.Message($"Did not find any Genes inheritable for {pawn.Name.ToStringFull}"); + ModLog.Message($"Did not find any Genes inheritable for {pawnName}"); return new List(); } diff --git a/Source/Genes/Life_Force/Abilities/CompAbilityEffect_CasterIsNaked.cs b/Source/Genes/Life_Force/Abilities/CompAbilityEffect_CasterIsNaked.cs new file mode 100644 index 0000000..aa1d61a --- /dev/null +++ b/Source/Genes/Life_Force/Abilities/CompAbilityEffect_CasterIsNaked.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Verse; +using RimWorld; +using Verse.AI; +using rjw; + +namespace RJW_Genes +{ + //Summary// + //Returns invalid if a pawn is not naked + //Summary// + public class CompAbilityEffect_CasterIsNaked : CompAbilityEffect_WithDest + { + private new CompProperties_CasterIsNaked Props + { + get + { + return (CompProperties_CasterIsNaked)this.props; + } + } + + public override bool GizmoDisabled(out string reason) + { + Pawn pawn = this.CasterPawn; + if (pawn != null) + { + //Copied from ThoughtWorker_NudistNude.CurrentStateInternal + List wornApparel = pawn.apparel.WornApparel; + for (int i = 0; i < wornApparel.Count; i++) + { + Apparel apparel = wornApparel[i]; + if (apparel.def.apparel.countsAsClothingForNudity) + { + for (int j = 0; j < apparel.def.apparel.bodyPartGroups.Count; j++) + { + if (apparel.def.apparel.bodyPartGroups[j] == BodyPartGroupDefOf.Torso) + { + reason = pawn.Name + " is not naked"; + return true; + } + if (apparel.def.apparel.bodyPartGroups[j] == BodyPartGroupDefOf.Legs) + { + reason = pawn.Name + " is not naked"; + return true; + + } + } + } + } + } + reason = null; + return false; + } + } +} diff --git a/Source/Genes/Life_Force/Abilities/CompProperties_CasterIsNaked.cs b/Source/Genes/Life_Force/Abilities/CompProperties_CasterIsNaked.cs new file mode 100644 index 0000000..8cb300e --- /dev/null +++ b/Source/Genes/Life_Force/Abilities/CompProperties_CasterIsNaked.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Verse; +using RimWorld; + +namespace RJW_Genes +{ + public class CompProperties_CasterIsNaked : CompProperties_EffectWithDest + { + public CompProperties_CasterIsNaked() + { + this.compClass = typeof(CompAbilityEffect_CasterIsNaked); + } + } +} + diff --git a/Source/Genes/Life_Force/Alert_LowFertilin.cs b/Source/Genes/Life_Force/Alert_LowFertilin.cs index 2fb9fdc..d76d4ce 100644 --- a/Source/Genes/Life_Force/Alert_LowFertilin.cs +++ b/Source/Genes/Life_Force/Alert_LowFertilin.cs @@ -61,10 +61,8 @@ namespace RJW_Genes return AlertReport.CulpritsAre(this.Targets); } - // Token: 0x04004B5C RID: 19292 private List targets = new List(); - // Token: 0x04004B5D RID: 19293 private List targetLabels = new List(); } } diff --git a/Source/Genes/Life_Force/HediffComp_SeverityFromFertilin.cs b/Source/Genes/Life_Force/HediffComp_SeverityFromFertilin.cs index d497d59..d209423 100644 --- a/Source/Genes/Life_Force/HediffComp_SeverityFromFertilin.cs +++ b/Source/Genes/Life_Force/HediffComp_SeverityFromFertilin.cs @@ -49,6 +49,7 @@ namespace RJW_Genes if (this.Pawn.genes.HasGene(GeneDefOf.rjw_genes_cum_eater) || this.Pawn.genes.HasGene(GeneDefOf.rjw_genes_vaginal_absorber) || this.Pawn.genes.HasGene(GeneDefOf.rjw_genes_anal_absorber) || this.Pawn.genes.HasGene(GeneDefOf.rjw_genes_drainer)) { + //TODO: use mentalstatedef instead of mentalbreakdef MentalBreakDef randomrape = GeneDefOf.rjw_genes_lifeforce_randomrape; if (ModsConfig.BiotechActive && this.Pawn.Spawned && !this.Pawn.InMentalState && !this.Pawn.Downed && diff --git a/Source/HarmonyInit.cs b/Source/HarmonyInit.cs index 8c5f3d6..f6f6d74 100644 --- a/Source/HarmonyInit.cs +++ b/Source/HarmonyInit.cs @@ -27,6 +27,7 @@ namespace RJW_Genes // Gene: Generous Donor [Postfix Patch] harmony.Patch(AccessTools.Method(typeof(LicentiaLabs.CumflationHelper), nameof(LicentiaLabs.CumflationHelper.TransferNutrition)), postfix: new HarmonyMethod(typeof(Patch_TransferNutrition), nameof(Patch_TransferNutrition.Postfix))); + //Eat cumflation harmony.Patch(AccessTools.Method(typeof(rjw.JobDriver_Sex), nameof(rjw.JobDriver_Sex.ChangePsyfocus)), postfix: new HarmonyMethod(typeof(Patch_SexTicks_ChangePsyfocus), nameof(Patch_SexTicks_ChangePsyfocus.Postfix))); } diff --git a/Source/Rjw-Genes.csproj b/Source/Rjw-Genes.csproj index 44d8252..07b780b 100644 --- a/Source/Rjw-Genes.csproj +++ b/Source/Rjw-Genes.csproj @@ -125,6 +125,8 @@ + +