mirror of
https://gitlab.com/gaelysam/mapgen_rivers.git
synced 2025-02-22 06:50:29 +01:00
Fix bool settings being improperly loaded as strings
This commit is contained in:
parent
9725979363
commit
3644965842
@ -22,8 +22,11 @@ local function get_settings(key, dtype, default)
|
|||||||
elseif dtype == "float" then
|
elseif dtype == "float" then
|
||||||
conf_val = tonumber(conf_val)
|
conf_val = tonumber(conf_val)
|
||||||
storage:set_float(key, conf_val)
|
storage:set_float(key, conf_val)
|
||||||
elseif dtype == "string" or dtype == "bool" then
|
else
|
||||||
storage:set_string(key, conf_val)
|
storage:set_string(key, conf_val)
|
||||||
|
if dtype == "bool" then
|
||||||
|
conf_val = conf_val == 'true'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return conf_val
|
return conf_val
|
||||||
|
Loading…
x
Reference in New Issue
Block a user