diff --git a/CHANGELOG.md b/CHANGELOG.md index a0963a4..69f9b81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# 1.1.1 + +Changes: + +- Drastically increased mood-penalty for Fertilin-Loss (if the pawn is still too happy, there will never be a breakdown for missing fertilin) +- No-Breast Genes add Nipples +- Featureless Chest Gene (No Nipples at all, adds the RJW Featureless Chest as requested per some Kobold fetishists) + +Fixes: + +- Small and Big Male Genitalia had images wrong way round +- Fertilin should activate at a MinAge of 18 + +**Important**: The Fertilin Changes could throw errors! I tested a bit, but not a lot. +So please reach out if you get something and I will try to fix it ASAP. + # 1.1.0 (2023-03-04) 1.1.0-beta-1 was released on 05.02.2023. diff --git a/Common/Assemblies/Rjw-Genes.dll b/Common/Assemblies/Rjw-Genes.dll index 6ec9a86..bcf809b 100644 Binary files a/Common/Assemblies/Rjw-Genes.dll and b/Common/Assemblies/Rjw-Genes.dll differ diff --git a/Common/Defs/GeneDefs/GeneDefs_ExtraGenitalia.xml b/Common/Defs/GeneDefs/GeneDefs_ExtraGenitalia.xml index c2acd4c..22764ea 100644 --- a/Common/Defs/GeneDefs/GeneDefs_ExtraGenitalia.xml +++ b/Common/Defs/GeneDefs/GeneDefs_ExtraGenitalia.xml @@ -70,7 +70,7 @@ rjw_genes_no_breasts - Females of this do not have a pair of breasts. + Females of this do not have a pair of breasts, but only nipples. Genes/Icons/No_Breasts RJW_Genes.Gene_NoBreasts 706 @@ -106,7 +106,7 @@ rjw_genes_futa - Males of this xenotype grow additional female genitalia, Females grow additional male genitalia. + Males with this gene grow additional female genitalia, females grow additional male genitalia. Genes/Icons/Futa RJW_Genes.Gene_Futa 709 @@ -116,4 +116,16 @@ + + rjw_genes_featureless_chest + + Carriers of this gene do not have breasts or nipples. + Genes/Icons/No_Breasts + RJW_Genes.Gene_FeaturelessChest + 710 + +
  • BreastAmount
  • +
    +
    + \ No newline at end of file diff --git a/Common/Defs/GeneDefs/GeneDefs_GenitaliaSizes.xml b/Common/Defs/GeneDefs/GeneDefs_GenitaliaSizes.xml index cc26c04..c5d8826 100644 --- a/Common/Defs/GeneDefs/GeneDefs_GenitaliaSizes.xml +++ b/Common/Defs/GeneDefs/GeneDefs_GenitaliaSizes.xml @@ -10,7 +10,7 @@ rjw_genes_big_male_genitalia Penises of this Xenotype are bigger.(Resizing takes place at 20th Birthday) - Genes/Icons/Small_Male_Genitalia + Genes/Icons/Big_Male_Genitalia RJW_Genes.Gene_BigMaleGenitalia 751 @@ -22,7 +22,7 @@ rjw_genes_small_male_genitalia Penises of this Xenotype are smaller. (Resizing takes place at 20th Birthday) - Genes/Icons/Big_Male_Genitalia + Genes/Icons/Small_Male_Genitalia RJW_Genes.Gene_SmallMaleGenitalia 753 diff --git a/Common/Defs/GeneDefs/GeneDefs_LifeForce.xml b/Common/Defs/GeneDefs/GeneDefs_LifeForce.xml index cc70eae..e8987d0 100644 --- a/Common/Defs/GeneDefs/GeneDefs_LifeForce.xml +++ b/Common/Defs/GeneDefs/GeneDefs_LifeForce.xml @@ -19,6 +19,7 @@ 0 rjw_genes_fertilin -2 + 18
  • Gives fertilin supply.
  • @@ -43,6 +44,7 @@ rjw_genes_lifeforce 0.15 rjw_genes_fertilin + 18 -1 1 6 diff --git a/Common/Defs/ThoughtDefs/Thoughts_LifeForce.xml b/Common/Defs/ThoughtDefs/Thoughts_LifeForce.xml index f7a3d6b..b3bf297 100644 --- a/Common/Defs/ThoughtDefs/Thoughts_LifeForce.xml +++ b/Common/Defs/ThoughtDefs/Thoughts_LifeForce.xml @@ -39,17 +39,17 @@
  • My bones ache. I really need fertilin. - -10 + -25
  • This hurts bad and I can't stop thinking about sex. I would do anything for some cum. - -15 + -40
  • Can't think. Sex. Sex. Must. Have. Cum. - -20 + -55
  • diff --git a/KNOWN_BUGS.md b/KNOWN_BUGS.md index 3ce055e..ccf7ea8 100644 --- a/KNOWN_BUGS.md +++ b/KNOWN_BUGS.md @@ -54,6 +54,8 @@ Maybe you can also fix it by changing `` in the Male/Fem ## Full-No-Genital-Genes get Genitals later +*Update: Should be addressed with 1.1.1 and not appear anymore* + Error: I added all "no-XXX" genes but my pawn has genitalia on map! Reason: If you go with Full-No-Genitals (No Penis, No Anus, No Breasts, No Vagina) then the pawn spawns without any Genitalia on the map, @@ -63,6 +65,8 @@ however then the RJW base-logic runs the sexualizer. ## Log Pops up for Xenotypes with Female/Male Only Gene +*Update: Should not appear anymore after 1.1 when used with current rjw versions* + Error: When using a Xenotype with the Female only gene, upon refresh it can open the log with the following (red) statement: diff --git a/Source/Genes/ExtraGenitalia/Gene_FeaturelessChest.cs b/Source/Genes/ExtraGenitalia/Gene_FeaturelessChest.cs new file mode 100644 index 0000000..8a93c51 --- /dev/null +++ b/Source/Genes/ExtraGenitalia/Gene_FeaturelessChest.cs @@ -0,0 +1,61 @@ +using Verse; +using rjw; +using RimWorld; + +namespace RJW_Genes +{ + public class Gene_FeaturelessChest : RJW_Gene + { + internal Hediff removed_breasts; + internal Hediff added_nipples; + public override void PostMake() + { + base.PostMake(); + + if (removed_breasts == null) + { + RemoveButStoreBreasts(); + AddFeaturelessBreast(); + } + } + + public override void PostAdd() + { + base.PostAdd(); + + if (removed_breasts == null) + { + RemoveButStoreBreasts(); + AddFeaturelessBreast(); + } + } + + public override void PostRemove() + { + base.PostRemove(); + if (added_nipples != null) + pawn.health.RemoveHediff(added_nipples); + if (removed_breasts != null) + pawn.health.AddHediff(removed_breasts); + } + + internal void RemoveButStoreBreasts() + { + var partBPR = Genital_Helper.get_breastsBPR(pawn); + Hediff breastsToRemove = Genital_Helper.get_AllPartsHediffList(pawn).FindLast(x => GenitaliaUtility.IsBreasts(x)); + + if (breastsToRemove != null) + { + removed_breasts = breastsToRemove; + pawn.health.RemoveHediff(breastsToRemove); + } + } + + internal void AddFeaturelessBreast() + { + var partBPR = Genital_Helper.get_breastsBPR(pawn); + this.added_nipples = pawn.health.AddHediff(Genital_Helper.featureless_chest, partBPR); + } + + } +} diff --git a/Source/Genes/ExtraGenitalia/Gene_NoBreasts.cs b/Source/Genes/ExtraGenitalia/Gene_NoBreasts.cs index ddc75a1..874ff5f 100644 --- a/Source/Genes/ExtraGenitalia/Gene_NoBreasts.cs +++ b/Source/Genes/ExtraGenitalia/Gene_NoBreasts.cs @@ -6,18 +6,15 @@ namespace RJW_Genes { public class Gene_NoBreasts : RJW_Gene { + Hediff breastsToShrink; + internal float oldSize = -1f; - internal Hediff removed_breasts; - - // TODO: This gene only works if another Gene was set specifying the genitalia. - // If it is added later, it still works, but on creation it needs a different - // TODO: If all Genitalia are removed by genes, RJW adds some to the pawns at spawn. IDEA: Add male-nipples ? public override void PostMake() { base.PostMake(); // Breasts are removed for female pawns! - if (GenderUtility.IsFemale(pawn) && removed_breasts == null) + if (GenderUtility.IsFemale(pawn) && oldSize < 0) { RemoveButStoreBreasts(); } @@ -28,7 +25,7 @@ namespace RJW_Genes base.PostAdd(); // Breasts are removed for female pawns! - if (GenderUtility.IsFemale(pawn) && removed_breasts == null) + if (GenderUtility.IsFemale(pawn) && oldSize < 0) { RemoveButStoreBreasts(); } @@ -37,21 +34,33 @@ namespace RJW_Genes public override void PostRemove() { base.PostRemove(); - if(removed_breasts != null) - pawn.health.AddHediff(removed_breasts); + // Re-Add the old breasts + if (oldSize != null) + breastsToShrink.Severity = oldSize; } internal void RemoveButStoreBreasts() { var partBPR = Genital_Helper.get_breastsBPR(pawn); - Hediff breastsToRemove = Genital_Helper.get_AllPartsHediffList(pawn).FindLast(x => GenitaliaUtility.IsBreasts(x)); + breastsToShrink = Genital_Helper.get_AllPartsHediffList(pawn).FindLast(x => GenitaliaUtility.IsBreasts(x)); - if(breastsToRemove != null) + if(breastsToShrink != null) { - removed_breasts = breastsToRemove; - pawn.health.RemoveHediff(breastsToRemove); + oldSize = breastsToShrink.Severity; + //pawn.health.RemoveHediff(breastsToRemove); + breastsToShrink.Severity = 0f; } } + /* + /// + /// Adds a "rjw.featurelesschest", which means nipples but nothing else (like male human pawns do). + /// + internal void AddFeaturelessBreast() + { + var partBPR = Genital_Helper.get_breastsBPR(pawn); + //this.added_nipples = pawn.health.AddHediff(Genital_Helper.featureless_chest, partBPR); + } + */ } } diff --git a/Source/Genes/GeneUtility.cs b/Source/Genes/GeneUtility.cs index 66cfd74..a6361aa 100644 --- a/Source/Genes/GeneUtility.cs +++ b/Source/Genes/GeneUtility.cs @@ -43,7 +43,9 @@ namespace RJW_Genes { if (HasLifeForce(pawn)) { - Gene_LifeForce gene = pawn.genes.GetFirstGeneOfType(); + Gene_LifeForce gene = pawn.genes.GetFirstGeneOfType(); + if (gene == null || !gene.Active) + return false; if (gene.Resource.Value < gene.targetValue) { return true; @@ -57,6 +59,8 @@ namespace RJW_Genes if (HasLifeForce(pawn)) { Gene_LifeForce gene = pawn.genes.GetFirstGeneOfType(); + if (gene == null || !gene.Active) + return false; if (gene.Resource.Value < gene.MinLevelForAlert) { return true; @@ -122,4 +126,27 @@ namespace RJW_Genes public static bool IsCumEater(Pawn pawn) { return HasGeneNullCheck(pawn, GeneDefOf.rjw_genes_cum_eater); } } -} \ No newline at end of file +} + +/* +Exception in Verse.AI.ThinkNode_Priority TryIssueJobPackage: System.NullReferenceException: Object reference not set to an instance of an object + at RJW_Genes.GeneUtility.HasLowLifeForce (Verse.Pawn pawn) [0x00014] in < 881b7541af8144a78a14c9dad08e43c7 >:0 + at RJW_Genes.ThinkNode_ConditionalLowLifeForce.Satisfied(Verse.Pawn p) [0x00000] in < 881b7541af8144a78a14c9dad08e43c7 >:0 + at Verse.AI.ThinkNode_Conditional.TryIssueJobPackage(Verse.Pawn pawn, Verse.AI.JobIssueParams jobParams) [0x00000] in < 38562b1a2ab64eacb931fb5df05ca994 >:0 + at Verse.AI.ThinkNode_Priority.TryIssueJobPackage(Verse.Pawn pawn, Verse.AI.JobIssueParams jobParams) [0x00022] in < 38562b1a2ab64eacb931fb5df05ca994 >:0 +UnityEngine.StackTraceUtility:ExtractStackTrace() +Verse.Log:Error(string) +Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Verse.Pawn, Verse.AI.JobIssueParams) +Verse.AI.ThinkNode_SubtreesByTag:TryIssueJobPackage(Verse.Pawn, Verse.AI.JobIssueParams) +Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Verse.Pawn, Verse.AI.JobIssueParams) +Verse.AI.Pawn_JobTracker:DetermineNextJob(Verse.ThinkTreeDef &) +Verse.AI.Pawn_JobTracker:TryFindAndStartJob() +Verse.AI.Pawn_JobTracker:EndCurrentJob(Verse.AI.JobCondition, bool, bool) +Verse.AI.Pawn_JobTracker:JobTrackerTick() +Verse.Pawn:Tick() +Verse.TickList:Tick() +(wrapper dynamic - method) Verse.TickManager:Verse.TickManager.DoSingleTick_Patch2(Verse.TickManager) +Verse.TickManager:TickManagerUpdate() +Verse.Game:UpdatePlay() +Verse.Root_Play:Update() +*/ \ No newline at end of file diff --git a/Source/Genes/Life_Force/UI/Alert_LowFertilin.cs b/Source/Genes/Life_Force/UI/Alert_LowFertilin.cs index d76d4ce..09601de 100644 --- a/Source/Genes/Life_Force/UI/Alert_LowFertilin.cs +++ b/Source/Genes/Life_Force/UI/Alert_LowFertilin.cs @@ -42,7 +42,7 @@ namespace RJW_Genes { Pawn_GeneTracker genes = pawn.genes; Gene_LifeForce gene_Lifeforce = (genes != null) ? genes.GetFirstGeneOfType() : null; - if (gene_Lifeforce != null && gene_Lifeforce.Value < gene_Lifeforce.MinLevelForAlert) + if (gene_Lifeforce != null && gene_Lifeforce.Active && gene_Lifeforce.Value < gene_Lifeforce.MinLevelForAlert) { this.targets.Add(pawn); this.targetLabels.Add(pawn.NameShortColored.Resolve()); diff --git a/Source/Rjw-Genes.csproj b/Source/Rjw-Genes.csproj index 96bc6f5..a090438 100644 --- a/Source/Rjw-Genes.csproj +++ b/Source/Rjw-Genes.csproj @@ -59,6 +59,7 @@ +