Esca-MMC / FarmTypeManager

A mod for the game Stardew Valley, allows players and modders to spawn customizable features from each of Stardew’s farm types. Requires the SMAPI mod loader.
https://www.nexusmods.com/stardewvalley/mods/3231
Other
22 stars 13 forks source link

Added support for QuickSave #31

Closed DeLiXx closed 3 months ago

DeLiXx commented 3 months ago

This commit adds support for my upcoming mod "QuickSave" https://gitlab.com/delixx/stardew-valley/quicksave

btw on the side: while testing I noticed that the rawObj in Utility.ParseSavedObjectsFromItemList sometimes has a Type, but no category, which results in a null reference exception when accessing Category at saved = CreateSavedObject(item, areaID); -> switch(item.Type)

Esca-MMC commented 3 months ago

Thank you for handling that. I'll release it with FTM v1.23 when that's ready.

Were there any specific issues with the item list method? The rawObj code should be unreachable by simple item definitions (e.g. 420 or "red mushroom"), and ConfigItem definitions (e.g. {"category": "object", "name": "red mushroom"}) are meant to require a category. A ConfigItem without a category should be discarded by that try-catch block.

DeLiXx commented 3 months ago

Oh they are being discarded by that try-catch block. While debugging VS would stop there repeatedly and print a large block of repeat text from the catch block into the SMAPI log, so I felt I should mention that. No need to ponder about it, if it works as intended though.

Thank you for including that compatibility patch.