Code: Select all
-- settings.lua
data:extend ({{
name = "setting-name",
setting_type = "startup",
type = "string-setting",
allowed_values = { "x", "y", "z" },
default_value = "z"
}})
-- in console:
/c game.player.print (settings.startup ["setting-name"])
Unknown key: "z"
So my question is: how to make dropdown setting with text representation, but integer values?