aedenthorn / StardewValleyMods

GNU General Public License v3.0
98 stars 114 forks source link

[CustomSpouseRooms] Update to 1.6 #125

Open FlyingTNT opened 6 months ago

FlyingTNT commented 6 months ago

Compatibility update for 1.6.

This is also in the description of the commit: Other than the minor compatibility tweaks changed two main things. First, changes MakeSpouseRoom in LocationPatches to get spouse room data from "Data\Characters" rather than "Data\SpouseRooms" (the latter no longer exists). Additionally, there was an error where when engaging someone and then returning to the farmhouse, the game would crash. The stacktrace went from _draw to xTIle._rebakeRow, and the error was indexOutOfBounds, so I suspect that it was generated by the resizing of the room. However, resizing the room when loading a save (such as when adding the mod to a game that didn't already have it, but did already have multiple spouses) did work. As such, I prevented this error by adding a flag that gets unset the first time the FarmHouse_loadSpouseRoom_Prefix and prevents it from running again until after the game has returned to the main menu. This means that spouse rooms will not be updated within a game session. However, I tested warping to the desert and taking the bus back and entering the farmhouse, and also sleeping through the night, and the rooms that were generated when the save was loaded did not disappear, so this fix seems to be effective. I have tested this mod in the cases mentioned above, plus when loading an old save that previously had the mod, and had multiple spouses, including modded spouses (SVE), and it seems to work perfectly.

I don't believe pull request #122 fixes these two main things. Please let me know if I should have added my changes to their pull request.