fix marriage dialogue left in invalid state after dialogue propagation

This commit is contained in:
Jesse Plamondon-Willard 2020-04-01 20:09:44 -04:00
parent 6f8fb2a68b
commit 96ec4de727
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
2 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,7 @@
* For modders:
* Fixed asset propagation on Linux/Mac for monster sprites, NPC dialogue, and NPC schedules.
* Fixed asset propagation for NPC dialogue sometimes causing a spouse to skip marriage dialogue or not allow kisses.
## 3.4.1
Released 24 March 2020 for Stardew Valley 1.4.1 or later.

View File

@ -892,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);
}