summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-02-10 19:37:59 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-02-10 19:37:59 -0500
commitc649572db8f2f57f5f39ed6d842529b188601206 (patch)
treee8fa7a4a094321aa6c52969c615545f0c3d29637
parent801eaa70871a9ca86dab8022abfd87d558fa1db3 (diff)
downloadSMAPI-c649572db8f2f57f5f39ed6d842529b188601206.tar.gz
SMAPI-c649572db8f2f57f5f39ed6d842529b188601206.tar.bz2
SMAPI-c649572db8f2f57f5f39ed6d842529b188601206.zip
fix dialogue propagation clearing marriage dialogue
-rw-r--r--docs/release-notes.md1
-rw-r--r--src/SMAPI/Metadata/CoreAssetPropagator.cs7
2 files changed, 8 insertions, 0 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md
index fb66ea1c..a14f6175 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -13,6 +13,7 @@
* Added support for self-broadcasts through the multiplayer API. (Mods can now send messages to the current machine. That enables simple integrations between mods without needing an API, and lets mods notify a host mod without needing different code depending on whether the current player is the host or a farmhand.)
* Added `helper.Input.GetStatus` method to get the low-level status of a button.
* Eliminated unneeded network messages when broadcasting to a peer who can't handle the message (e.g. because they don't have SMAPI or don't have the target mod).
+ * Fixed marriage dialogue cleared when propagating dialogue changes.
* For the web UI:
* Updated the JSON validator and Content Patcher schema for `.tmx` support.
diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs
index 7a58d52c..8d5ad3ab 100644
--- a/src/SMAPI/Metadata/CoreAssetPropagator.cs
+++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs
@@ -886,10 +886,17 @@ namespace StardewModdingAPI.Metadata
return false;
// update dialogue
+ // Note that marriage dialogue isn't reloaded after reset, but it doesn't need to be
+ // propagated anyway since marriage dialogue keys can't be added/removed and the field
+ // doesn't store the text itself.
foreach (NPC villager in villagers)
{
+ MarriageDialogueReference[] marriageDialogue = villager.currentMarriageDialogue.ToArray();
+
villager.resetSeasonalDialogue(); // doesn't only affect seasonal dialogue
villager.resetCurrentDialogue();
+
+ villager.currentMarriageDialogue.Set(marriageDialogue);
}
return true;