From 70997e10026159ad1b6331f1f58baabc5776fadf Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Wed, 18 Sep 2024 16:45:16 +0200 Subject: [PATCH] Fix typo in AllowDeferredLogicUpdate --- CHANGELOG.md | 8 +++++++- api/lua/definition/poptracker.lua | 4 ++-- src/core/tracker.cpp | 5 +++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c560d984..c4a1744d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # PopTracker Changelog +## next + +* Pack Features + * Lua: add `Tracker.AllowDeferredLogicUpdate` to make bulk update faster; see docs or PopTracker.lua + + ## v0.28.0 * App Features @@ -9,7 +15,7 @@ * Minor other performance improvements * Update bundled SSL certificates * Pack Features - * Lua: add `Tracker.AllowDeferredLogicUpdate` to making bulk update even faster; see docs or PopTracker.lua + * ~~Lua: add `Tracker.AllowDeferredLogicUpdate` to make bulk update even faster; see docs or PopTracker.lua~~ * Fixes * Fix memory watches triggering even if no console is connected * Update apclientpp, to filter out duplicate Archipelago locations (during `!collect`) diff --git a/api/lua/definition/poptracker.lua b/api/lua/definition/poptracker.lua index c83ba6cd..781c55b0 100644 --- a/api/lua/definition/poptracker.lua +++ b/api/lua/definition/poptracker.lua @@ -84,8 +84,8 @@ function Tracker:UiHint(name, value) end Tracker.BulkUpdate = false ---Allow to evaluate logic rules fewer times than items are updated. ----Only available in PopTracker, since 0.27.1. ----Use as: `if Tracker.AllowDeferredLogicUpdate == false then Tracker.AllowDeferredLogicUpdate = true end` +---Only available in PopTracker, since 0.28.1. +---Use as: `if Tracker.AllowDeferredLogicUpdate ~= nil then Tracker.AllowDeferredLogicUpdate = true end` ---@type boolean Tracker.AllowDeferredLogicUpdate = false diff --git a/src/core/tracker.cpp b/src/core/tracker.cpp index b3aaeac4..8b848e42 100644 --- a/src/core/tracker.cpp +++ b/src/core/tracker.cpp @@ -551,7 +551,7 @@ int Tracker::Lua_Index(lua_State *L, const char* key) { } else if (strcmp(key, "BulkUpdate") == 0) { lua_pushboolean(L, _bulkUpdate); return 1; - } else if (strcmp(key, "AllowDefferedLogicUpdate") == 0) { + } else if (strcmp(key, "AllowDeferredLogicUpdate") == 0) { lua_pushboolean(L, _allowDeferredLogicUpdate); return 1; } else { @@ -580,9 +580,10 @@ bool Tracker::Lua_NewIndex(lua_State *L, const char* key) { _bulkUpdate = val; } return true; - } else if (strcmp(key, "AllowDefferedLogicUpdate") == 0) { + } else if (strcmp(key, "AllowDeferredLogicUpdate") == 0) { bool val = lua_isnumber(L, -1) ? (lua_tonumber(L, -1) != 0) : lua_toboolean(L, -1); _allowDeferredLogicUpdate = val; + return true; } return false; }