fix: Fix mod options after reload
This commit is contained in:
parent
e4a2ecdd4b
commit
1e36f2bc3e
2 changed files with 13 additions and 3 deletions
|
@ -39,7 +39,7 @@ stds["DT"] = {
|
||||||
"easeOutCubic", "radian_lerp", "auto_lerp", "rand_utf8_string", "point_is_inside_oobb",
|
"easeOutCubic", "radian_lerp", "auto_lerp", "rand_utf8_string", "point_is_inside_oobb",
|
||||||
}},
|
}},
|
||||||
Managers = { fields = {
|
Managers = { fields = {
|
||||||
"mod", "event"
|
"mod", "event", "ui",
|
||||||
}},
|
}},
|
||||||
Mods = { fields = {
|
Mods = { fields = {
|
||||||
lua = { fields = { "debug", "io", "ffi", "os" }},
|
lua = { fields = { "debug", "io", "ffi", "os" }},
|
||||||
|
@ -47,6 +47,6 @@ stds["DT"] = {
|
||||||
"require_store",
|
"require_store",
|
||||||
}},
|
}},
|
||||||
"Crashify","Keyboard","Mouse","Application","Color","Quarternion","Vector3","Vector2","RESOLUTION_LOOKUP",
|
"Crashify","Keyboard","Mouse","Application","Color","Quarternion","Vector3","Vector2","RESOLUTION_LOOKUP",
|
||||||
"ModManager", "Utf8",
|
"ModManager", "Utf8", "Main",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -249,8 +249,12 @@ dmf.on_setting_changed = function (setting_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
dmf.load_developer_mode_settings = function () --@TODO: maybe move it to somewhere else?
|
dmf.load_developer_mode_settings = function () --@TODO: maybe move it to somewhere else?
|
||||||
Managers.mod._settings.developer_mode = dmf:get("developer_mode")
|
|
||||||
Application.set_user_setting("mod_manager_settings", Managers.mod._settings)
|
Application.set_user_setting("mod_manager_settings", Managers.mod._settings)
|
||||||
|
|
||||||
|
local mod_manager = Managers.mod
|
||||||
|
if mod_manager and mod_manager.set_developer_mode then
|
||||||
|
mod_manager:set_developer_mode(dmf:get("developer_mode"))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- ####################################################################################################################
|
-- ####################################################################################################################
|
||||||
|
@ -280,3 +284,9 @@ dmf.initialize_options = function()
|
||||||
dmf:set("dmf_initialized", true)
|
dmf:set("dmf_initialized", true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- If we're already in the game (likely a mod reload), we
|
||||||
|
-- can run the initialization immediately.
|
||||||
|
if Main._sm:current_state_name() == "StateGame" then
|
||||||
|
dmf.initialize_options()
|
||||||
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue