Skip to content

[Content Patcher] Config token value set to a single season name is forced to lowercase #1159

@SDPhantom

Description

@SDPhantom

Config tokens with values containing a single season name is forced lowercase. Not only does this lead to file errors when used directly in the filename of Unix-based systems, but is also cascading into an issue where GenericModConfigMenu "forgets" the setting you just saved upon showing/refreshing its UI as the case no longer matches allowed values.

Tested with the following files:

manifest.json

{
	"Name": "Test Mod",
	"Author": "AuthorName",
	"Description": "",
	"Version": "0.1.0",
	"UniqueID": "AuthorName.TestMod",
	"UpdateKeys": [],
	"ContentPackFor": {
		"UniqueID": "Pathoschild.ContentPatcher"
	}
}

content.json

{
	"Format": "2.8.0",
	"ConfigSchema": {
		"Test_Seasons_1": {
			"AllowValues": "Spring, Summer, Fall, Winter",
			"Default": "Fall"
		},
		"Test_Seasons_2": {
			"AllowValues": "Spring, Summer, Fall, Winter",
			"AllowMultiple": true,
			"Default": "Fall"
		}
	},
	"Changes": [{"Action": "EditData", "Target": "Data/JukeboxTracks", "Entries": {"starshoot": {"Available": true}}}]
}

Results in the following config file:

{
  "Test_Seasons_1": "fall",
  "Test_Seasons_2": "fall"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions