mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 04:21:07 +01:00
Check if item is a slab or not
This commit is contained in:
parent
9da07af370
commit
07d2759ae4
1 changed files with 9 additions and 7 deletions
|
@ -109,10 +109,8 @@ local function update_stonecutter_slots(meta)
|
|||
local name = input:get_name()
|
||||
local name_stripped = get_item_string_name(input:to_string())
|
||||
local cuttable_recipes = {}
|
||||
local new_output = ItemStack(meta:get_string("cut_stone"))
|
||||
local new_output = meta:get_string("cut_stone")
|
||||
|
||||
|
||||
print(name)
|
||||
if is_input_in_table(name) then
|
||||
if name_stripped ~= "" then
|
||||
local stair = "mcl_stairs:stair_"..name_stripped
|
||||
|
@ -145,10 +143,14 @@ local function update_stonecutter_slots(meta)
|
|||
else
|
||||
meta:set_string("formspec", show_stonecutter_formspec(nil))
|
||||
end
|
||||
|
||||
if new_output then
|
||||
new_output:set_count(2)
|
||||
inv:set_stack("output", 1, new_output)
|
||||
if new_output = '' then
|
||||
cut_item = ItemStack(new_output)
|
||||
if string.find(new_output, "mcl_stairs:slab_") then
|
||||
cut_item:set_count(2)
|
||||
else
|
||||
cut_item:set_count(1)
|
||||
end
|
||||
inv:set_stack("output", 1, cut_item)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue