From 3037ba3f0107576d139184cb7c869b623fdce178 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Sun, 13 Feb 2022 16:37:56 +1300 Subject: [PATCH] Use node.items instead of node.item --- monkey_patching.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/monkey_patching.lua b/monkey_patching.lua index f7f9ca4..005a4c1 100644 --- a/monkey_patching.lua +++ b/monkey_patching.lua @@ -75,14 +75,14 @@ local function backport_for(name, formspec) local modified for node in formspec_ast.walk(tree) do local node_type = node.type - if node_type == "dropdown" and node.index_event and node.item then + if node_type == "dropdown" and node.index_event and node.items then -- Enable the dropdown hack for this player dropdown_hack_enabled[name] = true modified = true node.name = "\1fs51\1" .. node.name - for i, item in ipairs(node.item) do - node.item[i] = "\27(fs51@idx_" .. i .. ")" .. item + for i, item in ipairs(node.items) do + node.items[i] = "\27(fs51@idx_" .. i .. ")" .. item end node.index_event = nil elseif formspec_version == 3 then -- luacheck: ignore 542