mirror of
https://github.com/Dadido3/noita-mapcap.git
synced 2024-11-18 17:17:31 +00:00
Fix typos
This commit is contained in:
parent
18682ed441
commit
959b198e46
58
.vscode/settings.json
vendored
58
.vscode/settings.json
vendored
@ -5,8 +5,10 @@
|
|||||||
"autosetup",
|
"autosetup",
|
||||||
"backbuffer",
|
"backbuffer",
|
||||||
"basicfont",
|
"basicfont",
|
||||||
|
"bytecode",
|
||||||
"cheggaaa",
|
"cheggaaa",
|
||||||
"dofile",
|
"dofile",
|
||||||
|
"dont",
|
||||||
"Downscales",
|
"Downscales",
|
||||||
"downscaling",
|
"downscaling",
|
||||||
"DPMM",
|
"DPMM",
|
||||||
@ -23,21 +25,33 @@
|
|||||||
"lann",
|
"lann",
|
||||||
"ldflags",
|
"ldflags",
|
||||||
"linearize",
|
"linearize",
|
||||||
|
"longleg",
|
||||||
"lowram",
|
"lowram",
|
||||||
|
"luanxml",
|
||||||
"manifoldco",
|
"manifoldco",
|
||||||
"mapcap",
|
"mapcap",
|
||||||
|
"Metamethods",
|
||||||
|
"metaobject",
|
||||||
|
"Metatable",
|
||||||
"nfnt",
|
"nfnt",
|
||||||
"Niccoli",
|
"Niccoli",
|
||||||
"noita",
|
"noita",
|
||||||
|
"Nolla",
|
||||||
"NXML",
|
"NXML",
|
||||||
|
"pixelated",
|
||||||
"polymorphed",
|
"polymorphed",
|
||||||
"promptui",
|
"promptui",
|
||||||
"rasterizer",
|
"rasterizer",
|
||||||
|
"Regen",
|
||||||
|
"respawn",
|
||||||
"savegames",
|
"savegames",
|
||||||
"schollz",
|
"schollz",
|
||||||
|
"screenshake",
|
||||||
"svenstaro",
|
"svenstaro",
|
||||||
"tcnksm",
|
"tcnksm",
|
||||||
"tdewolff",
|
"tdewolff",
|
||||||
|
"unstitchable",
|
||||||
|
"upscaled",
|
||||||
"Vogel",
|
"Vogel",
|
||||||
"Voronoi",
|
"Voronoi",
|
||||||
"xmax",
|
"xmax",
|
||||||
@ -50,5 +64,47 @@
|
|||||||
"Lua.format.defaultConfig": {
|
"Lua.format.defaultConfig": {
|
||||||
"max_line_length": "512"
|
"max_line_length": "512"
|
||||||
},
|
},
|
||||||
"Lua.workspace.ignoreSubmodules": false
|
"Lua.workspace.ignoreSubmodules": false,
|
||||||
|
"cSpell.enabledLanguageIds": [
|
||||||
|
"asciidoc",
|
||||||
|
"c",
|
||||||
|
"cpp",
|
||||||
|
"csharp",
|
||||||
|
"css",
|
||||||
|
"elixir",
|
||||||
|
"erlang",
|
||||||
|
"git-commit",
|
||||||
|
"go",
|
||||||
|
"graphql",
|
||||||
|
"handlebars",
|
||||||
|
"haskell",
|
||||||
|
"html",
|
||||||
|
"jade",
|
||||||
|
"java",
|
||||||
|
"javascript",
|
||||||
|
"javascriptreact",
|
||||||
|
"json",
|
||||||
|
"jsonc",
|
||||||
|
"jupyter",
|
||||||
|
"latex",
|
||||||
|
"less",
|
||||||
|
"markdown",
|
||||||
|
"php",
|
||||||
|
"plaintext",
|
||||||
|
"python",
|
||||||
|
"pug",
|
||||||
|
"restructuredtext",
|
||||||
|
"rust",
|
||||||
|
"scala",
|
||||||
|
"scss",
|
||||||
|
"scminput",
|
||||||
|
"swift",
|
||||||
|
"text",
|
||||||
|
"typescript",
|
||||||
|
"typescriptreact",
|
||||||
|
"vue",
|
||||||
|
"yaml",
|
||||||
|
"yml",
|
||||||
|
"lua"
|
||||||
|
]
|
||||||
}
|
}
|
@ -350,7 +350,7 @@ local function captureModifyEntities(file, modify, x, y, radius)
|
|||||||
file:write(",\n\t", JSON.Marshal(rootEntity), "\n", "]")
|
file:write(",\n\t", JSON.Marshal(rootEntity), "\n", "]")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Disabling this component will prevent entites from being killed/reset when they go offscreen.
|
-- Disabling this component will prevent entities from being killed/reset when they go offscreen.
|
||||||
-- If they are reset, all tags will be reset and we may capture these entities multiple times.
|
-- If they are reset, all tags will be reset and we may capture these entities multiple times.
|
||||||
-- This has some side effects, like longleg.xml and zombie_weak.xml will respawn every revisit, as their spawner doesn't get deleted. (Or something similar to this)
|
-- This has some side effects, like longleg.xml and zombie_weak.xml will respawn every revisit, as their spawner doesn't get deleted. (Or something similar to this)
|
||||||
local components = rootEntity:GetComponents("CameraBoundComponent")
|
local components = rootEntity:GetComponents("CameraBoundComponent")
|
||||||
|
@ -47,7 +47,7 @@ function Check:Regular(interval)
|
|||||||
self.Counter = interval
|
self.Counter = interval
|
||||||
|
|
||||||
-- Remove some messages, so they will automatically disappear when the problem is solved.
|
-- Remove some messages, so they will automatically disappear when the problem is solved.
|
||||||
Message:CloseAutoclose()
|
Message:CloseAutoClose()
|
||||||
|
|
||||||
-- Compare Noita config and actual window resolution.
|
-- Compare Noita config and actual window resolution.
|
||||||
local topLeft, bottomRight = ScreenCap.GetRect() -- Actual window client area.
|
local topLeft, bottomRight = ScreenCap.GetRect() -- Actual window client area.
|
||||||
@ -83,7 +83,7 @@ function Check:Regular(interval)
|
|||||||
if config["screenshake_intensity"] then
|
if config["screenshake_intensity"] then
|
||||||
local expected = config.screenshake_intensity
|
local expected = config.screenshake_intensity
|
||||||
if expected ~= self.StartupConfig.screenshake_intensity then
|
if expected ~= self.StartupConfig.screenshake_intensity then
|
||||||
Message:ShowSetNoitaSettings(Modification.AutoSet, string.format("Screenshake intensity is %s, expected %s.", self.StartupConfig.screenshake_intensity, expected))
|
Message:ShowSetNoitaSettings(Modification.AutoSet, string.format("Screen shake intensity is %s, expected %s.", self.StartupConfig.screenshake_intensity, expected))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ function Coords:PixelScale()
|
|||||||
end
|
end
|
||||||
|
|
||||||
---Converts the given virtual/world coordinates into window/screen coordinates.
|
---Converts the given virtual/world coordinates into window/screen coordinates.
|
||||||
---@param world Vec2 -- World coordiante, origin is near the cave entrance.
|
---@param world Vec2 -- World coordinate, origin is near the cave entrance.
|
||||||
---@param viewportCenter Vec2|nil -- Result of `GameGetCameraPos()`. Will be queried automatically if set to nil.
|
---@param viewportCenter Vec2|nil -- Result of `GameGetCameraPos()`. Will be queried automatically if set to nil.
|
||||||
---@return Vec2 window
|
---@return Vec2 window
|
||||||
function Coords:ToWindow(world, viewportCenter)
|
function Coords:ToWindow(world, viewportCenter)
|
||||||
|
@ -47,12 +47,12 @@ Memory.PAGE_WRITECOMBINE = 0x400
|
|||||||
---@param newProtect integer
|
---@param newProtect integer
|
||||||
---@return ffi.cdata* oldProtect
|
---@return ffi.cdata* oldProtect
|
||||||
function Memory.VirtualProtect(addr, size, newProtect)
|
function Memory.VirtualProtect(addr, size, newProtect)
|
||||||
local oldprotect = ffi.new('DWORD[1]')
|
local oldProtect = ffi.new('DWORD[1]')
|
||||||
if not ffi.C.VirtualProtect(addr, size, newProtect, oldprotect) then
|
if not ffi.C.VirtualProtect(addr, size, newProtect, oldProtect) then
|
||||||
error(string.format("failed to call VirtualProtect(%s, %s, %s)", addr, size, newProtect))
|
error(string.format("failed to call VirtualProtect(%s, %s, %s)", addr, size, newProtect))
|
||||||
end
|
end
|
||||||
|
|
||||||
return oldprotect
|
return oldProtect
|
||||||
end
|
end
|
||||||
|
|
||||||
return Memory
|
return Memory
|
||||||
|
@ -18,7 +18,7 @@ local CameraAPI = {}
|
|||||||
---
|
---
|
||||||
---@param strength number
|
---@param strength number
|
||||||
---@param position Vec2|nil -- Defaults to camera position if not set.
|
---@param position Vec2|nil -- Defaults to camera position if not set.
|
||||||
function CameraAPI.Screenshake(strength, position)
|
function CameraAPI.ScreenShake(strength, position)
|
||||||
if position == nil then
|
if position == nil then
|
||||||
return GameScreenshake(strength)
|
return GameScreenshake(strength)
|
||||||
end
|
end
|
||||||
|
@ -64,7 +64,7 @@ local oldRequire = require
|
|||||||
local recursionSet = {}
|
local recursionSet = {}
|
||||||
|
|
||||||
---Emulated require function in case the Lua API is restricted.
|
---Emulated require function in case the Lua API is restricted.
|
||||||
---It's probably good enough for most usecases.
|
---It's probably good enough for most use cases.
|
||||||
---
|
---
|
||||||
---We need to override the default require in any case, as only dofile and loadfile can access stuff in the virtual filesystem.
|
---We need to override the default require in any case, as only dofile and loadfile can access stuff in the virtual filesystem.
|
||||||
---@param modName string
|
---@param modName string
|
||||||
|
@ -64,7 +64,7 @@ function NoitaComponent:SetValue(fieldName, ...)
|
|||||||
return ComponentSetValue2(self.ID, fieldName, ...) -- TODO: Rework Noita API to handle vectors, and use a vector instead of shitty multi value arguments
|
return ComponentSetValue2(self.ID, fieldName, ...) -- TODO: Rework Noita API to handle vectors, and use a vector instead of shitty multi value arguments
|
||||||
end
|
end
|
||||||
|
|
||||||
---Returns one or many values matching the type or subtypes of the requested field in a component subobject.
|
---Returns one or many values matching the type or subtypes of the requested field in a component sub-object.
|
||||||
---Reports error and returns nil if the field type is not supported or 'object_name' is not a metaobject.
|
---Reports error and returns nil if the field type is not supported or 'object_name' is not a metaobject.
|
||||||
---
|
---
|
||||||
---Reporting errors means that it spams the stdout with messages, instead of using the lua error handling. Thanks Nolla.
|
---Reporting errors means that it spams the stdout with messages, instead of using the lua error handling. Thanks Nolla.
|
||||||
@ -75,7 +75,7 @@ function NoitaComponent:ObjectGetValue(objectName, fieldName)
|
|||||||
return ComponentObjectGetValue2(self.ID, objectName, fieldName) -- TODO: Rework Noita API to handle vectors, and return a vector instead of some shitty multi value result
|
return ComponentObjectGetValue2(self.ID, objectName, fieldName) -- TODO: Rework Noita API to handle vectors, and return a vector instead of some shitty multi value result
|
||||||
end
|
end
|
||||||
|
|
||||||
---Sets the value of a field in a component subobject. Value(s) should have a type matching the field type.
|
---Sets the value of a field in a component sub-object. Value(s) should have a type matching the field type.
|
||||||
---Reports error if the values weren't given in correct type, the field type is not supported or 'object_name' is not a metaobject.
|
---Reports error if the values weren't given in correct type, the field type is not supported or 'object_name' is not a metaobject.
|
||||||
---@param objectName string
|
---@param objectName string
|
||||||
---@param fieldName string
|
---@param fieldName string
|
||||||
|
@ -48,7 +48,7 @@ end
|
|||||||
|
|
||||||
---Enables the trailer mode and some other things:
|
---Enables the trailer mode and some other things:
|
||||||
---
|
---
|
||||||
--- - Disables ingame GUI.
|
--- - Disables in-game GUI.
|
||||||
--- - Opens fog of war everywhere (Not the same as disabling it completely).
|
--- - Opens fog of war everywhere (Not the same as disabling it completely).
|
||||||
--- - Enables `mTrailerMode`, whatever that does.
|
--- - Enables `mTrailerMode`, whatever that does.
|
||||||
---
|
---
|
||||||
|
@ -327,7 +327,7 @@ end
|
|||||||
|
|
||||||
---Creates a component of type 'component_type_name' and adds it to 'entity_id'.
|
---Creates a component of type 'component_type_name' and adds it to 'entity_id'.
|
||||||
---'table_of_component_values' should be a string-indexed table, where keys are field names and values are field values of correct type.
|
---'table_of_component_values' should be a string-indexed table, where keys are field names and values are field values of correct type.
|
||||||
---The value setting works like ComponentObjectSetValue2(), with the exception that multivalue types are not supported.
|
---The value setting works like ComponentObjectSetValue2(), with the exception that multi value types are not supported.
|
||||||
---Additional supported values are _tags:comma_separated_string and _enabled:bool, which basically work like the those fields work in entity XML files.
|
---Additional supported values are _tags:comma_separated_string and _enabled:bool, which basically work like the those fields work in entity XML files.
|
||||||
---Returns the created component, if creation succeeded, or nil.
|
---Returns the created component, if creation succeeded, or nil.
|
||||||
---@param componentTypeName string
|
---@param componentTypeName string
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
-- This software is released under the MIT License.
|
-- This software is released under the MIT License.
|
||||||
-- https://opensource.org/licenses/MIT
|
-- https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
-- This contains just some utilitites that may be useful to have.
|
-- This contains just some utilities that may be useful to have.
|
||||||
|
|
||||||
local DebugAPI = require("noita-api.debug")
|
local DebugAPI = require("noita-api.debug")
|
||||||
|
|
||||||
|
@ -17,13 +17,13 @@ local Coords = require("coordinates")
|
|||||||
-- Code --
|
-- Code --
|
||||||
----------
|
----------
|
||||||
|
|
||||||
---Removes all messages with the autoclose flag.
|
---Removes all messages with the AutoClose flag.
|
||||||
---Use this before you recreate all auto closing messages.
|
---Use this before you recreate all auto closing messages.
|
||||||
function Message:CloseAutoclose()
|
function Message:CloseAutoClose()
|
||||||
self.List = self.List or {}
|
self.List = self.List or {}
|
||||||
|
|
||||||
for k, message in pairs(self.List) do
|
for k, message in pairs(self.List) do
|
||||||
if message.Autoclose then
|
if message.AutoClose then
|
||||||
self.List[k] = nil
|
self.List[k] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -64,7 +64,7 @@ function Message:ShowResetNoitaSettings()
|
|||||||
Lines = {
|
Lines = {
|
||||||
"You requested to reset some game settings like:",
|
"You requested to reset some game settings like:",
|
||||||
"- Custom resolutions",
|
"- Custom resolutions",
|
||||||
"- Screenshake intensity",
|
"- Screen-shake intensity",
|
||||||
" ",
|
" ",
|
||||||
"Press the following button to reset the settings and close Noita automatically:",
|
"Press the following button to reset the settings and close Noita automatically:",
|
||||||
},
|
},
|
||||||
@ -94,7 +94,7 @@ function Message:ShowSetNoitaSettings(callback, desc)
|
|||||||
Actions = {
|
Actions = {
|
||||||
{ Name = "Setup and close (May corrupt current save!)", Hint = nil, HintDesc = nil, Callback = callback },
|
{ Name = "Setup and close (May corrupt current save!)", Hint = nil, HintDesc = nil, Callback = callback },
|
||||||
},
|
},
|
||||||
Autoclose = true, -- This message will automatically close.
|
AutoClose = true, -- This message will automatically close.
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ function Message:ShowRequestRestart(desc)
|
|||||||
" ",
|
" ",
|
||||||
"To resolve this issue, restart the game.",
|
"To resolve this issue, restart the game.",
|
||||||
},
|
},
|
||||||
Autoclose = true, -- This message will automatically close.
|
AutoClose = true, -- This message will automatically close.
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ function Message:ShowWrongResolution(callback, desc)
|
|||||||
Actions = {
|
Actions = {
|
||||||
{ Name = "Query settings again", Hint = nil, HintDesc = nil, Callback = function() Coords:ReadResolutions() end },
|
{ Name = "Query settings again", Hint = nil, HintDesc = nil, Callback = function() Coords:ReadResolutions() end },
|
||||||
},
|
},
|
||||||
Autoclose = true, -- This message will automatically close.
|
AutoClose = true, -- This message will automatically close.
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ function Message:ShowGeneralSettingsProblem(...)
|
|||||||
self.List["GeneralSettingsProblem"] = {
|
self.List["GeneralSettingsProblem"] = {
|
||||||
Type = "hint",
|
Type = "hint",
|
||||||
Lines = { ... },
|
Lines = { ... },
|
||||||
Autoclose = true, -- This message will automatically close.
|
AutoClose = true, -- This message will automatically close.
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ function Message:ShowGeneralInstallationProblem(...)
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
---Tell the user that some modifications couldn't be applied because it is unsupported.
|
---Tell the user that some modification couldn't be applied because it is unsupported.
|
||||||
---@param realm "config"|"magicNumbers"|"processMemory"|"filePatches"
|
---@param realm "config"|"magicNumbers"|"processMemory"|"filePatches"
|
||||||
---@param name string
|
---@param name string
|
||||||
---@param value any
|
---@param value any
|
||||||
|
@ -213,7 +213,7 @@ function Modification.RequiredChanges()
|
|||||||
-- Capturing will not work in fullscreen.
|
-- Capturing will not work in fullscreen.
|
||||||
config["fullscreen"] = "0"
|
config["fullscreen"] = "0"
|
||||||
|
|
||||||
-- Also disable screenshake.
|
-- Also disable screen shake.
|
||||||
config["screenshake_intensity"] = "0"
|
config["screenshake_intensity"] = "0"
|
||||||
|
|
||||||
magic["DRAW_PARALLAX_BACKGROUND"] = ModSettingGet("noita-mapcap.disable-background") and "0" or "1"
|
magic["DRAW_PARALLAX_BACKGROUND"] = ModSettingGet("noita-mapcap.disable-background") and "0" or "1"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
-- TODO: Wrap Noita utilities and wrap them into a table: https://stackoverflow.com/questions/9540732/loadfile-without-polluting-global-environment
|
-- TODO: Wrap Noita utilities and wrap them into a table: https://stackoverflow.com/questions/9540732/loadfile-without-polluting-global-environment
|
||||||
require("utilities") -- Loads Noita's utilities from `data/scripts/lib/utilitites.lua`.
|
require("utilities") -- Loads Noita's utilities from `data/scripts/lib/utilities.lua`.
|
||||||
|
|
||||||
--------------------------
|
--------------------------
|
||||||
-- Load library modules --
|
-- Load library modules --
|
||||||
@ -146,7 +146,7 @@ function UI:_DrawMessages(messages)
|
|||||||
end
|
end
|
||||||
GuiLayoutEnd(gui)
|
GuiLayoutEnd(gui)
|
||||||
|
|
||||||
if not message.Autoclose then
|
if not message.AutoClose then
|
||||||
local clicked = GuiImageButton(gui, self:_GenID(), 5, 0, "", "mods/noita-mapcap/files/ui-gfx/dismiss-8x8.png")
|
local clicked = GuiImageButton(gui, self:_GenID(), 5, 0, "", "mods/noita-mapcap/files/ui-gfx/dismiss-8x8.png")
|
||||||
--GuiTooltip(gui, "Dismiss message", "")
|
--GuiTooltip(gui, "Dismiss message", "")
|
||||||
if clicked then messages[key] = nil end
|
if clicked then messages[key] = nil end
|
||||||
@ -196,7 +196,7 @@ function UI:Draw()
|
|||||||
local gui = self.gui
|
local gui = self.gui
|
||||||
|
|
||||||
-- Skip drawing if we are asked to do so.
|
-- Skip drawing if we are asked to do so.
|
||||||
-- TODO: Find a way to susped UI drawing, but still being able to receive events
|
-- TODO: Find a way to suspend UI drawing, but still being able to receive events
|
||||||
if self.suspendFrames and self.suspendFrames > 0 then self.suspendFrames = self.suspendFrames - 1 return end
|
if self.suspendFrames and self.suspendFrames > 0 then self.suspendFrames = self.suspendFrames - 1 return end
|
||||||
self.suspendFrames = nil
|
self.suspendFrames = nil
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ modSettings = {
|
|||||||
{
|
{
|
||||||
id = "capture-mode-spiral-origin",
|
id = "capture-mode-spiral-origin",
|
||||||
ui_name = " Origin",
|
ui_name = " Origin",
|
||||||
ui_description = "The starting point or center of the spiral.\n- Current position: Your ingame position.\n- World origin: Near the cave entrance.\n- Custom position: Enter your own coordinates.",
|
ui_description = "The starting point or center of the spiral.\n- Current position: Your in-game position.\n- World origin: Near the cave entrance.\n- Custom position: Enter your own coordinates.",
|
||||||
value_default = "current",
|
value_default = "current",
|
||||||
values = { { "current", "Current position" }, { "0", "World origin" }, { "custom", "Custom position" } },
|
values = { { "current", "Current position" }, { "0", "World origin" }, { "custom", "Custom position" } },
|
||||||
scope = MOD_SETTING_SCOPE_RUNTIME,
|
scope = MOD_SETTING_SCOPE_RUNTIME,
|
||||||
|
Loading…
Reference in New Issue
Block a user