mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-26 09:13:53 +01:00
Fix settingtypes for ranges without default
This commit is contained in:
parent
f64fa5bfb4
commit
0579840908
2
conf.lua
2
conf.lua
@ -155,6 +155,8 @@ function generate_settingtypes(default_conf, constraints)
|
|||||||
-- TODO consider better max
|
-- TODO consider better max
|
||||||
type_args = (constraints.int and "%d %d" or "%f %f"):format(range[1], range[2] or math.pow(2, 30))
|
type_args = (constraints.int and "%d %d" or "%f %f"):format(range[1], range[2] or math.pow(2, 30))
|
||||||
end
|
end
|
||||||
|
-- HACK
|
||||||
|
if not default_conf then default_conf = range[1] end
|
||||||
elseif constraint_type == "table" then
|
elseif constraint_type == "table" then
|
||||||
local handled = {}
|
local handled = {}
|
||||||
local settings = {}
|
local settings = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user