Skip to content

Commit

Permalink
Fix blank Longdesc (#484)
Browse files Browse the repository at this point in the history
Display rules instead of creator's description if the ruleset creator
added Longdesc but used a blank placeholder of "".
  • Loading branch information
TheGrayAlien authored Sep 9, 2023
1 parent a21f88f commit 114bbd4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion HouseRules_Configuration/UI/HouseRulesUiGameVr.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private void Initialize()
int numRules = 13;
int textLength = 0;
int returnCount = 0;
if (HR.SelectedRuleset.Longdesc != null)
if (string.IsNullOrEmpty(HR.SelectedRuleset.Longdesc))
{
textLength = HR.SelectedRuleset.Longdesc.Length;
returnCount = HR.SelectedRuleset.Longdesc.Count(f => f == '\n');
Expand Down
2 changes: 1 addition & 1 deletion HouseRules_Core/LifecycleDirector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ private static string RulesetActiveMessage()
sb.AppendLine(ColorizeString(HR.SelectedRuleset.Description, Color.white));
sb.AppendLine();

if (HR.SelectedRuleset.Longdesc != null)
if (string.IsNullOrEmpty(HR.SelectedRuleset.Longdesc))
{
sb.AppendLine(ColorizeString($"<========== Ruleset Creator's Description ==========>", orange));
sb.AppendLine(ColorizeString($"{HR.SelectedRuleset.Longdesc}", gold));
Expand Down

0 comments on commit 114bbd4

Please sign in to comment.