mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 22:06:40 +00:00
Only allow menu scripts to register permanent groups
This commit is contained in:
parent
1092d2058d
commit
8cc47f5363
1 changed files with 3 additions and 0 deletions
|
@ -493,6 +493,9 @@ return {
|
||||||
end,
|
end,
|
||||||
registerRenderer = registerRenderer,
|
registerRenderer = registerRenderer,
|
||||||
registerGroup = function(options)
|
registerGroup = function(options)
|
||||||
|
if not options.permanentStorage then
|
||||||
|
error('Menu scripts are only allowed to register setting groups with permanentStorage = true')
|
||||||
|
end
|
||||||
common.registerGroup(options)
|
common.registerGroup(options)
|
||||||
menuGroups[options.key] = true
|
menuGroups[options.key] = true
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in a new issue