summaryrefslogtreecommitdiff
path: root/moreblocks
diff options
context:
space:
mode:
Diffstat (limited to 'moreblocks')
-rw-r--r--moreblocks/circular_saw.lua6
-rw-r--r--moreblocks/description.txt1
-rw-r--r--moreblocks/mod.conf1
-rw-r--r--moreblocks/stairsplus/init.lua2
-rw-r--r--moreblocks/stairsplus/registrations.lua8
5 files changed, 15 insertions, 3 deletions
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
})