1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00
OpenMW/files/data/scripts/omw/settings/global.lua
2024-02-27 23:26:26 +04:00

23 lines
641 B
Lua

local storage = require('openmw.storage')
local common = require('scripts.omw.settings.common')
common.getSection(true, common.groupSectionKey):setLifeTime(storage.LIFE_TIME.Temporary)
return {
interfaceName = 'Settings',
interface = {
version = 1,
registerGroup = common.registerGroup,
updateRendererArgument = common.updateRendererArgument,
},
engineHandlers = {
onLoad = common.onLoad,
onSave = common.onSave,
},
eventHandlers = {
[common.setGlobalEvent] = function(e)
storage.globalSection(e.groupKey):set(e.settingKey, e.value)
end,
},
}