Maris Posted October 16, 2015 Share Posted October 16, 2015 I'd like to define some dedicated server options without adding it in modinfo.But GetModConfigData ignores modoverrides options which does not exist in modinfo.lua Link to comment Share on other sites More sharing options...
Maris Posted October 16, 2015 Author Share Posted October 16, 2015 Okay, I made a dirty hack atm if SERVER_SIDE and _G.KnownModIndex and _G.KnownModIndex.LoadModOverides then print("Custom allow_change_client_settings PREPARE") local steal_options = {allow_change_client_settings=-1} --Stealing options (from all mods). local mod_overrides = _G.KnownModIndex:LoadModOverides() for modname,env in pairs(mod_overrides) do if env.configuration_options ~= nil then for option,override in pairs(env.configuration_options) do if steal_options[option] then if steal_options[option] ~= -1 then print("TENT ERROR: Mod option names conflict!") end steal_options[option] = override end end end end --Temporary updates local env function local GetModConfigData = function(option) if steal_options[option] ~= -1 then return steal_options[option] end end--]] local allow_change_client_settings = GetModConfigData("allow_change_client_settings") print("allow_change_client_settings = "..tostring(allow_change_client_settings))end Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now