From 1a5f620a306905134b69f50ddf5a767dc8eebd13 Mon Sep 17 00:00:00 2001 From: andersje Date: Mon, 26 Aug 2013 05:23:35 -0400 Subject: [PATCH 1/2] Rewrote the base code a bit to make the whole thing more readable. (VanessaE) Added low-glow and no-glow versions all colors/shades. (andersje) --- high_glow.lua | 73 +++++++++ init.lua | 234 ++++++++++------------------- low_glow.lua | 73 +++++++++ no_glow.lua | 68 +++++++++ textures/stained_glass_lime.png | Bin 701 -> 492 bytes textures/stained_glass_magenta.png | Bin 701 -> 485 bytes 6 files changed, 297 insertions(+), 151 deletions(-) create mode 100644 high_glow.lua create mode 100644 low_glow.lua create mode 100644 no_glow.lua diff --git a/high_glow.lua b/high_glow.lua new file mode 100644 index 0000000..84d4acc --- /dev/null +++ b/high_glow.lua @@ -0,0 +1,73 @@ +for i in ipairs(stained_glass_hues) do + + local huename = stained_glass_hues[i][1] + local huenumber = i + + for j in ipairs(stained_glass_shades) do + + local shadename = stained_glass_shades[j][1] + local shadenumber = stained_glass_shades[j][2] + + local recipevalue = nil + + if stained_glass_hues[i][2] then + recipevalue = "dye:"..shadename..huename + else + recipevalue = "group:dye,unicolor_"..shadename..huename + end + + if shadename == "dark_" or shadename == "medium_" or shadename == "" then + + stained_glass_define_regular({ + colorcode = huenumber.."_"..shadenumber.."_7", + colorname = shadename..huename, + recipe = recipevalue, + light = LIGHT_MAX, + prefix = "", + glasstype = "moreblocks:super_glow_glass" + }) + + stained_glass_define_regular({ + colorcode = huenumber.."_"..shadenumber.."_6", + colorname = shadename..huename.."_s50", + recipe = recipevalue.."_s50", + light = LIGHT_MAX, + prefix = "", + glasstype = "moreblocks:super_glow_glass" + }) + + elseif shadename == "light_" then + + stained_glass_define_regular({ + colorcode = huenumber.."_"..shadenumber.."_", + colorname = shadename..huename, + recipe = recipevalue, + light = LIGHT_MAX, + prefix = "", + glasstype = "moreblocks:super_glow_glass" + }) + + elseif shadename == "pastel_" then + + stained_glass_define_pastel({ + colorcode = huenumber.."_"..shadenumber.."_", + colorname = shadename..huename, + recipe = recipevalue, + light = LIGHT_MAX, + prefix = "", + glasstype = "moreblocks:super_glow_glass" + }) + + elseif shadename == "faint_" then + + stained_glass_define_faint({ + colorcode = huenumber.."_"..shadenumber.."_", + colorname = shadename..huename, + recipe = recipevalue, + light = LIGHT_MAX, + prefix = "", + glasstype = "moreblocks:super_glow_glass" + }) + end + end +end diff --git a/init.lua b/init.lua index 839d594..8a5634c 100644 --- a/init.lua +++ b/init.lua @@ -1,6 +1,6 @@ --[[ -Stained Glass 1.4 +Stained Glass 1.5 This mod provides luminescent stained glass blocks for Minetest 0.4.x. @@ -23,6 +23,9 @@ out of creative inventory. August 2013 -- Jeremy Anderson tries to get this working after the new color changes, and to resurrect the craft recipes. Still GPL'd as far as I'm concerned. + +August 2013 -- rewritten a bit by VanessaEzekowitz to further condense the code. + ============================================================================== @@ -53,225 +56,154 @@ super glow glass super glow glass -All recipes produce three glowing stained glass blocks. +All recipes produce three stained glass blocks. ============================================================================== ]]-- function makenode(arg) name=arg.blockname + --register item attributes - minetest.register_node("stained_glass:" .. name, { - description = "Stained Glass - " .. name, + minetest.register_node("stained_glass:"..arg.prefix..name, { + description = "Stained Glass - "..arg.prefix..name, drawtype = "glasslike", tiles = {"stained_glass_" .. name .. ".png"}, paramtype = "light", sunlight_propagates = true, use_texture_alpha = true, - light_source = LIGHT_MAX, - -- now using light_max, so we're always as bright as possible. - -- future possibility is to allow gentle glow bricks. + light_source = arg.light, is_ground_content = true, - groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1}, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, -- , not_in_creative_inventory=1}, sounds = default.node_sound_glass_defaults() }) - end -function defineregular (arg) + +-- the purpose of this is to abstract out all the registration +-- stuff - duplicated code is bad mmmmmkay? At least where one can avoid it + +-- so, instead of 4 loops that each have craft registrations, +-- we'll have one block that does registrations, and just call +-- the procedure repeatedly +-- + +function stained_glass_define_regular(arg) code=arg.colorcode name=arg.colorname mydye=arg.recipe + myprefix = arg.prefix + glasstype = arg.glasstype - -- the purpose of this is to abstract out all the registration - -- stuff - duplicated code is bad mmmmmkay? At least where one can avoid it - - -- so, instead of 4 loops that each have craft registrations, - -- we'll have one block that does registrations, and just call - -- the procedure repeatedly - -- minetest.register_craft({ type = "shapeless", - output = "stained_glass:" .. name .." 3", + output = "stained_glass:"..myprefix..name.." 3", recipe = { mydye, - "moreblocks:super_glow_glass", - "moreblocks:super_glow_glass", - "moreblocks:super_glow_glass", + glasstype, + glasstype, + glasstype, }, }) - makenode{blockname=name} + makenode{blockname=name, light=arg.light, prefix=myprefix} - minetest.register_alias( "stained_glass:" .. code, "stained_glass:" .. name) + if myprefix == "" then + minetest.register_alias( "stained_glass:" .. code, "stained_glass:" .. name) + end -- and an alias from the numeric to the named block -- we need to keep the numeric block for all the people that used -- pre-v1.4 blocks in their worlds. end -function definelight(arg) +function stained_glass_define_pastel(arg) code=arg.colorcode name=arg.colorname mydye=arg.recipe - - makenode{blockname=name} + myprefix = arg.prefix + glasstype = arg.glasstype minetest.register_craft({ type = "shapeless", - output = "stained_glass:" .. name .." 3", + output = "stained_glass:"..myprefix..name .." 3", recipe = { mydye, "dye:white", - "moreblocks:super_glow_glass", - "moreblocks:super_glow_glass", - "moreblocks:super_glow_glass", + glasstype, + glasstype, + glasstype, }, }) - minetest.register_alias( "stained_glass:" .. code, "stained_glass:" .. name) + + makenode{blockname=name,light=arg.light, prefix=myprefix} + + if myprefix == "" then + minetest.register_alias( "stained_glass:" .. code, "stained_glass:" .. name) + end end -function definepastel (arg) +function stained_glass_define_faint(arg) code=arg.colorcode name=arg.colorname - mydye=arg.recipe + mydye=arg.recipe + myprefix = arg.prefix + glasstype = arg.glasstype minetest.register_craft({ type = "shapeless", - output = "stained_glass:" .. name .." 3", + output = "stained_glass:"..myprefix..name.." 3", recipe = { mydye, "dye:white", "dye:white", - "moreblocks:super_glow_glass", - "moreblocks:super_glow_glass", - "moreblocks:super_glow_glass", + glasstype, + glasstype, + glasstype, }, }) --register item attributes -- - makenode{blockname=name} - minetest.register_alias( "stained_glass:" .. code, "stained_glass:" .. name) + makenode{blockname=name,light=arg.light, prefix=myprefix} + if myprefix == "" then + minetest.register_alias( "stained_glass:" .. code, "stained_glass:" .. name) + end end -defineregular{colorcode="1_3_6", colorname="dark_yellow_s50", recipe="group:dye,unicolor_dark_yellow_s50"} -- works -defineregular{colorcode="1_3_7", colorname="dark_yellow", recipe="group:dye,unicolor_dark_yellow"} -- works -defineregular{colorcode="1_4_6", colorname="medium_yellow_s50", recipe="group:dye,unicolor_medium_yellow_s50"} -- works -defineregular{colorcode="1_4_7", colorname="medium_yellow", recipe="group:dye,unicolor_medium_yellow"} -- works -defineregular{colorcode="1_5_6", colorname="yellow_s50", recipe="group:dye,unicolor_yellow_s50"} -- works -defineregular{colorcode="1_5_7", colorname="yellow", recipe="dye:yellow"} -- works -defineregular{colorcode="2_3_6", colorname="dark_lime_s50", recipe="group:dye,unicolor_dark_lime_s50"} -- works -defineregular{colorcode="2_3_7", colorname="dark_lime", recipe="group:dye,unicolor_dark_lime"} -- works -defineregular{colorcode="2_4_6", colorname="medium_lime_s50", recipe="group:dye,unicolor_medium_lime_s50"} -- works -defineregular{colorcode="2_4_7", colorname="medium_lime", recipe="group:dye,unicolor_medium_lime"} -- works -defineregular{colorcode="2_5_6", colorname="lime_s50", recipe="group:dye,unicolor_lime_s50"} -- works -defineregular{colorcode="2_5_7", colorname="lime", recipe="group:dye,excolor_lime"} -- works -defineregular{colorcode="3_3_6", colorname="dark_green_s50", recipe="group:dye,unicolor_dark_green_s50"} -- works -defineregular{colorcode="3_3_7", colorname="dark_green", recipe="dye:dark_green"} -- seems to be the same as regular green; PROBLEM -defineregular{colorcode="3_4_6", colorname="medium_green_s50", recipe="group:dye,unicolor_medium_green_s50"} -- works -defineregular{colorcode="3_4_7", colorname="medium_green", recipe="group:dye,unicolor_medium_green"} -- works -defineregular{colorcode="3_5_6", colorname="green_s50", recipe="group:dye,unicolor_green_s50"} -- works -defineregular{colorcode="3_5_7", colorname="green", recipe="dye:green"} --works -- do not change to group, or you'll break the darkgreen blocks -defineregular{colorcode="4_3_6", colorname="dark_aqua_s50", recipe="group:dye,unicolor_dark_aqua_s50"} -- works -defineregular{colorcode="4_3_7", colorname="dark_aqua", recipe="group:dye,unicolor_dark_aqua"} -- works -defineregular{colorcode="4_4_6", colorname="medium_aqua_s50", recipe="group:dye,unicolor_medium_aqua_s50"} -- works -defineregular{colorcode="4_4_7", colorname="medium_aqua", recipe="group:dye,unicolor_medium_aqua"} -- works -defineregular{colorcode="4_5_6", colorname="aqua_s50", recipe="group:dye,unicolor_aqua_s50"} -- works -defineregular{colorcode="4_5_7", colorname="aqua", recipe="group:dye,unicolor_aqua"} -- works -defineregular{colorcode="5_3_6", colorname="dark_cyan_s50", recipe="group:dye,unicolor_dark_cyan_s50"} -- works -defineregular{colorcode="5_3_7", colorname="dark_cyan", recipe="group:dye,unicolor_dark_cyan"} -- works -defineregular{colorcode="5_4_6", colorname="medium_cyan_s50", recipe="group:dye,unicolor_medium_cyan_s50"} -- works -defineregular{colorcode="5_4_7", colorname="medium_cyan", recipe="group:dye,unicolor_medium_cyan"} -- works -defineregular{colorcode="5_5_6", colorname="cyan_s50", recipe="group:dye,unicolor_cyan_s50"} -- works -defineregular{colorcode="5_5_7", colorname="cyan", recipe="group:dye,basecolor_cyan"} -- works -defineregular{colorcode="6_3_6", colorname="dark_skyblue_s50", recipe="group:dye,unicolor_dark_skyblue_s50"} -- works -defineregular{colorcode="6_3_7", colorname="dark_skyblue", recipe="group:dye,unicolor_dark_skyblue"} -- works -defineregular{colorcode="6_4_6", colorname="medium_skyblue_s50", recipe="group:dye,unicolor_medium_skyblue_s50"} -- works -defineregular{colorcode="6_4_7", colorname="medium_skyblue", recipe="group:dye,unicolor_medium_skyblue"} -- works -defineregular{colorcode="6_5_6", colorname="skyblue_s50", recipe="group:dye,unicolor_skyblue_s50"} -- works -defineregular{colorcode="6_5_7", colorname="skyblue", recipe="group:dye,excolor_sky_blue"} -- works -defineregular{colorcode="7_3_6", colorname="dark_blue_s50", recipe="group:dye,unicolor_dark_blue_s50"} -- works -defineregular{colorcode="7_3_7", colorname="dark_blue", recipe="group:dye,unicolor_dark_blue"} -- works -defineregular{colorcode="7_4_6", colorname="medium_blue_s50", recipe="group:dye,unicolor_medium_blue_s50"} -- works -defineregular{colorcode="7_4_7", colorname="medium_blue", recipe="group:dye,unicolor_medium_blue"} -- works -defineregular{colorcode="7_5_6", colorname="blue_s50", recipe="group:dye,unicolor_blue_s50"} -- works -defineregular{colorcode="7_5_7", colorname="blue", recipe="group:dye,basecolor_blue"} -- works -defineregular{colorcode="8_3_6", colorname="dark_violet_s50", recipe="group:dye,unicolor_dark_violet_s50"} -- works -defineregular{colorcode="8_3_7", colorname="dark_violet", recipe="group:dye,unicolor_dark_violet"} -- works -defineregular{colorcode="8_4_6", colorname="medium_violet_s50", recipe="group:dye,unicolor_medium_violet_s50"} -- works -defineregular{colorcode="8_4_7", colorname="medium_violet", recipe="group:dye,unicolor_medium_violet"} -- works -defineregular{colorcode="8_5_6", colorname="violet_s50", recipe="group:dye,unicolor_violet_s50"} -- works -defineregular{colorcode="8_5_7", colorname="violet", recipe="group:dye,excolor_violet"} -- works -defineregular{colorcode="9_3_6", colorname="dark_magenta_s50", recipe="group:dye,unicolor_dark_magenta_s50"} -- works -defineregular{colorcode="9_3_7", colorname="dark_magenta", recipe="group:dye,unicolor_dark_magenta"} -- works -defineregular{colorcode="9_4_6", colorname="medium_magenta_s50", recipe="group:dye,unicolor_medium_magenta_s50"} -- works -defineregular{colorcode="9_4_7", colorname="medium_magenta", recipe="group:dye,unicolor_medium_magenta"} -- works -defineregular{colorcode="9_5_6", colorname="magenta_s50", recipe="group:dye,unicolor_magenta_s50"} -- works -defineregular{colorcode="9_5_7", colorname="magenta", recipe="dye:magenta"} -- have to use exact dye name to get right color -defineregular{colorcode="10_3_6", colorname="dark_redviolet_s50", recipe="group:dye,unicolor_dark_redviolet_s50"} -- works -defineregular{colorcode="10_3_7", colorname="dark_redviolet", recipe="group:dye,unicolor_dark_redviolet"} -- works -defineregular{colorcode="10_4_6", colorname="medium_redviolet_s50", recipe="group:dye,unicolor_medium_redviolet_s50"} -- works -defineregular{colorcode="10_4_7", colorname="medium_redviolet", recipe="group:dye,unicolor_medium_redviolet"} -- works -defineregular{colorcode="10_5_6", colorname="redviolet_s50", recipe="group:dye,unicolor_redviolet_s50"} -- works -defineregular{colorcode="10_5_7", colorname="redviolet", recipe="dye:redviolet"} -- works now -- have to use exact dye name on this oone. -- looks broken again -defineregular{colorcode="11_3_6", colorname="dark_red_s50", recipe="group:dye,unicolor_dark_red_s50"} -- works -defineregular{colorcode="11_3_7", colorname="dark_red", recipe="group:dye,unicolor_dark_red"} -- works -defineregular{colorcode="11_4_6", colorname="medium_red_s50", recipe="group:dye,unicolor_medium_red_s50"} -- works -defineregular{colorcode="11_4_7", colorname="medium_red", recipe="group:dye,unicolor_medium_red"} -- works -defineregular{colorcode="11_5_6", colorname="red_s50", recipe="group:dye,unicolor_red_s50"} -- works -defineregular{colorcode="11_5_7", colorname="red", recipe="group:dye,basecolor_red"} -- works -defineregular{colorcode="12_3_6", colorname="dark_orange_s50", recipe="group:dye,unicolor_dark_orange_s50"} --works -defineregular{colorcode="12_3_7", colorname="dark_orange", recipe="group:dye,unicolor_dark_orange"} -- works -defineregular{colorcode="12_4_6", colorname="medium_orange_s50", recipe="group:dye,unicolor_medium_orange_s50"} -- works -defineregular{colorcode="12_4_7", colorname="medium_orange", recipe="group:dye,unicolor_medium_orange"} -- works -defineregular{colorcode="12_5_6", colorname="orange_s50", recipe="group:dye,unicolor_orange_s50"} -- works -defineregular{colorcode="12_5_7", colorname="orange", recipe="group:dye,basecolor_orange"} -- works +-- true means this color's recipe must use a direct "dye:xxxxx" item name +-- (perhaps because the related groups overlap two or more distinct colors) +-- false means the recipe uses "group:dye,unicolor_xxxxx" ---if i could've figured out a way to pass multiple items in on recipe, I wouldn't have had to make --- definelight or definepastel +stained_glass_hues = { + { "yellow", true }, + { "lime", false }, + { "green", true }, + { "aqua", false }, + { "cyan", false }, + { "skyblue", false }, + { "blue", false }, + { "violet", true }, + { "magenta", true }, + { "redviolet", true }, + { "red", true }, + { "orange", false }, +} -definelight{colorcode="1_8", colorname="light_yellow", recipe="group:dye,unicolor_light_yellow"} -- works -definelight{colorcode="2_8", colorname="light_lime", recipe="group:dye,unicolor_light_lime"} -- works -definelight{colorcode="3_8", colorname="light_green", recipe="group:dye,unicolor_light_green"} -- works -definelight{colorcode="4_8", colorname="light_aqua", recipe="group:dye,unicolor_light_aqua"} -- works -definelight{colorcode="5_8", colorname="light_cyan", recipe="group:dye,unicolor_light_cyan"} -- works -definelight{colorcode="6_8", colorname="light_skyblue", recipe="group:dye,unicolor_light_skyblue"} -- works -definelight{colorcode="7_8", colorname="light_blue", recipe="group:dye,unicolor_light_blue"} -- works -definelight{colorcode="8_8", colorname="light_violet", recipe="group:dye,unicolor_light_violet"} -- works -definelight{colorcode="9_8", colorname="light_magenta", recipe="group:dye,unicolor_light_magenta"} --works -definelight{colorcode="10_8", colorname="light_redviolet", recipe="group:dye,unicolor_light_redviolet"} -- works -definelight{colorcode="11_8", colorname="light_red", recipe="group:dye,unicolor_light_red"} -- works (with pink, too!) -definelight{colorcode="12_8", colorname="light_orange", recipe="group:dye,unicolor_light_orange"} --works +stained_glass_shades = { + {"dark_", 3 }, + {"medium_", 4 }, + {"", 5 }, -- full brightness + {"light_", 8 }, + {"pastel_", 9 }, + {"faint_", 91 } +} -definepastel{colorcode="1_9", colorname="pastel_yellow", recipe="group:dye,unicolor_light_yellow"} -defineregular{colorcode="2_9", colorname="pastel_lime", recipe="group:dye,unicolor_light_lime"} -defineregular{colorcode="3_9", colorname="pastel_green", recipe="group:dye,unicolor_light_green"} -defineregular{colorcode="4_9", colorname="pastel_aqua", recipe="group:dye,excolor_light_aqua"} -defineregular{colorcode="5_9", colorname="pastel_cyan", recipe="group:dye,unicolor_light_cyan"} -defineregular{colorcode="6_9", colorname="pastel_skyblue", recipe="group:dye,unicolor_light_skyblue"} -defineregular{colorcode="7_9", colorname="pastel_blue", recipe="group:dye,unicolor_light_blue"} -defineregular{colorcode="8_9", colorname="pastel_violet", recipe="group:dye,unicolor_light_violet"} -defineregular{colorcode="9_9", colorname="pastel_magenta", recipe="\"group:dye,unicolor_light_magenta"} -defineregular{colorcode="10_9", colorname="pastel_redviolet", recipe="group:dye,unicolor_light_redviolet"} -defineregular{colorcode="11_9", colorname="pastel_red", recipe="group:dye,unicolor_light_red"} -defineregular{colorcode="12_9", colorname="pastel_orange", recipe="group:dye,unicolor_light_orange"} -defineregular{colorcode="1_91", colorname="faint_yellow", recipe="group:dye,unicolor_light_yellow"} -defineregular{colorcode="2_91", colorname="faint_lime", recipe="group:dye,unicolor_light_lime"} -defineregular{colorcode="3_91", colorname="faint_green", recipe="group:dye,unicolor_light_green"} -defineregular{colorcode="4_91", colorname="faint_aqua", recipe="group:dye,unicolor_light_aqua"} -defineregular{colorcode="5_91", colorname="faint_cyan", recipe="group:dye,unicolor_light_cyan"} -defineregular{colorcode="6_91", colorname="faint_skyblue", recipe="group:dye,unicolor_light_skyblue"} -defineregular{colorcode="7_91", colorname="faint_blue", recipe="group:dye,unicolor_light_blue"} -defineregular{colorcode="8_91", colorname="faint_violet", recipe="group:dye,unicolor_light_violet"} -defineregular{colorcode="9_91", colorname="faint_magenta", recipe="group:dye,unicolor_light_magenta"} -defineregular{colorcode="10_91", colorname="faint_redviolet", recipe="group:dye,unicolor_light_redviolet"} -defineregular{colorcode="11_91", colorname="faint_red", recipe="group:dye,unicolor_light_red"} -defineregular{colorcode="12_91", colorname="faint_orange", recipe="group:dye,unicolor_light_orange"} - --- END JDA +dofile(minetest.get_modpath("stained_glass").."/high_glow.lua") +dofile(minetest.get_modpath("stained_glass").."/low_glow.lua") +dofile(minetest.get_modpath("stained_glass").."/no_glow.lua") print("[stained_glass] Loaded!") diff --git a/low_glow.lua b/low_glow.lua new file mode 100644 index 0000000..fd89428 --- /dev/null +++ b/low_glow.lua @@ -0,0 +1,73 @@ +for i in ipairs(stained_glass_hues) do + + local huename = stained_glass_hues[i][1] + local huenumber = i + + for j in ipairs(stained_glass_shades) do + + local shadename = stained_glass_shades[j][1] + local shadenumber = stained_glass_shades[j][2] + + local recipevalue = nil + + if stained_glass_hues[i][2] then + recipevalue = "dye:"..shadename..huename + else + recipevalue = "group:dye,unicolor_"..shadename..huename + end + + if shadename == "dark_" or shadename == "medium_" or shadename == "" then + + stained_glass_define_regular({ + colorcode = huenumber.."_"..shadenumber.."_7", + colorname = shadename..huename, + recipe = recipevalue, + prefix = "lowglow_", + light = LIGHT_MAX - 3, + glasstype = "moreblocks:glow_glass" + }) + + stained_glass_define_regular({ + colorcode = huenumber.."_"..shadenumber.."_6", + colorname = shadename..huename.."_s50", + recipe = recipevalue.."_s50", + prefix = "lowglow_", + light = LIGHT_MAX - 3, + glasstype = "moreblocks:glow_glass" + }) + + elseif shadename == "light_" then + + stained_glass_define_regular({ + colorcode = huenumber.."_"..shadenumber.."_", + colorname = shadename..huename, + recipe = recipevalue, + prefix = "lowglow_", + light = LIGHT_MAX - 3, + glasstype = "moreblocks:glow_glass" + }) + + elseif shadename == "pastel_" then + + stained_glass_define_pastel({ + colorcode = huenumber.."_"..shadenumber.."_", + colorname = shadename..huename, + recipe = recipevalue, + prefix = "lowglow_", + light = LIGHT_MAX - 3, + glasstype = "moreblocks:glow_glass" + }) + + elseif shadename == "faint_" then + + stained_glass_define_faint({ + colorcode = huenumber.."_"..shadenumber.."_", + colorname = shadename..huename, + recipe = recipevalue, + prefix = "lowglow_", + light = LIGHT_MAX - 3, + glasstype = "moreblocks:glow_glass" + }) + end + end +end diff --git a/no_glow.lua b/no_glow.lua new file mode 100644 index 0000000..50535a7 --- /dev/null +++ b/no_glow.lua @@ -0,0 +1,68 @@ +for i in ipairs(stained_glass_hues) do + + local huename = stained_glass_hues[i][1] + local huenumber = i + + for j in ipairs(stained_glass_shades) do + + local shadename = stained_glass_shades[j][1] + local shadenumber = stained_glass_shades[j][2] + + local recipevalue = nil + + if stained_glass_hues[i][2] then + recipevalue = "dye:"..shadename..huename + else + recipevalue = "group:dye,unicolor_"..shadename..huename + end + + if shadename == "dark_" or shadename == "medium_" or shadename == "" then + + stained_glass_define_regular({ + colorcode = huenumber.."_"..shadenumber.."_7", + colorname = shadename..huename, + recipe = recipevalue, + prefix = "noglow_", + glasstype = "default:glass" + }) + + stained_glass_define_regular({ + colorcode = huenumber.."_"..shadenumber.."_6", + colorname = shadename..huename.."_s50", + recipe = recipevalue.."_s50", + prefix = "noglow_", + glasstype = "default:glass" + }) + + elseif shadename == "light_" then + + stained_glass_define_regular({ + colorcode = huenumber.."_"..shadenumber.."_", + colorname = shadename..huename, + recipe = recipevalue, + prefix = "noglow_", + glasstype = "default:glass" + }) + + elseif shadename == "pastel_" then + + stained_glass_define_pastel({ + colorcode = huenumber.."_"..shadenumber.."_", + colorname = shadename..huename, + recipe = recipevalue, + prefix = "noglow_", + glasstype = "default:glass" + }) + + elseif shadename == "faint_" then + + stained_glass_define_faint({ + colorcode = huenumber.."_"..shadenumber.."_", + colorname = shadename..huename, + recipe = recipevalue, + prefix = "noglow_", + glasstype = "default:glass" + }) + end + end +end diff --git a/textures/stained_glass_lime.png b/textures/stained_glass_lime.png index 6b30e34a55ad93434dfcf27d49b1d3604c489dc5..3990458956edb8d7f6ac24dee02c99f13796c2af 100644 GIT binary patch delta 477 zcmV<30V4jr1?&Tm8Gi-<001BJ|6u?C0kcU&K~y-)rISl;6fqEnKR^0KXL`aS69tH1 z#Rd9K9D<|dPCi2-0z^nG5)TvlWt&BHGo9HXTC&=9RsDZe{Vw(S7m5G)EI=Ijgn~Fi z7$8oN669xKGU%S*@B?Ci`T|T2N<*>b#=d}4vQh#)TNXfDNqLK((pw}$-z4LEv+t^ANO)e`xgP*nYA2w~1RRaF% zVg-<*AP#%DeRBSCY?~A%D_aVPw(y{Y00mjK0$4ju9o#-TABMRtTK*}{S$57VeZ02- zN`cNH-@tf~Mt_A~f=Hk<*$;am$f^^77{F+eEM&se?;!=Tm0NM{9>tc`C+}d9EKb6h zl4P)y5yP<`OUWsnG;!+Ta%!6}%2`_|&!OHyv4Qt>+hnzrX)CbBiHuVRU!I+RquM5p zqQ9*qKpFTtI{(hLjW!Z&*D8=e&yVTb-On#K|zH{D0+1qN>#1tV8BB?3lPU(5DqLifVJTEip-wbTY&A*PZnVa|rb85t~ TO2!#C00000NkvXXu0mjfzYpD& literal 701 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJOS+@4BLl<6e(pbstUx|vage(c z!@6@aFM%9|WRD45bDP46hOx7_4S6Fo+k-*%fF5lvohWxt>MUNSZpD`3YVaUJ7 zkadM2`x-;;Er!&S43(c4s=hEx{%lC;oYFzt^q3#bu%@2m^ zuME?E8fRW)D1F6HaG#;>H$&znhU#w&2Eo-^cJXUMwDkb9G%{2fEjQ{##6jBCC# zbUifAyTdT?y>ZD4koo`r|7Urz(E{jT(~=;+;8d)jI5ic5z%)WhaWPQ5IF)%96jfr)uO((L+4T1!^Ssw`^I_G zwHh1a!xbls-q^ZOrPX9|)W@4?v!_3JGEm_^OGp#QGJ)~OV8c~vxSdwa$ zT$Bo=7>o=Ijdcx7bd4-R49u*IjIB(}fm|yC12(gTe~DWM4fOo|9E diff --git a/textures/stained_glass_magenta.png b/textures/stained_glass_magenta.png index 628791bfbbba88082b94eb31424c8ceb0bf66369..717b26cf2d551c4bdf89c4719c0a2a998041b5a3 100644 GIT binary patch delta 470 zcmV;{0V)2y1?2;f8Gi-<001BJ|6u?C0jxmU$C4+tU4icw{dRAn9P z=`HH*iEX4RGaJPT62A;A$?-Vc8P#>0d%6*yd{+K&6hI{Y69^)ag@r_-QhDNumX-?_ zKKLM$dEo_(Mj{y*|Eu3_VpXN0Zr;0LPme^B$-MJUr7|)i0e>1A6pGGvW?o7S~nB1t5+290aHu)<`Q{m4j53vhcup)fNu zF>!GhA8j;+f49Jnas>gp?^@Rw6qio6BB{31KkZW8HuD_l}JoXo>E_!8^X=v!^9;Z;L`!Xe${J|bfp%94#0y8t;d`~mE$zw5v^2i{QX=rwcS9kU6 zAE8jt=zWyI1z)(Sr@uoi6c!c)f{qS_V%x?-K_G6+gxJ9Xh`)a4A9B>xu>yrk(2=3S>w=VeZv^KR?4ene0Y@ADqcdERq)pGR>riHG|UcK{yI zQjwhC!QI}=BzF+|Ks*80YrPIV)kLCYmksOda5Lx`VJDvt&3odh&_z$TG2 z7T^vCm`wo$C4hHU#fJ-L$>4R|d4<>p+aea{FlUC@1k)JC<}ts7rE!e6qrDZa!x)~x z#1y6`F*$;fUi2DZ7{EXq+Lp1rf)zVux5GYz87pONK}$259h74eo7>o4$GQWK4QfLN z-7IEDF}j7V9`vkY)e7r0rj0P_q3=ik0v61ad4XD3!MXOZ5&oBJ*grr_@nCTMd?!st_J#Z?NoTDmejw{}&@^%4YzG=)4~^$$o6H>6&#db^`zR?bx?yzpjn z$IqlU*y&I{$)TuzbI*`KcnnfM{rle=j0zq4EAMrlty-wg-)o& ziR$!JwMwA8ts(#(hfA?Jd^Rsa!3h)aC;>m5PyvUt=XB=RzYI5SrDta3{@;*8>+TW* MqQx>%O;pN*pHAl=ZU6uP From 2e3329227f69ac0a71ac75f76bb0330cdaaf1b19 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Mon, 26 Aug 2013 05:30:00 -0400 Subject: [PATCH 2/2] oops, forgot to remove glass from creative inv after debugging --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 8a5634c..b1fb044 100644 --- a/init.lua +++ b/init.lua @@ -75,7 +75,7 @@ function makenode(arg) use_texture_alpha = true, light_source = arg.light, is_ground_content = true, - groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, -- , not_in_creative_inventory=1}, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1}, sounds = default.node_sound_glass_defaults() }) end