Mod settings - hovgaardgames/startupcompany GitHub Wiki
Mod settings
You are able to store data in the user's savegame. You can add your own object to the settings
object, which can hold everything you can imagine.
Here's an example for our furnitureMod
.
GetRootScope().settings.furnitureMod = {
preferredColor: 'red',
usedChairs: [
{name:'chair_1', used: true},
{name:'chair_2', used: false}
],
anotherProperty: 1234
}
Hint : Please make sure, that furnitureMod
equals the name you specified in your mod.json
. Otherwise the game could crash or your settings could be modified by another mod.