diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2018-02-13 14:05:34 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2018-02-13 14:05:34 -0500 |
commit | 335d9a3eddcb590c3ca5de9cba9b152e5e560af1 (patch) | |
tree | 1b95d73b945fbc9924438c28a35d7f1019fa255f /moreblocks/stairsplus/slabs.lua | |
parent | 1d0f113f4c5afcf8479973f2e01786fb9a1fbbb7 (diff) | |
download | dreambuilder_modpack-335d9a3eddcb590c3ca5de9cba9b152e5e560af1.tar dreambuilder_modpack-335d9a3eddcb590c3ca5de9cba9b152e5e560af1.tar.gz dreambuilder_modpack-335d9a3eddcb590c3ca5de9cba9b152e5e560af1.tar.bz2 dreambuilder_modpack-335d9a3eddcb590c3ca5de9cba9b152e5e560af1.tar.xz dreambuilder_modpack-335d9a3eddcb590c3ca5de9cba9b152e5e560af1.zip |
removed boost_cart and carbone_mobs -- too many crashes
updated blox, homedecor, plantlifed, cottages, farming_redo,
framedglass, gloopblocks, mesecons, moreblocks, moretrees,
pipeworks, player_textures, replacer, signs_lib, stained_glass,
technic, travelnet, unified_inventory, unifieddyes, and worldedit.
Diffstat (limited to 'moreblocks/stairsplus/slabs.lua')
-rw-r--r-- | moreblocks/stairsplus/slabs.lua | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/moreblocks/stairsplus/slabs.lua b/moreblocks/stairsplus/slabs.lua index ea9dbc5..de7f031 100644 --- a/moreblocks/stairsplus/slabs.lua +++ b/moreblocks/stairsplus/slabs.lua @@ -66,29 +66,24 @@ 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, shape in pairs(defs) do - local def = {} - + for k, v in pairs(fields) do + def[k] = v + end if type(shape) ~= "table" then - def = { - node_box = { + 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) - } + } + def.description = ("%s (%d/16)"):format(desc_base, shape) else - def = { - node_box = { + def.node_box = { type = "fixed", fixed = shape, - }, - description = desc_base - } - end - - for k, v in pairs(fields) do - def[k] = v + } + local desc_x = alternate:gsub("_", " ") + desc_x = desc_x:gsub("(%a)(%S*)", function(a, b) return a:upper() .. b end) + def.description = desc_base .. desc_x end def.drawtype = "nodebox" @@ -96,12 +91,14 @@ function stairsplus:register_slab(modname, subname, recipeitem, fields) def.paramtype2 = def.paramtype2 or "facedir" def.on_place = minetest.rotate_node def.groups = stairsplus:prepare_groups(fields.groups) + if alternate == "" then + def.groups.slab = 1 + end if fields.drop and not (type(fields.drop) == "table") then def.drop = modname.. ":slab_" .. fields.drop .. alternate end minetest.register_node(":" .. modname .. ":slab_" .. subname .. alternate, def) end - minetest.register_alias("stairs:slab_" .. subname, modname .. ":slab_" .. subname) circular_saw.known_nodes[recipeitem] = {modname, subname} |