From 86ad3e7c6a37699f7f8297a387bf08af74e36629 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Fri, 1 Apr 2016 22:10:20 -0400 Subject: Update all core mods --- moreblocks/circular_saw.lua | 6 +++++- moreblocks/description.txt | 1 + moreblocks/mod.conf | 1 + moreblocks/stairsplus/init.lua | 2 +- moreblocks/stairsplus/registrations.lua | 8 +++++++- 5 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 moreblocks/description.txt create mode 100644 moreblocks/mod.conf (limited to 'moreblocks') diff --git a/moreblocks/circular_saw.lua b/moreblocks/circular_saw.lua index dd945b8..09fbd90 100644 --- a/moreblocks/circular_saw.lua +++ b/moreblocks/circular_saw.lua @@ -283,7 +283,11 @@ function circular_saw.on_metadata_inventory_put( elseif listname == "recycle" then -- Lets look which shape this represents: local cost = circular_saw:get_cost(inv, stackname) - circular_saw:update_inventory(pos, cost * count) + local input_stack = inv:get_stack("input", 1) + -- check if this would not exceed input itemstack max_stacks + if input_stack:get_count() + ((cost * count) / 8) <= input_stack:get_stack_max() then + circular_saw:update_inventory(pos, cost * count) + end end end diff --git a/moreblocks/description.txt b/moreblocks/description.txt new file mode 100644 index 0000000..95d7a92 --- /dev/null +++ b/moreblocks/description.txt @@ -0,0 +1 @@ +Adds various miscellaneous blocks to the game. diff --git a/moreblocks/mod.conf b/moreblocks/mod.conf new file mode 100644 index 0000000..b634ba9 --- /dev/null +++ b/moreblocks/mod.conf @@ -0,0 +1 @@ +name = moreblocks diff --git a/moreblocks/stairsplus/init.lua b/moreblocks/stairsplus/init.lua index 2a959c0..44f5972 100644 --- a/moreblocks/stairsplus/init.lua +++ b/moreblocks/stairsplus/init.lua @@ -18,7 +18,7 @@ and minetest.setting_getbool("creative_mode") then end function stairsplus:prepare_groups(groups) - result = {} + local result = {} if groups then for k, v in pairs(groups) do if k ~= "wood" and k ~= "stone" then diff --git a/moreblocks/stairsplus/registrations.lua b/moreblocks/stairsplus/registrations.lua index 3e08565..c87e06b 100644 --- a/moreblocks/stairsplus/registrations.lua +++ b/moreblocks/stairsplus/registrations.lua @@ -44,12 +44,18 @@ for _, name in pairs(default_nodes) do if type(ndef.drop) == "string" then drop = ndef.drop:sub(9) end + + local tiles = ndef.tiles + if #ndef.tiles > 1 and ndef.drawtype:find("glass") then + tiles = { ndef.tiles[1] } + end + stairsplus:register_all("moreblocks", name, nodename, { description = ndef.description, drop = drop, groups = ndef.groups, sounds = ndef.sounds, - tiles = ndef.tiles, + tiles = tiles, sunlight_propagates = true, light_source = ndef.light_source }) -- cgit v1.2.3