Add code that stops grid updates in regular build

This is not exposed to the end user yet, as it is buggy.
This commit is contained in:
David Vogel 2023-12-30 13:34:13 +01:00
parent 8bb8adf1ba
commit 478e1284fb
2 changed files with 6 additions and 1 deletions

View File

@ -378,7 +378,7 @@ function Capture:StartCapturingLive(outputPixelScale)
self.MapCapturingCtx:Run(nil, handleDo, handleEnd, mapCapturingCtxErrHandler)
end
---Gathers all entities on the screen (around x, y within radius), serializes them, appends them into entityFile and modifies those entities.
---Gathers all entities on the screen (around x, y within radius), serializes them, appends them into entityFile and/or modifies those entities.
---@param file file*|nil
---@param modify boolean
---@param x number

View File

@ -309,6 +309,11 @@ function Modification.RequiredChanges()
magic["DEBUG_PAUSE_BOX2D"] = ModSettingGet("noita-mapcap.disable-physics") and "1" or "0"
magic["DEBUG_DISABLE_POSTFX_DITHERING"] = ModSettingGet("noita-mapcap.disable-postfx") and "1" or "0"
-- These magic numbers stop any grid updates (pixel physics), even in the release build.
-- But any Box2D objects glitch, therefore the mod option (disable-physics) is disabled and hidden in the non dev build.
magic["GRID_MAX_UPDATES_PER_FRAME"] = ModSettingGet("noita-mapcap.disable-physics") and "0" or "128"
magic["GRID_MIN_UPDATES_PER_FRAME"] = ModSettingGet("noita-mapcap.disable-physics") and "1" or "40"
if ModSettingGet("noita-mapcap.disable-postfx") then
patches.PostFinalConst = {
ENABLE_REFRACTION = false,