From 24e0a9728ae668e1471bf35c3c02553247f6aeb7 Mon Sep 17 00:00:00 2001 From: kizeren Date: Tue, 17 Dec 2013 20:13:20 -0600 Subject: [PATCH 1/6] Adding stairs Added stairs, micro, panels, slabs. No images yet. --- init.lua | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) 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 From a0c9104d8862eff6e9fc55b5f6766bf2a40edb8b Mon Sep 17 00:00:00 2001 From: kizeren Date: Tue, 17 Dec 2013 21:35:57 -0600 Subject: [PATCH 2/6] Update init.lua --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index 840afb5..6b294a4 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,4 @@ +plasticbox = {} plasticbox.colorlist = { {"black", "Blakc Plastic Stairs"}, {"blue", "Blue Plastic Stairs"}, From fc05fdc7d41ba071cd7449875efb1bb4dc130715 Mon Sep 17 00:00:00 2001 From: kizeren Date: Tue, 17 Dec 2013 21:42:52 -0600 Subject: [PATCH 3/6] Update init.lua --- init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 6b294a4..99d8292 100644 --- a/init.lua +++ b/init.lua @@ -214,7 +214,8 @@ for i in ipairs(plasticbox.colorlist) do local colorname = plasticbox.colorlist[i][1] local desc = plasticbox.colorlist[i][2] - register_stair( + if minetest.get_modpath("moreblocks") then + register_stair( "plasticbox", "plasticbox_"..colorname, "plasticbox:plasticbox_"..colorname, From c55e0f5c03a4340a459f7741b8006d3af6c057c6 Mon Sep 17 00:00:00 2001 From: kizeren Date: Wed, 18 Dec 2013 21:13:53 -0600 Subject: [PATCH 4/6] forgot and "end" tag --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index 99d8292..488ce7e 100644 --- a/init.lua +++ b/init.lua @@ -261,4 +261,5 @@ for i in ipairs(plasticbox.colorlist) do "plasticbox_"..colorname, 0 ) + end end From aa2c7784046d8b1a14aa4fec99f73bf256645dea Mon Sep 17 00:00:00 2001 From: kizeren Date: Wed, 18 Dec 2013 21:40:08 -0600 Subject: [PATCH 5/6] added crafting of microblocks via tablesaw --- init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.lua b/init.lua index 488ce7e..c7278b5 100644 --- a/init.lua +++ b/init.lua @@ -261,5 +261,7 @@ for i in ipairs(plasticbox.colorlist) do "plasticbox_"..colorname, 0 ) + table.insert(circular_saw.known_stairs, "plasticbox:plasticbox_"..colorname) + end end From 759c3b26dbb28ad07f0243d7bec01cd572ba3166 Mon Sep 17 00:00:00 2001 From: kizeren Date: Wed, 18 Dec 2013 22:07:56 -0600 Subject: [PATCH 6/6] fixing png names also added the plain plasticbox --- init.lua | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 59 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index c7278b5..e2c76f6 100644 --- a/init.lua +++ b/init.lua @@ -1,6 +1,6 @@ plasticbox = {} plasticbox.colorlist = { - {"black", "Blakc Plastic Stairs"}, + {"black", "Black Plastic Stairs"}, {"blue", "Blue Plastic Stairs"}, {"brown", "Brown Plastic Stairs"}, {"cyan", "Cyan Plastic Stairs"}, @@ -209,6 +209,60 @@ minetest.register_craft({ 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] @@ -220,7 +274,7 @@ for i in ipairs(plasticbox.colorlist) do "plasticbox_"..colorname, "plasticbox:plasticbox_"..colorname, { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2 }, - { "plasticbox:plasticbox_"..colorname.."_stair.png", + { "plasticbox_"..colorname..".png", }, "plasticbox_"..desc, "plasticbox_"..colorname, @@ -231,7 +285,7 @@ for i in ipairs(plasticbox.colorlist) do "plasticbox_"..colorname, "plasticbox:plasticbox_"..colorname, { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2 }, - { "plasticbox:plasticbox_"..colorname.."_stair.png", + { "plasticbox_"..colorname..".png", }, "plasticbox_"..desc, "plasticbox_"..colorname, @@ -243,7 +297,7 @@ for i in ipairs(plasticbox.colorlist) do "plasticbox_"..colorname, "plasticbox:plasticbox_"..colorname, { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2 }, - { "plasticbox:plasticbox_"..colorname.."_stair.png", + { "plasticbox_"..colorname..".png", }, "plasticbox_"..desc, "plasticbox_"..colorname, @@ -255,7 +309,7 @@ for i in ipairs(plasticbox.colorlist) do "plasticbox_"..colorname, "plasticbox:plasticbox_"..colorname, { snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2 }, - { "plasticbox:plasticbox_"..colorname.."_stair.png", + { "plasticbox_"..colorname..".png", }, "plasticbox_"..desc, "plasticbox_"..colorname,