summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2013-12-17 20:13:20 -0600
committercheapie <no-email-for-you@example.com>2013-12-17 20:13:20 -0600
commit4a8a5f7a09cb2c4fdfe508c73cc3c70cdbbbe8f5 (patch)
tree9b4092ab5798da5e691c6b38e8c7155c4128420c
parent4d699fadcfaeb4dc9bbaef5b32217d09c7e6b4c5 (diff)
downloadplasticbox-4a8a5f7a09cb2c4fdfe508c73cc3c70cdbbbe8f5.tar
plasticbox-4a8a5f7a09cb2c4fdfe508c73cc3c70cdbbbe8f5.tar.gz
plasticbox-4a8a5f7a09cb2c4fdfe508c73cc3c70cdbbbe8f5.tar.bz2
plasticbox-4a8a5f7a09cb2c4fdfe508c73cc3c70cdbbbe8f5.tar.xz
plasticbox-4a8a5f7a09cb2c4fdfe508c73cc3c70cdbbbe8f5.zip
Adding stairs
Added stairs, micro, panels, slabs. No images yet.
-rw-r--r--init.lua71
1 files changed, 71 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index dba95a5..840afb5 100644
--- a/init.lua
+++ b/init.lua
@@ -1,3 +1,21 @@
+plasticbox.colorlist = {
+ {"black", "Blakc Plastic Stairs"},
+ {"blue", "Blue Plastic Stairs"},
+ {"brown", "Brown Plastic Stairs"},
+ {"cyan", "Cyan Plastic Stairs"},
+ {"green", "Green Plastic Stairs"},
+ {"grey", "Grey Plastic Stairs"},
+ {"magenta", "Magenta Plastic Stairs"},
+ {"orange", "Orange Plastic Stairs"},
+ {"pink", "Pink Plastic Stairs"},
+ {"red", "Red Plastic Stairs"},
+ {"violet", "Violet Plastic Stairs"},
+ {"white", "White Plastic Stairs"},
+ {"yellow", "Yellow Plastic Stairs"},
+}
+
+
+
--Register Nodes, assign textures, blah, blah...
minetest.register_node("plasticbox:plasticbox", {
description = "Plain Plastic Box",
@@ -189,3 +207,56 @@ minetest.register_craft({
output = 'plasticbox:plasticbox_yellow',
recipe = {'plasticbox:plasticbox', 'group:basecolor_yellow'},
})
+
+
+for i in ipairs(plasticbox.colorlist) do
+ local colorname = plasticbox.colorlist[i][1]
+ local desc = plasticbox.colorlist[i][2]
+
+ register_stair(
+ "plasticbox",
+ "plasticbox_"..colorname,
+ "plasticbox:plasticbox_"..colorname,
+ { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2 },
+ { "plasticbox:plasticbox_"..colorname.."_stair.png",
+ },
+ "plasticbox_"..desc,
+ "plasticbox_"..colorname,
+ 0
+ )
+ register_slab(
+ "plasticbox",
+ "plasticbox_"..colorname,
+ "plasticbox:plasticbox_"..colorname,
+ { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2 },
+ { "plasticbox:plasticbox_"..colorname.."_stair.png",
+ },
+ "plasticbox_"..desc,
+ "plasticbox_"..colorname,
+ 0
+ )
+
+ register_panel(
+ "plasticbox",
+ "plasticbox_"..colorname,
+ "plasticbox:plasticbox_"..colorname,
+ { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2 },
+ { "plasticbox:plasticbox_"..colorname.."_stair.png",
+ },
+ "plasticbox_"..desc,
+ "plasticbox_"..colorname,
+ 0
+ )
+
+ register_micro(
+ "plasticbox",
+ "plasticbox_"..colorname,
+ "plasticbox:plasticbox_"..colorname,
+ { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2 },
+ { "plasticbox:plasticbox_"..colorname.."_stair.png",
+ },
+ "plasticbox_"..desc,
+ "plasticbox_"..colorname,
+ 0
+ )
+end