diff --git a/digistuff_ts.lua b/digistuff_ts.lua index 2776152..d9c650f 100644 --- a/digistuff_ts.lua +++ b/digistuff_ts.lua @@ -46,7 +46,7 @@ local function export(tree, backport_func) for _, node in ipairs(tree) do if node.type == 'dropdown' or node.type == 'textlist' then node.selected_id, node.selected_idx = node.selected_idx, nil - node.choices, node.item = node.item, nil + node.choices, node.items = node.items, nil -- Later versions of the digustuff mod require a height field even -- for formspec version 1. node.h = node.h or 0.81 diff --git a/formspec_ast b/formspec_ast index 0ba38e0..f9b29ba 160000 --- a/formspec_ast +++ b/formspec_ast @@ -1 +1 @@ -Subproject commit 0ba38e041e3db427e1853b57b70ba96a5c1a51d0 +Subproject commit f9b29ba6e307451cfd07f98eed389e0a93d3bb30 diff --git a/fs51 b/fs51 index 329056c..3037ba3 160000 --- a/fs51 +++ b/fs51 @@ -1 +1 @@ -Subproject commit 329056cbea8c65e5bce00337cbe4ab4944335149 +Subproject commit 3037ba3f0107576d139184cb7c869b623fdce178 diff --git a/index.lua b/index.lua index 346ee09..d5dd0f5 100644 --- a/index.lua +++ b/index.lua @@ -76,8 +76,7 @@ local property_names = { h = 'Height', w = 'Width', drawborder = 'Draw border', - item = 'Items', - listelem = 'Items', + listelems = 'Items', selected_idx = 'Selected item', props = 'Properties', opt = 'Options', diff --git a/renderer.lua b/renderer.lua index 65fd7b4..fe11cb0 100644 --- a/renderer.lua +++ b/renderer.lua @@ -191,7 +191,7 @@ end function elems.textlist(node) local res = make('div') - for i, item in ipairs(node.listelem) do + for i, item in ipairs(node.listelems) do local elem = make('div') if item:sub(1, 1) ~= '#' then elem.textContent = item @@ -223,7 +223,7 @@ function elems.dropdown(node, base, default_callbacks, scale) res.style.height = (2 * 15/13 * 0.35 * scale) .. 'px' end local select = make('select') - for i, item in ipairs(node.item) do + for i, item in ipairs(node.items) do local e = make('option', {textContent = item}, {name = i}) if i == node.selected_idx then e:setAttribute('selected', 'selected')