Skip to content

Commit

Permalink
build a list of all of the stairsplus slab/stair/etc... shapes (#70)
Browse files Browse the repository at this point in the history
for other mods to reference.
  • Loading branch information
Vanessa Ezekowitz authored and Calinou committed Feb 23, 2017
1 parent 5f35766 commit e9c6cef
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stairsplus/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions stairsplus/microblocks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions stairsplus/panels.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions stairsplus/slabs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions stairsplus/slopes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions stairsplus/stairs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e9c6cef

Please sign in to comment.