From 10cadac52e30d6745cc5323648427b468b8e1088 Mon Sep 17 00:00:00 2001 From: fishyWET Date: Fri, 3 Nov 2017 01:25:38 +0800 Subject: [PATCH 1/2] Allow convertion of all shapes to microblocks --- CHANGELOG.md | 1 + stairsplus/microblocks.lua | 36 ++++++++++++++ stairsplus/panels.lua | 36 ++++++++++++++ stairsplus/slabs.lua | 54 +++++++++++++++++++++ stairsplus/slopes.lua | 96 ++++++++++++++++++++++++++++++++++++++ stairsplus/stairs.lua | 18 +++++++ 6 files changed, 241 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index add5c89..12c04f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Tin Block - Wool (all colors) - Other mods can now get a list of all the defined Stairs+ shapes +- All Stairs+ nodes can be now converted into microblocks ## [1.0.0] - 2017-02-19 diff --git a/stairsplus/microblocks.lua b/stairsplus/microblocks.lua index 50d8487..b5debb1 100644 --- a/stairsplus/microblocks.lua +++ b/stairsplus/microblocks.lua @@ -154,4 +154,40 @@ function stairsplus:register_micro(modname, subname, recipeitem, fields) output = recipeitem, recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname}, }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 1", + recipe = {modname .. ":micro_" .. subname .. "_1"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 1", + recipe = {modname .. ":micro_" .. subname .. "_2"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 1", + recipe = {modname .. ":micro_" .. subname .. "_4"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 2", + recipe = {modname .. ":micro_" .. subname .. "_12"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 2", + recipe = {modname .. ":micro_" .. subname .. "_14"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 2", + recipe = {modname .. ":micro_" .. subname .. "_15"}, + }) end diff --git a/stairsplus/panels.lua b/stairsplus/panels.lua index 98e77fd..5ccb089 100644 --- a/stairsplus/panels.lua +++ b/stairsplus/panels.lua @@ -134,4 +134,40 @@ function stairsplus:register_panel(modname, subname, recipeitem, fields) output = recipeitem, recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname}, }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 1", + recipe = {modname .. ":panel_" .. subname .. "_1"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 1", + recipe = {modname .. ":panel_" .. subname .. "_2"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 1", + recipe = {modname .. ":panel_" .. subname .. "_4"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 3", + recipe = {modname .. ":panel_" .. subname .. "_12"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 4", + recipe = {modname .. ":panel_" .. subname .. "_14"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 4", + recipe = {modname .. ":panel_" .. subname .. "_15"}, + }) end diff --git a/stairsplus/slabs.lua b/stairsplus/slabs.lua index ea9dbc5..9068362 100644 --- a/stairsplus/slabs.lua +++ b/stairsplus/slabs.lua @@ -254,4 +254,58 @@ function stairsplus:register_slab(modname, subname, recipeitem, fields) output = modname .. ":slab_" .. subname .. " 3", recipe = {modname .. ":stair_" .. subname, modname .. ":stair_" .. subname}, }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 1", + recipe = {modname .. ":slab_" .. subname .. "_two_sides"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 2", + recipe = {modname .. ":slab_" .. subname .. "_three_sides"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 2", + recipe = {modname .. ":slab_" .. subname .. "_three_sides_u"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 1", + recipe = {modname .. ":slab_" .. subname .. "_1"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 1", + recipe = {modname .. ":slab_" .. subname .. "_2"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 2", + recipe = {modname .. ":slab_" .. subname .. "_quarter"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 6", + recipe = {modname .. ":slab_" .. subname .. "_three_quarter"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 7", + recipe = {modname .. ":slab_" .. subname .. "_14"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 8", + recipe = {modname .. ":slab_" .. subname .. "_15"}, + }) end diff --git a/stairsplus/slopes.lua b/stairsplus/slopes.lua index 7d18b3d..d8bfbcf 100644 --- a/stairsplus/slopes.lua +++ b/stairsplus/slopes.lua @@ -363,4 +363,100 @@ function stairsplus:register_slope(modname, subname, recipeitem, fields) output = modname .. ":slope_" .. subname .. "_inner_cut_half_raised", recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_cut_half"}, }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 4", + recipe = {modname .. ":slope_" .. subname}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 2", + recipe = {modname .. ":slope_" .. subname .. "_half"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 6", + recipe = {modname .. ":slope_" .. subname .. "_half_raised"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 7", + recipe = {modname .. ":slope_" .. subname .. "_inner"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 3", + recipe = {modname .. ":slope_" .. subname .. "_inner_half"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 7", + recipe = {modname .. ":slope_" .. subname .. "_inner_half_raised"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 7", + recipe = {modname .. ":slope_" .. subname .. "_inner_cut"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 4", + recipe = {modname .. ":slope_" .. subname .. "_inner_cut_half"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 8", + recipe = {modname .. ":slope_" .. subname .. "_inner_cut_half_raised"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 3", + recipe = {modname .. ":slope_" .. subname .. "_outer"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 2", + recipe = {modname .. ":slope_" .. subname .. "_outer_half"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 6", + recipe = {modname .. ":slope_" .. subname .. "_outer_half_raised"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 2", + recipe = {modname .. ":slope_" .. subname .. "_outer_cut"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 1", + recipe = {modname .. ":slope_" .. subname .. "_outer_cut_half"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 3", + recipe = {modname .. ":slope_" .. subname .. "_outer_cut_half_raised"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 4", + recipe = {modname .. ":slope_" .. subname .. "_cut"}, + }) end diff --git a/stairsplus/stairs.lua b/stairsplus/stairs.lua index 0291e7d..a728605 100644 --- a/stairsplus/stairs.lua +++ b/stairsplus/stairs.lua @@ -240,4 +240,22 @@ function stairsplus:register_stair(modname, subname, recipeitem, fields) {modname .. ":panel_" .. subname, ""}, }, }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 1", + recipe = {modname .. ":stair_" .. subname .. "_alt_1"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 1", + recipe = {modname .. ":stair_" .. subname .. "_alt_2"}, + }) + + minetest.register_craft({ + type = "shapeless", + output = modname .. ":micro_" .. subname .. " 2", + recipe = {modname .. ":stair_" .. subname .. "_alt_4"}, + }) end From 19aafdf955ce4ce8d7faedb39e0b556b01ad2e17 Mon Sep 17 00:00:00 2001 From: fishyWET Date: Fri, 3 Nov 2017 01:36:38 +0800 Subject: [PATCH 2/2] Update CHANGELOG.md woops, updated the wrong section previously --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12c04f3..b1cfee6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Added + +- All Stairs+ nodes can be now converted into microblocks + ## [1.1.0] - 2017-10-04 ### Added @@ -26,7 +30,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Tin Block - Wool (all colors) - Other mods can now get a list of all the defined Stairs+ shapes -- All Stairs+ nodes can be now converted into microblocks ## [1.0.0] - 2017-02-19