aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-23 11:12:36 -0500
committerHugo Locurcio <hugo.l@openmailbox.org>2017-02-23 17:12:36 +0100
commite9c6cef4dd6090b561c55268114c832cd0ccfe0e (patch)
treef3b26bf17cc9b7017e83c58b00821d5698ff0ed8
parent5f35766ed06ed464c5f609cdb9d08fc564f92fe9 (diff)
downloadmoreblocks-e9c6cef4dd6090b561c55268114c832cd0ccfe0e.tar.gz
moreblocks-e9c6cef4dd6090b561c55268114c832cd0ccfe0e.tar.bz2
moreblocks-e9c6cef4dd6090b561c55268114c832cd0ccfe0e.zip
build a list of all of the stairsplus slab/stair/etc... shapes (#70)
for other mods to reference.
-rw-r--r--stairsplus/init.lua2
-rw-r--r--stairsplus/microblocks.lua4
-rw-r--r--stairsplus/panels.lua4
-rw-r--r--stairsplus/slabs.lua4
-rw-r--r--stairsplus/slopes.lua4
-rw-r--r--stairsplus/stairs.lua4
6 files changed, 22 insertions, 0 deletions
diff --git a/stairsplus/init.lua b/stairsplus/init.lua
index 87a356f..598f21c 100644
--- a/stairsplus/init.lua
+++ b/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/stairsplus/microblocks.lua b/stairsplus/microblocks.lua
index 727278e..50d8487 100644
--- a/stairsplus/microblocks.lua
+++ b/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/stairsplus/panels.lua b/stairsplus/panels.lua
index fb18f05..98e77fd 100644
--- a/stairsplus/panels.lua
+++ b/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/stairsplus/slabs.lua b/stairsplus/slabs.lua
index 5d9a434..ea9dbc5 100644
--- a/stairsplus/slabs.lua
+++ b/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/stairsplus/slopes.lua b/stairsplus/slopes.lua
index cd8142f..7d18b3d 100644
--- a/stairsplus/slopes.lua
+++ b/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/stairsplus/stairs.lua b/stairsplus/stairs.lua
index 8dd29a0..0291e7d 100644
--- a/stairsplus/stairs.lua
+++ b/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