summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2013-12-19 12:54:57 -0800
committercheapie <no-email-for-you@example.com>2013-12-19 12:54:57 -0800
commit6389840f4f0a3cf432c5c77fb5b5dc97189677e3 (patch)
tree1330864e04f005d26d4ff309a5ab9e1f0799fe5f
parent2845fc73acfd59fb212a42b90e20970de8a274a3 (diff)
parent846998e9da03470d2d25bb4f698163942414eefc (diff)
downloadplasticbox-6389840f4f0a3cf432c5c77fb5b5dc97189677e3.tar
plasticbox-6389840f4f0a3cf432c5c77fb5b5dc97189677e3.tar.gz
plasticbox-6389840f4f0a3cf432c5c77fb5b5dc97189677e3.tar.bz2
plasticbox-6389840f4f0a3cf432c5c77fb5b5dc97189677e3.tar.xz
plasticbox-6389840f4f0a3cf432c5c77fb5b5dc97189677e3.zip
Merge pull request #4 from kizeren/master
Added stairs/panels/micro odds and ends.
-rw-r--r--init.lua130
1 files changed, 130 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index dba95a5..e2c76f6 100644
--- a/init.lua
+++ b/init.lua
@@ -1,3 +1,22 @@
+plasticbox = {}
+plasticbox.colorlist = {
+ {"black", "Black 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 +208,114 @@ minetest.register_craft({
output = 'plasticbox:plasticbox_yellow',
recipe = {'plasticbox:plasticbox', 'group:basecolor_yellow'},
})
+
+--ugly below here.
+
+if minetest.get_modpath("moreblocks") then
+ register_stair(
+ "plasticbox",
+ "plasticbox",
+ "plasticbox:plasticbox",
+ { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2 },
+ { "plasticbox.png",
+ },
+ "plasticbox",
+ "plasticbox",
+ 0
+ )
+ register_slab(
+ "plasticbox",
+ "plasticbox",
+ "plasticbox:plasticbox",
+ { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2 },
+ { "plasticbox.png",
+ },
+ "plasticbox",
+ "plasticbox",
+ 0
+ )
+
+ register_panel(
+ "plasticbox",
+ "plasticbox",
+ "plasticbox:plasticbox",
+ { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2 },
+ { "plasticbox.png",
+ },
+ "plasticbox",
+ "plasticbox",
+ 0
+ )
+
+ register_micro(
+ "plasticbox",
+ "plasticbox",
+ "plasticbox:plasticbox",
+ { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2 },
+ { "plasticbox.png",
+ },
+ "plasticbox",
+ "plasticbox",
+ 0
+ )
+ table.insert(circular_saw.known_stairs, "plasticbox:plasticbox")
+
+end
+
+
+
+for i in ipairs(plasticbox.colorlist) do
+ local colorname = plasticbox.colorlist[i][1]
+ local desc = plasticbox.colorlist[i][2]
+
+ if minetest.get_modpath("moreblocks") then
+ register_stair(
+ "plasticbox",
+ "plasticbox_"..colorname,
+ "plasticbox:plasticbox_"..colorname,
+ { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2 },
+ { "plasticbox_"..colorname..".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_"..colorname..".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_"..colorname..".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_"..colorname..".png",
+ },
+ "plasticbox_"..desc,
+ "plasticbox_"..colorname,
+ 0
+ )
+ table.insert(circular_saw.known_stairs, "plasticbox:plasticbox_"..colorname)
+
+ end
+end