1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-29 00:32:49 +00:00

27 lines
825 B
Lua
Raw Normal View History

2022-03-07 21:28:05 +01:00
local common = require('scripts.omw.settings.common')
local render = require('scripts.omw.settings.render')
local saveScope = common.scopes[common.SCOPE.SavePlayer]
return {
interfaceName = 'Settings',
interface = {
SCOPE = common.SCOPE,
getGroup = common.getGroup,
registerRenderer = render.registerRenderer,
localizeGroup = render.localizeGroup,
2022-03-07 21:28:05 +01:00
},
engineHandlers = {
onLoad = function(saved)
saveScope:reset(saved)
end,
onSave = function()
return saveScope:asTable()
end,
},
eventHandlers = {
[common.EVENTS.SettingChanged] = function(e)
common.getGroup(e.groupName):__changed(e.settingName, e.value)
end,
[common.EVENTS.GroupRegistered] = render.onGroupRegistered,
}
}