mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
Fix settings module
This commit is contained in:
@@ -35,7 +35,11 @@ SETTINGS = setmetatable(
|
||||
{__force_saving__ = function() bitser.dumpLoveFile(CONFIG_FILE,_settings) end},
|
||||
{
|
||||
__index = function(_, k)
|
||||
return _settings[k] == nil and _defaultSettings[k] or _settings[k]
|
||||
if _settings[k] == nil then
|
||||
_settings[k] = _defaultSettings[k]
|
||||
bitser.dumpLoveFile(CONFIG_FILE,_settings)
|
||||
end
|
||||
return _settings[k]
|
||||
end,
|
||||
__newindex = function(_, k, v)
|
||||
_settings[k] = v
|
||||
|
||||
Reference in New Issue
Block a user