From 005ae0e9cf82ce6138d026a58ce947cc0151d6aa Mon Sep 17 00:00:00 2001 From: Ismoh <12631485+Ismoh@users.noreply.github.com> Date: Wed, 29 Nov 2023 23:14:09 +0100 Subject: [PATCH] Removed wacky fix.. --- .../lua_modules/share/lua/5.1/pprint.lua | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/mods/noita-mp/lua_modules/share/lua/5.1/pprint.lua b/mods/noita-mp/lua_modules/share/lua/5.1/pprint.lua index c76e22ce6..735a52b01 100644 --- a/mods/noita-mp/lua_modules/share/lua/5.1/pprint.lua +++ b/mods/noita-mp/lua_modules/share/lua/5.1/pprint.lua @@ -118,16 +118,13 @@ local function cache_apperance(obj, cache, option) cache.visited_tables[obj] = cache.visited_tables[obj] + 1 return end - local metatable = getmetatable(obj) -- TODD: wacky fix for missing __pairs - if metatable and metatable.__pairs then -- TODD: wacky fix for missing __pairs - for k, v in pairs(obj) do - cache_apperance(k, cache, option) - cache_apperance(v, cache, option) - end - local mt = getmetatable(obj) - if mt and option.show_metatable then - cache_apperance(mt, cache, option) - end + for k, v in pairs(obj) do + cache_apperance(k, cache, option) + cache_apperance(v, cache, option) + end + local mt = getmetatable(obj) + if mt and option.show_metatable then + cache_apperance(mt, cache, option) end end end