diff options
author | Calinou <calinou@opmbx.org> | 2015-03-03 21:32:51 +0100 |
---|---|---|
committer | Calinou <calinou@opmbx.org> | 2015-03-03 21:32:51 +0100 |
commit | a360b8e83f24030b7cb2ccf483cd194ffe4e3e31 (patch) | |
tree | 2b86846613c269c617ff316501f2ec3f3439d4c6 | |
parent | d3c775ba3adc01644eb23716bd42cd8e6a240291 (diff) | |
download | moreblocks-a360b8e83f24030b7cb2ccf483cd194ffe4e3e31.tar.gz moreblocks-a360b8e83f24030b7cb2ccf483cd194ffe4e3e31.tar.bz2 moreblocks-a360b8e83f24030b7cb2ccf483cd194ffe4e3e31.zip |
Add size information to slab description (by est31).
-rw-r--r-- | stairsplus/slabs.lua | 59 |
1 files changed, 15 insertions, 44 deletions
diff --git a/stairsplus/slabs.lua b/stairsplus/slabs.lua index 68ba520..9777ac2 100644 --- a/stairsplus/slabs.lua +++ b/stairsplus/slabs.lua @@ -22,51 +22,22 @@ end function stairsplus:register_slab(modname, subname, recipeitem, fields) local defs = { - [""] = { - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, - }, - }, - ["_quarter"] = { - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}, - }, - }, - ["_three_quarter"] = { - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5}, - }, - }, - ["_1"] = { - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, - }, - }, - ["_2"] = { - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, - }, - }, - ["_14"] = { - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0.375, 0.5}, - }, - }, - ["_15"] = { + [""] = 8, + ["_quarter"] = 4, + ["_three_quarter"] = 12, + ["_1"] = 1, + ["_2"] = 2, + ["_14"] = 14, + ["_15"] = 15, + } + 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, 0.4375, 0.5}, - }, - }, - } - local desc = S("%s Slab"):format(fields.description) - for alternate, def in pairs(defs) do + fixed = {-0.5, -0.5, -0.5, 0.5, (num/16)-0.5, 0.5}, + } + } def.drawtype = "nodebox" def.paramtype = "light" def.paramtype2 = "facedir" @@ -74,7 +45,7 @@ function stairsplus:register_slab(modname, subname, recipeitem, fields) for k, v in pairs(fields) do def[k] = v end - def.description = desc + def.description = ("%s (%d/16)"):format(desc_base, num) if fields.drop then def.drop = modname.. ":slab_" .. fields.drop .. alternate end |