Pathoschild / StardewMods

Mods for Stardew Valley using SMAPI.
MIT License
706 stars 376 forks source link

[Content Patcher] reject field changes containing field delimiter #391

Closed Pathoschild closed 5 years ago

Pathoschild commented 5 years ago

Content Patcher allows patches like this:

{
    "Action": "EditData",
    "Target": "Data/Furniture",
    "Fields": {
        "536": {
            "0": "Piano/Forest Seat/Table with Typewriter"
        }
    }
}

Since Data/Furniture uses slashes as a field delimiter, that adds two new fields which breaks the format. That's usually not intended, and causes cryptic game errors that are hard to diagnose if you don't know what you're looking for.

Reject field changes containing the field delimiter.

Pathoschild commented 5 years ago

Done in develop for the upcoming Content Patcher release.