Skip to content

Commit

Permalink
Fix typo in AllowDeferredLogicUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
black-sliver committed Sep 18, 2024
1 parent 955d755 commit 70997e1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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`)
Expand Down
4 changes: 2 additions & 2 deletions api/lua/definition/poptracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions src/core/tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 70997e1

Please sign in to comment.