oakmound/oak

Allow extending config.json with custom fields.

Closed this issue · 2 comments

the easiest way to do this would probably be to have a "custom" object that unmarshals to a map[string]string (located at oak.SetupConfig.Custom).

200sc commented

Is the goal of this change to enable a single config file that contains oak + game config?

If so, I think my recommended approach would be a strongly typed json struct where a field at the top level of the top object is the oak config, which could then be manually set to SetupConfig.

Yeah, that seems fair. My main thought was that this would make adding new config options easy (as you wouldn't have to set up your own json unmarshaler), but thinking about it more, setting up a json unmarshaler isn't really that much work, so it isn't worth integrating into oak.