From d3b104a534cb2b289bbec1b3bdc64446bf277bcd Mon Sep 17 00:00:00 2001 From: The Gray Alien <103865052+TheGrayAlien@users.noreply.github.com> Date: Tue, 3 Oct 2023 22:44:29 -0400 Subject: [PATCH] Longdesc wasn't working as intended (#522) Now the list of rules should show when no longdesc exists and the creator's description should show when there is one. --- HouseRules.Configuration/UI/HouseRulesUiGameVr.cs | 2 +- HouseRules.Core/LifecycleDirector.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HouseRules.Configuration/UI/HouseRulesUiGameVr.cs b/HouseRules.Configuration/UI/HouseRulesUiGameVr.cs index b5b8e2f2..ab53b2bb 100644 --- a/HouseRules.Configuration/UI/HouseRulesUiGameVr.cs +++ b/HouseRules.Configuration/UI/HouseRulesUiGameVr.cs @@ -53,7 +53,7 @@ private void Initialize() int numRules = 13; int textLength = 0; int returnCount = 0; - if (string.IsNullOrEmpty(HR.SelectedRuleset.Longdesc)) + if (!string.IsNullOrEmpty(HR.SelectedRuleset.Longdesc)) { textLength = HR.SelectedRuleset.Longdesc.Length; returnCount = HR.SelectedRuleset.Longdesc.Count(f => f == '\n'); diff --git a/HouseRules.Core/LifecycleDirector.cs b/HouseRules.Core/LifecycleDirector.cs index 511a55fd..cc74438a 100644 --- a/HouseRules.Core/LifecycleDirector.cs +++ b/HouseRules.Core/LifecycleDirector.cs @@ -418,7 +418,7 @@ private static string RulesetActiveMessage() sb.AppendLine(ColorizeString(HR.SelectedRuleset.Description, Color.white)); sb.AppendLine(); - if (string.IsNullOrEmpty(HR.SelectedRuleset.Longdesc)) + if (!string.IsNullOrEmpty(HR.SelectedRuleset.Longdesc)) { sb.AppendLine(ColorizeString($"<========== Ruleset Creator's Description ==========>", orange)); sb.AppendLine(ColorizeString($"{HR.SelectedRuleset.Longdesc}", gold));