diff --git a/About/Manifest.xml b/About/Manifest.xml index abb28e8..e5917d3 100644 --- a/About/Manifest.xml +++ b/About/Manifest.xml @@ -1,7 +1,7 @@ RJWSexperience - 1.1.1.1 + 1.1.1.0
  • RimJobWorld >= 5.0.0.0
  • diff --git a/Assemblies/RJWSexperience.dll b/Assemblies/RJWSexperience.dll index 91fe97f..80dee07 100644 Binary files a/Assemblies/RJWSexperience.dll and b/Assemblies/RJWSexperience.dll differ diff --git a/Source/RJWSexperience/SexHistory/HistoryUtility.cs b/Source/RJWSexperience/SexHistory/HistoryUtility.cs index 9e06c28..359b1a6 100644 --- a/Source/RJWSexperience/SexHistory/HistoryUtility.cs +++ b/Source/RJWSexperience/SexHistory/HistoryUtility.cs @@ -1,6 +1,4 @@ -using RimWorld; -using System; -using UnityEngine; +using UnityEngine; using Verse; namespace RJWSexperience.SexHistory @@ -49,31 +47,11 @@ namespace RJWSexperience.SexHistory Texture2D.linearGrayTexture //? = 20 }; - private static readonly Texture2D[] PassionBG = new Texture2D[] + public static readonly Texture2D[] PassionBG = new Texture2D[] { Texture2D.blackTexture, //None = 0, - SolidColorMaterials.NewSolidColorTexture(0.800f, 0.800f, 0.800f, 1.0f), //Minor = 1, Gray - SolidColorMaterials.NewSolidColorTexture(1.000f, 0.875f, 0.000f, 1.0f), //Major = 2, Golden - Texture2D.blackTexture, // VSE Apathy = 3 - SolidColorMaterials.NewSolidColorTexture(0.500f, 0.875f, 0.000f, 1.0f), //VSE Natural = 4, Light Green - SolidColorMaterials.NewSolidColorTexture(1.000f, 0.375f, 0.000f, 1.0f), //VSE Critical = 5, Reddish + SolidColorMaterials.NewSolidColorTexture(0.800f, 0.800f, 0.800f, 1.0f), //Minor = 1, + SolidColorMaterials.NewSolidColorTexture(1.000f, 0.875f, 0.000f, 1.0f) //Major = 2, }; - - public static Texture2D GetPassionBG(Passion? passion) - { - int passionIndex = (int)(passion ?? 0); - - // Vanilla Skills Expanded adds new passion levels - if (passionIndex < 0) - { - passionIndex = 0; - } - else if (passionIndex >= PassionBG.Length) - { - passionIndex = 0; - } - - return PassionBG[passionIndex]; - } } } diff --git a/Source/RJWSexperience/SexHistory/UI/SexStatus.cs b/Source/RJWSexperience/SexHistory/UI/SexStatus.cs index 4d8c65a..3c35e6f 100644 --- a/Source/RJWSexperience/SexHistory/UI/SexStatus.cs +++ b/Source/RJWSexperience/SexHistory/UI/SexStatus.cs @@ -408,7 +408,7 @@ namespace RJWSexperience.SexHistory.UI tmp = listmain.GetRect(FONTHEIGHT); p = pawn.records.GetValue(VariousDefOf.Lust); - FillableBarLabeled(tmp, String.Format(Keyed.Lust + ": {0:0.00}", p), Mathf.Clamp01(p.Normalization(-SexperienceMod.Settings.LustLimit * 3, SexperienceMod.Settings.LustLimit * 3)), HistoryUtility.Slaanesh, Texture2D.blackTexture, null, String.Format(xxx.sex_drive_stat.LabelCap + ": {0:P2}", pawn.Dead ? 0 : pawn.GetStatValue(xxx.sex_drive_stat))); + FillableBarLabeled(tmp, String.Format(Keyed.Lust + ": {0:0.00}", p), Mathf.Clamp01(p.Normalization(-SexperienceMod.Settings.LustLimit * 3, SexperienceMod.Settings.LustLimit * 3)), HistoryUtility.Slaanesh, Texture2D.blackTexture, null, String.Format(xxx.sex_drive_stat.LabelCap.CapitalizeFirst() + ": {0:P2}", pawn.Dead ? 0 : pawn.GetStatValue(xxx.sex_drive_stat))); listmain.Gap(1f); if (Mouse.IsOver(tmp)) { @@ -458,12 +458,12 @@ namespace RJWSexperience.SexHistory.UI if (p < history.BeenRapedCount) { p = history.BeenRapedCount; - FillableBarLabeled(tmp, String.Format(Keyed.RS_BeenRaped + ": {0}", p), p / 50, Texture2D.grayTexture, Texture2D.blackTexture, null, String.Format(xxx.vulnerability_stat.LabelCap + ": {0:P2}", pawn.Dead ? 0 : pawn.GetStatValue(xxx.vulnerability_stat))); + FillableBarLabeled(tmp, String.Format(Keyed.RS_BeenRaped + ": {0}", p), p / 50, Texture2D.grayTexture, Texture2D.blackTexture, null, String.Format(xxx.vulnerability_stat.LabelCap.CapitalizeFirst() + ": {0:P2}", pawn.Dead ? 0 : pawn.GetStatValue(xxx.vulnerability_stat))); listmain.Gap(1f); } else { - FillableBarLabeled(tmp, String.Format(Keyed.RS_RapedSomeone + ": {0}", p), p / 50, HistoryUtility.Khorne, Texture2D.blackTexture, null, String.Format(xxx.vulnerability_stat.LabelCap + ": {0:P2}", pawn.Dead ? 0 : pawn.GetStatValue(xxx.vulnerability_stat))); + FillableBarLabeled(tmp, String.Format(Keyed.RS_RapedSomeone + ": {0}", p), p / 50, HistoryUtility.Khorne, Texture2D.blackTexture, null, String.Format(xxx.vulnerability_stat.LabelCap.CapitalizeFirst() + ": {0:P2}", pawn.Dead ? 0 : pawn.GetStatValue(xxx.vulnerability_stat))); listmain.Gap(1f); } if (Mouse.IsOver(tmp)) @@ -473,7 +473,7 @@ namespace RJWSexperience.SexHistory.UI p = pawn.Dead ? 0 : pawn.GetStatValue(xxx.sex_satisfaction); tmp = listmain.GetRect(FONTHEIGHT); - FillableBarLabeled(tmp, String.Format(xxx.sex_satisfaction.LabelCap + ": {0:P2}", p), p / 2, HistoryUtility.Satisfaction, Texture2D.blackTexture); + FillableBarLabeled(tmp, String.Format(xxx.sex_satisfaction.LabelCap.CapitalizeFirst() + ": {0:P2}", p), p / 2, HistoryUtility.Satisfaction, Texture2D.blackTexture); listmain.Gap(1f); if (Mouse.IsOver(tmp)) { @@ -483,7 +483,7 @@ namespace RJWSexperience.SexHistory.UI SkillRecord skill = pawn.skills?.GetSkill(VariousDefOf.Sex); p = skill?.Level ?? 0; tmp = listmain.GetRect(FONTHEIGHT); - FillableBarLabeled(tmp, $"{Keyed.RS_SexSkill}: {p}, {skill?.xpSinceLastLevel / skill?.XpRequiredForLevelUp:P2}", p / 20, HistoryUtility.Tzeentch, Texture2D.blackTexture, null, $"{VariousDefOf.SexAbility.LabelCap}: {pawn.GetSexStat():P2}", HistoryUtility.GetPassionBG(skill?.passion)); + FillableBarLabeled(tmp, $"{Keyed.RS_SexSkill}: {p}, {skill?.xpSinceLastLevel / skill?.XpRequiredForLevelUp:P2}", p / 20, HistoryUtility.Tzeentch, Texture2D.blackTexture, null, $"{VariousDefOf.SexAbility.LabelCap.CapitalizeFirst()}: {pawn.GetSexStat():P2}", HistoryUtility.PassionBG[(int)(skill?.passion ?? 0)]); if (Mouse.IsOver(tmp)) { TooltipHandler.TipRegion(tmp, RJWUIUtility.GetStatExplanation(pawn, VariousDefOf.SexAbility, pawn.GetSexStat())); diff --git a/changelogs.txt b/changelogs.txt index 0442592..da66a92 100644 --- a/changelogs.txt +++ b/changelogs.txt @@ -1,6 +1,3 @@ -Version 1.1.1.1 - - Fix sex history window crashing for a pawns with a modded passion - Version 1.1.1.0 - Fix def error when loading game without RJW Cum mod