summaryrefslogtreecommitdiff
path: root/moreblocks/stairsplus
diff options
context:
space:
mode:
Diffstat (limited to 'moreblocks/stairsplus')
-rw-r--r--moreblocks/stairsplus/init.lua2
-rw-r--r--moreblocks/stairsplus/microblocks.lua4
-rw-r--r--moreblocks/stairsplus/panels.lua4
-rw-r--r--moreblocks/stairsplus/registrations.lua17
-rw-r--r--moreblocks/stairsplus/slabs.lua4
-rw-r--r--moreblocks/stairsplus/slopes.lua4
-rw-r--r--moreblocks/stairsplus/stairs.lua4
7 files changed, 36 insertions, 3 deletions
diff --git a/moreblocks/stairsplus/init.lua b/moreblocks/stairsplus/init.lua
index 87a356f..598f21c 100644
--- a/moreblocks/stairsplus/init.lua
+++ b/moreblocks/stairsplus/init.lua
@@ -12,6 +12,8 @@ local modpath = minetest.get_modpath("moreblocks").. "/stairsplus"
stairsplus = {}
stairsplus.expect_infinite_stacks = false
+stairsplus.shapes_list = {}
+
if not minetest.get_modpath("unified_inventory")
and minetest.setting_getbool("creative_mode") then
stairsplus.expect_infinite_stacks = true
diff --git a/moreblocks/stairsplus/microblocks.lua b/moreblocks/stairsplus/microblocks.lua
index 727278e..50d8487 100644
--- a/moreblocks/stairsplus/microblocks.lua
+++ b/moreblocks/stairsplus/microblocks.lua
@@ -65,6 +65,10 @@ local microblocks_defs = {
}
}
+for k,v in pairs(microblocks_defs) do
+ table.insert(stairsplus.shapes_list, { "micro_", k })
+end
+
function stairsplus:register_micro_alias(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(microblocks_defs)
for alternate, def in pairs(defs) do
diff --git a/moreblocks/stairsplus/panels.lua b/moreblocks/stairsplus/panels.lua
index fb18f05..98e77fd 100644
--- a/moreblocks/stairsplus/panels.lua
+++ b/moreblocks/stairsplus/panels.lua
@@ -65,6 +65,10 @@ local panels_defs = {
}
}
+for k,v in pairs(panels_defs) do
+ table.insert(stairsplus.shapes_list, { "panel_", k })
+end
+
function stairsplus:register_panel_alias(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(panels_defs)
for alternate, def in pairs(defs) do
diff --git a/moreblocks/stairsplus/registrations.lua b/moreblocks/stairsplus/registrations.lua
index ccadedc..be08b43 100644
--- a/moreblocks/stairsplus/registrations.lua
+++ b/moreblocks/stairsplus/registrations.lua
@@ -7,6 +7,7 @@ Licensed under the zlib license. See LICENSE.md for more information.
local default_nodes = { -- Default stairs/slabs/panels/microblocks:
"stone",
+ "stone_block",
"cobble",
"mossycobble",
"brick",
@@ -17,6 +18,7 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks:
"bronzeblock",
"diamondblock",
"desert_stone",
+ "desert_stone_block",
"desert_cobble",
"meselamp",
"glass",
@@ -31,20 +33,29 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks:
"aspen_tree",
"aspen_wood",
"obsidian",
+ "obsidian_block",
+ "obsidianbrick",
"obsidian_glass",
"stonebrick",
"desert_stonebrick",
"sandstonebrick",
- "obsidianbrick",
+ "sandstone_block",
+ "coral_skeleton",
+ "farming:straw"
}
for _, name in pairs(default_nodes) do
- local nodename = "default:" .. name
+ local nodename = "default:"..name
+ local a,b = string.find(name, ":")
+ if b then
+ nodename = name
+ name = string.sub(name, b+1)
+ end
local ndef = minetest.registered_nodes[nodename]
if ndef then
local drop
if type(ndef.drop) == "string" then
- drop = ndef.drop:sub(9)
+ drop = ndef.drop:sub((b or 8)+1)
end
local tiles = ndef.tiles
diff --git a/moreblocks/stairsplus/slabs.lua b/moreblocks/stairsplus/slabs.lua
index 5d9a434..ea9dbc5 100644
--- a/moreblocks/stairsplus/slabs.lua
+++ b/moreblocks/stairsplus/slabs.lua
@@ -44,6 +44,10 @@ local slabs_defs = {
}
}
+for k,v in pairs(slabs_defs) do
+ table.insert(stairsplus.shapes_list, { "slab_", k })
+end
+
function stairsplus:register_slab_alias(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(slabs_defs)
for alternate, def in pairs(defs) do
diff --git a/moreblocks/stairsplus/slopes.lua b/moreblocks/stairsplus/slopes.lua
index cd8142f..7d18b3d 100644
--- a/moreblocks/stairsplus/slopes.lua
+++ b/moreblocks/stairsplus/slopes.lua
@@ -219,6 +219,10 @@ local slopes_defs = {
},
}
+for k,v in pairs(slopes_defs) do
+ table.insert(stairsplus.shapes_list, { "slope_", k })
+end
+
function stairsplus:register_slope_alias(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(slopes_defs)
for alternate, def in pairs(defs) do
diff --git a/moreblocks/stairsplus/stairs.lua b/moreblocks/stairsplus/stairs.lua
index 8dd29a0..0291e7d 100644
--- a/moreblocks/stairsplus/stairs.lua
+++ b/moreblocks/stairsplus/stairs.lua
@@ -105,6 +105,10 @@ local stairs_defs = {
},
}
+for k,v in pairs(stairs_defs) do
+ table.insert(stairsplus.shapes_list, { "stair_", k })
+end
+
function stairsplus:register_stair_alias(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(stairs_defs)
for alternate, def in pairs(defs) do