summaryrefslogtreecommitdiff
path: root/moreblocks/stairsplus
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-21 16:55:18 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-21 16:55:18 -0500
commitce4189f6f001cb4a02d23254a0904e12641c2499 (patch)
tree082134afbfc39b512e3685606f96cd87e0714250 /moreblocks/stairsplus
parentfad2d803001b00807efd9bcba33daf0cc620f8aa (diff)
downloaddreambuilder_modpack-ce4189f6f001cb4a02d23254a0904e12641c2499.tar
dreambuilder_modpack-ce4189f6f001cb4a02d23254a0904e12641c2499.tar.gz
dreambuilder_modpack-ce4189f6f001cb4a02d23254a0904e12641c2499.tar.bz2
dreambuilder_modpack-ce4189f6f001cb4a02d23254a0904e12641c2499.tar.xz
dreambuilder_modpack-ce4189f6f001cb4a02d23254a0904e12641c2499.zip
update moreblocks (a few new shapes by me :) )
Diffstat (limited to 'moreblocks/stairsplus')
-rw-r--r--moreblocks/stairsplus/slabs.lua43
1 files changed, 36 insertions, 7 deletions
diff --git a/moreblocks/stairsplus/slabs.lua b/moreblocks/stairsplus/slabs.lua
index 2a86b0f..5d9a434 100644
--- a/moreblocks/stairsplus/slabs.lua
+++ b/moreblocks/stairsplus/slabs.lua
@@ -28,6 +28,20 @@ local slabs_defs = {
["_2"] = 2,
["_14"] = 14,
["_15"] = 15,
+ ["_two_sides"] = {
+ { -0.5, -0.5, -0.5, 0.5, -7/16, 7/16 },
+ { -0.5, -0.5, 7/16, 0.5, 0.5, 0.5 }
+ },
+ ["_three_sides"] = {
+ { -7/16, -0.5, -0.5, 0.5, -7/16, 7/16 },
+ { -7/16, -0.5, 7/16, 0.5, 0.5, 0.5 },
+ { -0.5, -0.5, -0.5, -7/16, 0.5, 0.5 }
+ },
+ ["_three_sides_u"] = {
+ { -0.5, -0.5, -0.5, 0.5, 0.5, -7/16 },
+ { -0.5, -0.5, -7/16, 0.5, -7/16, 7/16 },
+ { -0.5, -0.5, 7/16, 0.5, 0.5, 0.5 }
+ }
}
function stairsplus:register_slab_alias(modname_old, subname_old, modname_new, subname_new)
@@ -47,21 +61,36 @@ end
function stairsplus:register_slab(modname, subname, recipeitem, fields)
local defs = stairsplus.copytable(slabs_defs)
local desc_base = S("%s Slab"):format(fields.description)
- for alternate, num in pairs(defs) do
- local def = {
- node_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, (num/16)-0.5, 0.5},
+ for alternate, shape in pairs(defs) do
+
+ local def = {}
+
+ if type(shape) ~= "table" then
+ def = {
+ node_box = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, -0.5, 0.5, (shape/16)-0.5, 0.5},
+ },
+ description = ("%s (%d/16)"):format(desc_base, shape)
+ }
+ else
+ def = {
+ node_box = {
+ type = "fixed",
+ fixed = shape,
+ },
+ description = desc_base
}
- }
+ end
+
for k, v in pairs(fields) do
def[k] = v
end
+
def.drawtype = "nodebox"
def.paramtype = "light"
def.paramtype2 = def.paramtype2 or "facedir"
def.on_place = minetest.rotate_node
- def.description = ("%s (%d/16)"):format(desc_base, num)
def.groups = stairsplus:prepare_groups(fields.groups)
if fields.drop and not (type(fields.drop) == "table") then
def.drop = modname.. ":slab_" .. fields.drop .. alternate