Schema: Fix numbered entries

This commit is contained in:
Lars Mueller 2021-03-31 22:15:08 +02:00
parent 7bde15d703
commit bf2ba5be9d

@ -36,6 +36,7 @@ function generate_settingtypes(self)
settings = {"[" .. table.concat(modlib.table.repetition("*", self._level)) .. self.name .. "]"} settings = {"[" .. table.concat(modlib.table.repetition("*", self._level)) .. self.name .. "]"}
end end
local function setting(key, value_scheme) local function setting(key, value_scheme)
key = tostring(key)
assert(not key:find("[=%.%s]")) assert(not key:find("[=%.%s]"))
value_scheme.name = self.name .. "." .. key value_scheme.name = self.name .. "." .. key
value_scheme.title = value_scheme.title or self.title .. " " .. field_name_to_title(key) value_scheme.title = value_scheme.title or self.title .. " " .. field_name_to_title(key)