diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-04-27 16:30:41 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-04-27 16:30:41 -0400 |
commit | df6e745c6b842290338317ed1d3e969ee222998c (patch) | |
tree | 4b8b28ddd7d8b9fe381bc7902f7c19187a61d4be /src/SMAPI/Metadata | |
parent | d0dad43e243864eb8bfdf46c853c5c7fba7c55ed (diff) | |
parent | f44151dbb47b82250955be7c25145d1774bec705 (diff) | |
download | SMAPI-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.cs | 9 |
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> |