diff --git a/src/Core_Pregnancy_KK/Data/PregnancyDataUtils.cs b/src/Core_Pregnancy_KK/Data/PregnancyDataUtils.cs index f3baa22..e646aa6 100644 --- a/src/Core_Pregnancy_KK/Data/PregnancyDataUtils.cs +++ b/src/Core_Pregnancy_KK/Data/PregnancyDataUtils.cs @@ -56,19 +56,7 @@ public static HeroineStatus GetCharaStatus(this SaveData.CharaData chara, Pregna { if (pregData == null) pregData = heroine.GetPregnancyData(); - // Check if she wants to tell //todo need to ask in talk scene -#if KK - if (heroine.intimacy >= 80 || - heroine.hCount >= 5 || - heroine.parameter.attribute.bitch && heroine.favor > 50 || - (heroine.isGirlfriend || heroine.favor >= 90) && - (!heroine.isVirgin || heroine.hCount >= 2 || heroine.intimacy >= 40)) -#else - if (heroine.relation >= 3 || - heroine.hCount >= 5 || - heroine.parameter.attribute.bitch && heroine.favor > 50 || - heroine.isGirlfriend && (heroine.favor >= 90 || heroine.hCount >= 2)) -#endif + if (CanShowStatus(heroine)) { var pregnancyWeek = pregData.Week; if (pregnancyWeek > 0) @@ -103,6 +91,39 @@ public static HeroineStatus GetCharaStatus(this SaveData.CharaData chara, Pregna return HeroineStatus.Unknown; } + private static bool CanShowStatus(SaveData.Heroine heroine) + { + // todo add option to ask in talk scene? + switch (PregnancyPlugin.StatusDisplay.Value) + { + case PregnancyPlugin.StatusDisplayCondition.Always: + return true; + case PregnancyPlugin.StatusDisplayCondition.Normal: +#if KK + return heroine.intimacy >= 80 || + heroine.hCount >= 5 || + heroine.parameter.attribute.bitch && heroine.favor > 50 || + (heroine.isGirlfriend || heroine.favor >= 90) && + (!heroine.isVirgin || heroine.hCount >= 2 || heroine.intimacy >= 40); +#else + return heroine.relation >= 3 || + heroine.hCount >= 5 || + heroine.parameter.attribute.bitch && heroine.favor > 50 || + heroine.isGirlfriend && (!heroine.isVirgin || heroine.hCount >= 2 || heroine.favor >= 120); +#endif + case PregnancyPlugin.StatusDisplayCondition.OnlyGirlfriend: +#if KK + return heroine.isGirlfriend && (!heroine.isVirgin || heroine.hCount >= 2 || heroine.intimacy >= 40); +#else + return heroine.isGirlfriend && (!heroine.isVirgin || heroine.hCount >= 2 || heroine.favor >= 120); +#endif + case PregnancyPlugin.StatusDisplayCondition.Never: + return false; + default: + throw new ArgumentOutOfRangeException(); + } + } + internal static IEnumerable GetRelatedChaFiles(this SaveData.CharaData character) { var chafiles = diff --git a/src/Core_Pregnancy_KK/PregnancyPlugin.cs b/src/Core_Pregnancy_KK/PregnancyPlugin.cs index 94386f8..71ce780 100644 --- a/src/Core_Pregnancy_KK/PregnancyPlugin.cs +++ b/src/Core_Pregnancy_KK/PregnancyPlugin.cs @@ -20,12 +20,13 @@ namespace KK_Pregnancy public partial class PregnancyPlugin : BaseUnityPlugin { public const string GUID = "KK_Pregnancy"; - public const string Version = "2.7.1"; + public const string Version = "2.8.0"; public static ConfigEntry ConceptionEnabled { get; private set; } public static ConfigEntry FertilityOverride { get; private set; } public static ConfigEntry AnalConceptionEnabled { get; private set; } public static ConfigEntry ShowPregnancyIconEarly { get; private set; } + public static ConfigEntry StatusDisplay { get; private set; } public static ConfigEntry PregnancyProgressionSpeed { get; private set; } public static ConfigEntry HSceneMenstrIconOverride { get; private set; } @@ -70,6 +71,12 @@ private void Start() "By default pregnancy status icon in class roster is shown after a few days or weeks (the character had a chance to do the test or noticed something is wrong).\n" + "Turning this on will always make the icon show up at the end of the current day."); + StatusDisplay = Config.Bind("General", "When to reveal Risky/Safe/Pregnant status", StatusDisplayCondition.Normal, + "Always: You can immediately see the status of all characters.\n" + + "Normal: You can only see status of characters you are reasonably close with.\n" + + "Only Girlfriend: You can only see status of your girlfriends (other requirements might also apply).\n" + + "Never: The status is always shown as Unknown."); + HSceneMenstrIconOverride = Config.Bind("General", "Use custom safe/risky icons in H Scenes", true, "Replaces the standard safe/risky indicators with custom indicators that can also show pregnancy and unknown status. " + "If the status is unknown you will have to listen for the voice cues instead.\nChanges take effect after game restart."); @@ -136,5 +143,13 @@ internal static PregnancyCharaController GetEffectController(SaveData.Heroine he { return heroine?.chaCtrl != null ? heroine.chaCtrl.GetComponent() : null; } + + public enum StatusDisplayCondition + { + Always, + Normal, + OnlyGirlfriend, + Never + } } } diff --git a/src/KKS_Pregnancy/GUI/PregnancyGui.StatusIcons.cs b/src/KKS_Pregnancy/GUI/PregnancyGui.StatusIcons.cs index 92714de..ae20f06 100644 --- a/src/KKS_Pregnancy/GUI/PregnancyGui.StatusIcons.cs +++ b/src/KKS_Pregnancy/GUI/PregnancyGui.StatusIcons.cs @@ -83,9 +83,21 @@ private static void OnGUI() switch (status) { case HeroineStatus.Unknown: - GUILayout.Label("This character didn't tell you their risky day schedule yet."); + GUILayout.Label("This character didn't tell you their risky day schedule."); GUILayout.FlexibleSpace(); - GUILayout.Label("Become closer to learn it!"); + switch (PregnancyPlugin.StatusDisplay.Value) + { + default: + case PregnancyPlugin.StatusDisplayCondition.Normal: + GUILayout.Label("Become closer to learn it!"); + break; + case PregnancyPlugin.StatusDisplayCondition.OnlyGirlfriend: + GUILayout.Label("Become close lovers to learn it!"); + break; + case PregnancyPlugin.StatusDisplayCondition.Never: + GUILayout.Label("All schedules are forced to be hidden by the \"When to reveal status\" setting."); + break; + } break; case HeroineStatus.OnLeave: diff --git a/src/KK_Pregnancy/GUI/PregnancyGui.StatusIcons.cs b/src/KK_Pregnancy/GUI/PregnancyGui.StatusIcons.cs index 7a75ca1..0fc177d 100644 --- a/src/KK_Pregnancy/GUI/PregnancyGui.StatusIcons.cs +++ b/src/KK_Pregnancy/GUI/PregnancyGui.StatusIcons.cs @@ -161,9 +161,21 @@ private void OnGUI() switch (status) { case HeroineStatus.Unknown: - GUILayout.Label("This character didn't tell you their risky day schedule yet."); + GUILayout.Label("This character didn't tell you their risky day schedule."); GUILayout.FlexibleSpace(); - GUILayout.Label("Become closer to learn it!"); + switch (PregnancyPlugin.StatusDisplay.Value) + { + default: + case PregnancyPlugin.StatusDisplayCondition.Normal: + GUILayout.Label("Become closer to learn it!"); + break; + case PregnancyPlugin.StatusDisplayCondition.OnlyGirlfriend: + GUILayout.Label("Become close lovers to learn it!"); + break; + case PregnancyPlugin.StatusDisplayCondition.Never: + GUILayout.Label("All schedules are forced to be hidden by the \"When to reveal status\" setting."); + break; + } break; case HeroineStatus.OnLeave: