mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-26 01:03:46 +01:00
Schema: Fix settingtypes ranges
This commit is contained in:
parent
d2656f08de
commit
fb89c85c66
@ -31,9 +31,9 @@ function generate_settingtypes(self)
|
|||||||
settingtype = "string"
|
settingtype = "string"
|
||||||
elseif typ == "number" then
|
elseif typ == "number" then
|
||||||
settingtype = self.int and "int" or "float"
|
settingtype = self.int and "int" or "float"
|
||||||
if self.min or self.max then
|
if self.range and (self.range.min or self.range.max) then
|
||||||
-- TODO handle exclusive min/max
|
-- TODO handle exclusive min/max
|
||||||
type_args = (self.int and "%d %d" or "%f %f"):format(self.min or (2 ^ -30), self.max or (2 ^ 30))
|
type_args = (self.int and "%d %d" or "%f %f"):format(self.range.min or (2 ^ -30), self.range.max or (2 ^ 30))
|
||||||
end
|
end
|
||||||
elseif typ == "table" then
|
elseif typ == "table" then
|
||||||
local settings = {}
|
local settings = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user