Hide "Disable mod detection" in dev build

This commit is contained in:
David Vogel 2023-04-17 11:19:16 +02:00
parent f992748443
commit d69177cd3b
3 changed files with 7 additions and 5 deletions

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2019-2022 David Vogel
Copyright (c) 2019-2023 David Vogel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
-- Copyright (c) 2022 David Vogel
-- Copyright (c) 2022-2023 David Vogel
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
@ -23,6 +23,7 @@ local Memory = require("memory")
local NXML = require("luanxml.nxml")
local Utils = require("noita-api.utils")
local Vec2 = require("noita-api.vec2")
local DebugAPI = require("noita-api.debug")
----------
-- Code --
@ -255,14 +256,14 @@ function Modification.RequiredChanges()
}
end
if ModSettingGet("noita-mapcap.disable-shaders-gui-ai") then
if ModSettingGet("noita-mapcap.disable-shaders-gui-ai") and DebugAPI.IsDevBuild() then
memory["mPostFxDisabled"] = 1
memory["mGuiDisabled"] = 1
memory["mFreezeAI"] = 1
memory["mTrailerMode"] = 1 -- Is necessary for chunks to correctly load when DEBUG_PAUSE_GRID_UPDATE is enabled.
end
if ModSettingGet("noita-mapcap.disable-mod-detection") then
if ModSettingGet("noita-mapcap.disable-mod-detection") and not DebugAPI.IsDevBuild() then
memory["enableModDetection"] = 0
else
-- Don't actively (re)enable mod detection.

View File

@ -1,4 +1,4 @@
-- Copyright (c) 2022 David Vogel
-- Copyright (c) 2022-2023 David Vogel
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
@ -318,6 +318,7 @@ modSettings = {
id = "disable-mod-detection",
ui_name = " Disable mod detection",
ui_description = "If enabled, Noita will behave as if no mods are enabled.\nTherefore secrets like the cauldron will be generated.",
hidden = DebugAPI.IsDevBuild(),
value_default = false,
scope = MOD_SETTING_SCOPE_RUNTIME,
},