mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-24 00:49:34 +01:00
Prevent input from being a selectable option
This commit is contained in:
parent
524c9c1bcc
commit
5dda3033a5
1 changed files with 3 additions and 1 deletions
|
@ -44,6 +44,8 @@ local function show_stonecutter_formspec(items, input)
|
||||||
return formspec
|
return formspec
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--Checks for the string for the different stair and wall positions that shouldn't be craftable
|
||||||
local function check(item_name)
|
local function check(item_name)
|
||||||
if string.match(item_name, "mcl_walls") then
|
if string.match(item_name, "mcl_walls") then
|
||||||
if string.match(item_name, "%d") then
|
if string.match(item_name, "%d") then
|
||||||
|
@ -77,7 +79,7 @@ local function update_stonecutter_slots(pos,str)
|
||||||
local cuttable_recipes = {}
|
local cuttable_recipes = {}
|
||||||
for item_name, item_def in pairs(minetest.registered_items) do
|
for item_name, item_def in pairs(minetest.registered_items) do
|
||||||
if item_def.groups and item_def.groups["stonecutter_output"] == compat_item then
|
if item_def.groups and item_def.groups["stonecutter_output"] == compat_item then
|
||||||
if check(item_name) == false then
|
if check(item_name) == false and name ~= item_name then
|
||||||
table.insert(cuttable_recipes, item_name)
|
table.insert(cuttable_recipes, item_name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue