summaryrefslogtreecommitdiff
path: root/src/SMAPI/Metadata
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-04-27 16:30:41 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-04-27 16:30:41 -0400
commitdf6e745c6b842290338317ed1d3e969ee222998c (patch)
tree4b8b28ddd7d8b9fe381bc7902f7c19187a61d4be /src/SMAPI/Metadata
parentd0dad43e243864eb8bfdf46c853c5c7fba7c55ed (diff)
parentf44151dbb47b82250955be7c25145d1774bec705 (diff)
downloadSMAPI-df6e745c6b842290338317ed1d3e969ee222998c.tar.gz
SMAPI-df6e745c6b842290338317ed1d3e969ee222998c.tar.bz2
SMAPI-df6e745c6b842290338317ed1d3e969ee222998c.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Metadata')
-rw-r--r--src/SMAPI/Metadata/CoreAssetPropagator.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs
index 83e553ff..0a14086b 100644
--- a/src/SMAPI/Metadata/CoreAssetPropagator.cs
+++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs
@@ -5,6 +5,7 @@ using System.Linq;
using Microsoft.Xna.Framework.Graphics;
using Netcode;
using StardewModdingAPI.Framework.Reflection;
+using StardewModdingAPI.Toolkit.Utilities;
using StardewValley;
using StardewValley.BellsAndWhistles;
using StardewValley.Buildings;
@@ -891,11 +892,13 @@ namespace StardewModdingAPI.Metadata
// doesn't store the text itself.
foreach (NPC villager in villagers)
{
+ bool shouldSayMarriageDialogue = villager.shouldSayMarriageDialogue.Value;
MarriageDialogueReference[] marriageDialogue = villager.currentMarriageDialogue.ToArray();
villager.resetSeasonalDialogue(); // doesn't only affect seasonal dialogue
villager.resetCurrentDialogue();
+ villager.shouldSayMarriageDialogue.Set(shouldSayMarriageDialogue);
villager.currentMarriageDialogue.Set(marriageDialogue);
}
@@ -1037,9 +1040,9 @@ namespace StardewModdingAPI.Metadata
/// <param name="path">The path to check.</param>
private string[] GetSegments(string path)
{
- if (path == null)
- return new string[0];
- return path.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
+ return path != null
+ ? PathUtilities.GetSegments(path)
+ : new string[0];
}
/// <summary>Count the number of segments in a path (e.g. 'a/b' is 2).</summary>