depctrl global config: use OR helper function i forgor 💀 about

>write function specifically to help do a thing
>time passes
>have to do the thing again
>dont use function i wrote
genius
This commit is contained in:
garret 2022-12-21 07:30:40 +00:00
parent 6a91197b54
commit b7f76f4caf
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
script_name="DepCtrl Global Config"
script_description="the future is now"
script_author = "garret"
script_version = "1.3.0"
script_version = "1.3.1"
script_namespace = "garret.depctrl_config"
local DependencyControl = require("l0.DependencyControl")
@ -183,7 +183,7 @@ end
local function write_config(new)
for k, v in pairs(new) do
if (v == nil) -- allow nil, so the reset to defaults button works
or v ~= (DependencyControl.config.c[k] or DependencyControl.config.defaults[k]) -- check it's not the current value anyway
or v ~= get_bool(DependencyControl.config.c[k], DependencyControl.config.defaults[k]) -- check it's not the current value anyway
then
-- changed, save
DependencyControl.config.c[k] = v