Version MFF.
0
LICENSE.txt
Normal file → Executable file
61
README.md
Normal file → Executable file
@ -1,15 +1,10 @@
|
||||
|
||||
Doyousketch2's Stained Glass mod
|
||||
ver 1.7
|
||||
ver 1.2
|
||||
|
||||
Image: http://oi47.tinypic.com/hst6s3.jpg
|
||||
|
||||
With alpha enabled: http://oi44.tinypic.com/5vraxf.jpg
|
||||
|
||||
==============================================================================
|
||||
Originally developed by Eli Innes/Doyousketch2, and distributed
|
||||
under GPL v2. Further changes by VanessaE (removing from creative inventory)
|
||||
and Jeremy Anderson (fixing craft recipes, renaming blocks)
|
||||
With alpha enabled: http://oi44.tinypic.com/5vraxf.jpg
|
||||
|
||||
==============================================================================
|
||||
|
||||
@ -28,35 +23,8 @@ to simply read "stained_glass"
|
||||
|
||||
then move it into your Minetest mods folder.
|
||||
|
||||
Even better, get stained_glass from one of the github pages:
|
||||
https://github.com/doyousketch2/stained_glass
|
||||
https://github.com/VanessaE/stained_glass
|
||||
https://github.com/andersje/stained_glass
|
||||
|
||||
-- this will get you the latest version of the code, and you
|
||||
can update at any time by doing a git pull
|
||||
|
||||
|
||||
|
||||
==============================================================================
|
||||
To turn off types of glass, alter settings.txt in the stained_glass directory.
|
||||
By default, all six (SIX!) types of stained_glass are enabled: regular (based on super_glow_glass), med_glow (based on glow_glass) and no-glow (Based on default:glass), trap regular (based on trap_super_glow_glass), trap med_glow (based on trap_glow_glass) and trap_noglow (based on trapglass)
|
||||
|
||||
stained_glass.full_light = true
|
||||
stained_glass.med_light = true
|
||||
stained_glass.no_light = true
|
||||
stained_glass.trap_full_light = true
|
||||
stained_glass.trap_med_light = true
|
||||
stained_glass.trap_no_light = true
|
||||
|
||||
Setting any of these to false will prevent that type of stained_glass from being loaded. If you set them all to false, you won't get any stained_glass. Mix and match as you choose -- you can turn on only one, if you wish, and it will work just fine.
|
||||
|
||||
One of the high points of trap stained glass is that liquids flow through it -- making illuminated waterfalls a possibility.
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
(use trap super glow glass or trap glow glass or trapglass -- now available in moreblocks -- to make the trap variant of this)
|
||||
|
||||
Recipe for standard colors:
|
||||
|
||||
@ -68,7 +36,6 @@ image: http://oi50.tinypic.com/1ibs7c.jpg
|
||||
super glow glass
|
||||
|
||||
|
||||
|
||||
Recipe for pastel colors:
|
||||
|
||||
image: http://oi45.tinypic.com/2wbvkti.jpg
|
||||
@ -79,6 +46,7 @@ image: http://oi45.tinypic.com/2wbvkti.jpg
|
||||
super glow glass
|
||||
super glow glass
|
||||
|
||||
|
||||
Recipe for faint colors:
|
||||
|
||||
image: http://oi45.tinypic.com/2wbvkti.jpg
|
||||
@ -92,6 +60,8 @@ image: http://oi45.tinypic.com/2wbvkti.jpg
|
||||
|
||||
|
||||
All recipes produce three glowing stained glass blocks.
|
||||
Pastel blocks give back an empty bucket.
|
||||
Faint blocks give back two empty buckets.
|
||||
|
||||
|
||||
==============================================================================
|
||||
@ -105,8 +75,6 @@ The Palette includes:
|
||||
Full & half-saturation, medium and dark shades have been included
|
||||
as well as light, pastel, and faint tints.
|
||||
|
||||
Look at settings.txt to see how you can enable/disable full-glow, half-glow and no-glow blocks -- tested in all combinations. enjoy.
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
@ -114,25 +82,6 @@ Look at settings.txt to see how you can enable/disable full-glow, half-glow and
|
||||
Misc. Notes
|
||||
-----------
|
||||
|
||||
Blocks are now available by name:
|
||||
e.g. /giveme stained_glass:orange 3 # get 3 orange sg blocks
|
||||
or /giveme stained_glass:light_yellow
|
||||
or /giveme stained_glass:pastel_yellow
|
||||
or /giveme stained_glass:faint_yellow
|
||||
or /giveme stained_glass:yellow
|
||||
|
||||
or /giveme stained_glass:lowglow_yellow
|
||||
or /giveme stained_glass:noglow_dark_green
|
||||
or /giveme stained_glass:trap_noglow_dark_green
|
||||
or /giveme stained_glass:trap_lowglow_yellow
|
||||
or /giveme stained_glass:trap_medium_aqua
|
||||
|
||||
You get the idea.
|
||||
|
||||
|
||||
NUMERIC CODES FOR BLOCKS (this is the old way of coding these blocks
|
||||
developed by Doyousketch2)
|
||||
|
||||
Please don't try to use /give commands, the items are now in numerical format,
|
||||
and it would be tough to try to explain it.
|
||||
|
||||
|
25
changelog.txt
Normal file → Executable file
@ -1,31 +1,6 @@
|
||||
|
||||
Changelog
|
||||
|
||||
---------
|
||||
ver 1.7
|
||||
Sat 1 Sep 2013
|
||||
I like trapglass, so _all_ variants of stained_glass are now available as (identical) trapglass variants. also, ability to ditch trapglass blocks via settings.txt added. In fact, you can now pick and choose which variants of stained_glass you wish to enable.
|
||||
|
||||
ver 1.6
|
||||
Fri 30 Aug 2013
|
||||
added configfile settings.txt to allow disabling of full_light (super_glow_glass-based), med_light (glow_glass-based) and no_light (default:glass) blocks. just set the relevant fields to 'false' and they will not be loaded when you start the game.
|
||||
|
||||
ver 1.5.1
|
||||
Mon 26 Aug 2013
|
||||
prompted by VanessaE's initial cleanup, MUCH cleanup of the code. No need to have > 1 file anymore.
|
||||
|
||||
ver 1.5
|
||||
Sun 25 Aug 2013
|
||||
added low-glow (brightness 11) and noglow (brightness 0) stained glass blows, using glow_glass and regular glass accordingly.
|
||||
|
||||
ver 1.4
|
||||
Thu 22 Aug 2013
|
||||
*phew* made aliases for all numeric block names to map to new color-name based scheme
|
||||
updated craft recipes to work with new dyes format
|
||||
rejiggered whole system of block and craft registration
|
||||
set to have all blocks at LIGHT_MAX -- since they were manually specifying '14' as a light level before (which is current max)
|
||||
nothing returns buckets anymore, because you don't need buckets to make the dyes to make the blocks.
|
||||
|
||||
---------
|
||||
|
||||
ver 1.1
|
||||
|
0
colors.txt
Normal file → Executable file
6
depends.txt
Normal file → Executable file
@ -1,3 +1,3 @@
|
||||
default
|
||||
moreblocks
|
||||
unifieddyes
|
||||
default
|
||||
moreblocks
|
||||
unifieddyes
|
||||
|
529
init.lua
Normal file → Executable file
@ -1,8 +1,8 @@
|
||||
--[[
|
||||
|
||||
Stained Glass
|
||||
Stained Glass 1.2
|
||||
|
||||
This mod provides luminescent stained glass blocks for Minetest 0.4.7+
|
||||
This mod provides luminescent stained glass blocks for Minetest 0.4.x.
|
||||
|
||||
Depends:
|
||||
[moreblocks] by Calinou
|
||||
@ -17,14 +17,6 @@ Email: doyousketch2 @ yahoo.com
|
||||
Unified Dyes was released under GNU-GPL 2.0, see LICENSE for info.
|
||||
More Blocks was released under zlib/libpng for code and CC BY-SA 3.0 Unported for textures, see LICENSE.txt for info.
|
||||
|
||||
Additional changes by VanessaEzekowitz in July 2013 to take all items
|
||||
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.
|
||||
|
||||
==============================================================================
|
||||
|
||||
|
||||
@ -54,303 +46,250 @@ super glow glass
|
||||
super glow glass
|
||||
super glow glass
|
||||
|
||||
recipe for low-glow-stained-glass:
|
||||
as above, but substitute 'glow glass' for super glow glass.
|
||||
|
||||
recipe for no-glow-stained-glass:
|
||||
as regular stained glass, but substitute plain 'glass' for super glow glass
|
||||
|
||||
|
||||
All recipes produce three stained glass blocks.
|
||||
All recipes produce three glowing stained glass blocks.
|
||||
Pastel blocks give back an empty bucket.
|
||||
Faint blocks give back two empty buckets.
|
||||
|
||||
==============================================================================
|
||||
]]--
|
||||
|
||||
function makenode(arg)
|
||||
local name=arg.blockname
|
||||
local myglow=arg.glow
|
||||
local myprefix=arg.prefix
|
||||
local imagename=arg.imagename
|
||||
local safe=arg.walkflag
|
||||
local Description
|
||||
|
||||
local function tchelper(first, rest)
|
||||
return first:upper()..rest:lower()
|
||||
end -- from lua-users.org/wiki/StringRecipes
|
||||
-- above function is used to turn red_violet_s50 to 'Red Violet S50'
|
||||
|
||||
--register item attributes
|
||||
|
||||
Description=string.gsub("Stained Glass - " ..myprefix..name, "_", " ")
|
||||
Description=Description:gsub("(%a)([%w_']*)", tchelper)
|
||||
|
||||
minetest.register_node("stained_glass:"..myprefix..name, {
|
||||
description = Description,
|
||||
drawtype = "glasslike",
|
||||
tiles = {"stained_glass_" .. imagename .. ".png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
use_texture_alpha = true,
|
||||
light_source = myglow,
|
||||
is_ground_content = true,
|
||||
walkable=safe, -- if not safe, this is trapglass
|
||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_glass_defaults()
|
||||
})
|
||||
end
|
||||
|
||||
-- maybe someday, I can cleanly combine these two functions.
|
||||
|
||||
function stained_trapglass_define(arg)
|
||||
local code=arg.colorcode
|
||||
local name=arg.colorname
|
||||
local rawdyename=arg.recipe
|
||||
local mydye=arg.recipe
|
||||
local myshadename=arg.shade
|
||||
local imagename=name
|
||||
|
||||
local stained_glass_blocktype = { }
|
||||
|
||||
local stained_glass_lightlevel = { }
|
||||
|
||||
if stained_glass.trap_full_light then
|
||||
stained_glass_lightlevel[""] = LIGHT_MAX
|
||||
stained_glass_blocktype[""] = "moreblocks:trap_super_glow_glass"
|
||||
end -- see settings.txt for these settings.
|
||||
|
||||
if stained_glass.trap_med_light then
|
||||
stained_glass_lightlevel["lowglow_"] = LIGHT_MAX-3
|
||||
stained_glass_blocktype["lowglow_"] = "moreblocks:trap_glow_glass"
|
||||
end
|
||||
|
||||
if stained_glass.trap_no_light then
|
||||
stained_glass_lightlevel["noglow_"] = 0
|
||||
stained_glass_blocktype["noglow_"] = "moreblocks:trap_glass"
|
||||
end
|
||||
|
||||
for myprefix,myglow in pairs(stained_glass_lightlevel) do
|
||||
local glasstype = stained_glass_blocktype[myprefix]
|
||||
local name="trap_" .. name
|
||||
|
||||
-- define myrecipe as a table, pass it in.
|
||||
|
||||
local myrecipe = { mydye, glasstype, glasstype, glasstype }
|
||||
-- those four items will ALWAYS be there. For faint and pastel, we
|
||||
-- need to add additional dyes. If you have defined a new shade, then
|
||||
-- you should probably handle it here.
|
||||
|
||||
if myshadename == "pastel_" then
|
||||
myrecipe[5] = "dye:white"
|
||||
end
|
||||
|
||||
if myshadename == "faint_" then
|
||||
myrecipe[5] = "dye:white"
|
||||
myrecipe[6] = "dye:white"
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "stained_glass:"..myprefix..name.." 3",
|
||||
recipe = myrecipe,
|
||||
})
|
||||
|
||||
makenode{blockname=name, glow=myglow, prefix=myprefix, imagename=imagename, walkflag=false}
|
||||
end
|
||||
end
|
||||
|
||||
function stained_glass_define(arg)
|
||||
local code=arg.colorcode
|
||||
local name=arg.colorname
|
||||
local rawdyename=arg.recipe
|
||||
local mydye=arg.recipe
|
||||
local myshadename=arg.shade
|
||||
local imagename=name
|
||||
|
||||
local stained_glass_blocktype = { }
|
||||
|
||||
local stained_glass_lightlevel = { }
|
||||
|
||||
if stained_glass.full_light then
|
||||
stained_glass_lightlevel[""] = LIGHT_MAX
|
||||
stained_glass_blocktype[""] = "moreblocks:super_glow_glass"
|
||||
end -- see settings.txt for these settings.
|
||||
|
||||
if stained_glass.med_light then
|
||||
stained_glass_lightlevel["lowglow_"] = LIGHT_MAX-3
|
||||
stained_glass_blocktype["lowglow_"] = "moreblocks:glow_glass"
|
||||
end
|
||||
|
||||
if stained_glass.no_light then
|
||||
stained_glass_lightlevel["noglow_"] = 0
|
||||
stained_glass_blocktype["noglow_"] = "default:glass"
|
||||
end
|
||||
|
||||
for myprefix,myglow in pairs(stained_glass_lightlevel) do
|
||||
local glasstype = stained_glass_blocktype[myprefix]
|
||||
|
||||
-- define myrecipe as a table, pass it in.
|
||||
|
||||
local myrecipe = { mydye, glasstype, glasstype, glasstype }
|
||||
-- those four items will ALWAYS be there. For faint and pastel, we
|
||||
-- need to add additional dyes. If you have defined a new shade, then
|
||||
-- you should probably handle it here.
|
||||
|
||||
if myshadename == "pastel_" then
|
||||
myrecipe[5] = "dye:white"
|
||||
end
|
||||
|
||||
if myshadename == "faint_" then
|
||||
myrecipe[5] = "dye:white"
|
||||
myrecipe[6] = "dye:white"
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "stained_glass:"..myprefix..name.." 3",
|
||||
recipe = myrecipe,
|
||||
})
|
||||
|
||||
makenode{blockname=name, glow=myglow, prefix=myprefix, imagename=name, walkflag=true}
|
||||
|
||||
if myprefix == "" then
|
||||
local aliasname
|
||||
minetest.register_alias( "stained_glass:" .. code, "stained_glass:" .. name)
|
||||
if string.match(name,"redviolet") then
|
||||
oldname=name
|
||||
aliasname=string.gsub(name, "redviolet","red_violet") -- need to support red_violet existence, too.
|
||||
minetest.register_alias( "stained_glass:" .. aliasname, "stained_glass:" .. oldname)
|
||||
end
|
||||
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.
|
||||
-- no aliases for noglow- and lowglow- blocks, because they didn't
|
||||
-- exist until v1.5
|
||||
end
|
||||
end
|
||||
|
||||
-- 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"
|
||||
|
||||
stained_glass= {}
|
||||
local worldpath=minetest.get_worldpath()
|
||||
local modpath=minetest.get_modpath("stained_glass")
|
||||
dofile(modpath .. "/settings.txt")
|
||||
|
||||
-- the new settings.txt file has a variety of possible settings.
|
||||
-- see the file for examples. We'll access those settings where its important, in
|
||||
-- the stained glass module, where we'll build up the tables to contain
|
||||
-- only what we need.
|
||||
|
||||
stained_glass_hues = {
|
||||
{ "yellow", true },
|
||||
{ "lime", false },
|
||||
{ "green", true },
|
||||
{ "aqua", false },
|
||||
{ "cyan", false },
|
||||
{ "skyblue", true },
|
||||
{ "blue", false },
|
||||
{ "violet", false },
|
||||
{ "magenta", true },
|
||||
{ "redviolet", true },
|
||||
{ "red", true },
|
||||
{ "orange", false },
|
||||
|
||||
-- please note that these only apply when our shadelevel is ""
|
||||
-- HUES includes all colors for the various shades
|
||||
-- I'm trying to get it to sort by color in the game, tho it sorts alpha-numerically...
|
||||
-- so with 12 colors, it's sorting 10, 11, 12, 1, 2, 3, 4...
|
||||
|
||||
HUES = {
|
||||
"yellow",
|
||||
"lime",
|
||||
"green",
|
||||
"aqua",
|
||||
"cyan",
|
||||
"skyblue",
|
||||
"blue",
|
||||
"violet",
|
||||
"magenta",
|
||||
"redviolet",
|
||||
"red",
|
||||
"orange"
|
||||
}
|
||||
|
||||
stained_glass_shades = {
|
||||
{"dark_", 3 },
|
||||
{"medium_", 4 },
|
||||
{"", 5 }, -- full brightness
|
||||
{"light_", 8 },
|
||||
{"pastel_", 9 },
|
||||
{"faint_", 91 }
|
||||
|
||||
-- note that dark_ medium_ and plain also have a half-saturation
|
||||
-- equivalent automatically defined in the code
|
||||
-- Brightness levels in the textures are 33% ("dark"), 66% ("medium"),
|
||||
-- 100% ("full"), 150% ("light"), 200% ("pastel").
|
||||
-- 1x and 2x are simply placeholders to fill in so numbers start at 3.
|
||||
|
||||
BRIGHT = {
|
||||
"1x",
|
||||
"2x",
|
||||
"dark_",
|
||||
"medium_",
|
||||
"", --(full)
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
recipevalue = "group:dye,unicolor_"..shadename..huename
|
||||
if (shadename == "" and stained_glass_hues[i][2]) then
|
||||
-- print(huename .. " is set to true -- substituting dye:huename ")
|
||||
recipevalue = "dye:"..huename
|
||||
elseif (shadename=="pastel_" or shadename=="faint_") then
|
||||
-- force light_dye for pastel and faint colors
|
||||
recipevalue = "group:dye,unicolor_light_"..huename
|
||||
else -- default case
|
||||
recipevalue = "group:dye,unicolor_"..shadename..huename
|
||||
end
|
||||
|
||||
if shadename == "dark_" or shadename == "medium_" or shadename == "" then
|
||||
stained_glass_define({
|
||||
colorcode = huenumber.."_"..shadenumber.."_7",
|
||||
colorname = shadename..huename,
|
||||
recipe = recipevalue,
|
||||
shade = shadename,
|
||||
})
|
||||
|
||||
stained_trapglass_define({
|
||||
colorcode = huenumber.."_"..shadenumber.."_7",
|
||||
colorname = shadename..huename,
|
||||
recipe = recipevalue,
|
||||
shade = shadename,
|
||||
}) -- only defines something if the trap is enabled.
|
||||
|
||||
-- below is the automatic "half saturation" block
|
||||
-- which was mentioned previously
|
||||
-- this is unicolor only, so switch dyename
|
||||
-- back to unicolor...
|
||||
recipevalue="group:dye,unicolor_"..shadename..huename
|
||||
stained_glass_define({
|
||||
colorcode = huenumber.."_"..shadenumber.."_6",
|
||||
colorname = shadename..huename.."_s50",
|
||||
recipe = recipevalue.."_s50",
|
||||
shade = shadename,
|
||||
})
|
||||
stained_trapglass_define({
|
||||
colorcode = huenumber.."_"..shadenumber.."_6",
|
||||
colorname = shadename..huename.."_s50",
|
||||
recipe = recipevalue.."_s50",
|
||||
shade = shadename,
|
||||
}) -- only defines something if the trap is enabled.
|
||||
-- because we define two blocks inside this chunk of
|
||||
-- code, we can't just define the relevant vars and
|
||||
-- move the proc_call after the if-then loop.
|
||||
|
||||
elseif shadename == "light_" or shadename == "pastel_" or shadename == "faint_" then
|
||||
stained_glass_define({
|
||||
colorcode = huenumber.."_"..shadenumber,
|
||||
colorname = shadename..huename,
|
||||
recipe = recipevalue,
|
||||
shade = shadename,
|
||||
})
|
||||
stained_trapglass_define({
|
||||
colorcode = huenumber.."_"..shadenumber,
|
||||
colorname = shadename..huename,
|
||||
recipe = recipevalue,
|
||||
shade = shadename,
|
||||
}) -- only defines something if the trap is enabled.
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
print("[stained_glass] Loaded!")
|
||||
-- Saturation - "s50" in a file/item name means "saturation: 50%".
|
||||
-- 1x - 5x are simply placeholders so numbers start at 6.
|
||||
|
||||
|
||||
SAT = {
|
||||
"1x",
|
||||
"2x",
|
||||
"3x",
|
||||
"4x",
|
||||
"5x",
|
||||
"_s50",
|
||||
"" --(full)
|
||||
}
|
||||
|
||||
|
||||
--main loop for all 12 hues
|
||||
|
||||
for h = 1, 12 do
|
||||
|
||||
hues = HUES[h]
|
||||
|
||||
|
||||
--nested loop for brightness
|
||||
--starts at 3 to hopefully keep colors in order
|
||||
|
||||
for b = 3, 5 do
|
||||
|
||||
bright = BRIGHT[b]
|
||||
|
||||
|
||||
--sub loop for saturation
|
||||
--starts at 6 to keep colors in order
|
||||
for s = 6, 7 do
|
||||
|
||||
sat = SAT[s]
|
||||
|
||||
|
||||
--register recipes
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "stained_glass:" .. (h) .. "_" .. (b) .. "_" .. (s) .." 3",
|
||||
recipe = {
|
||||
"unifieddyes:" .. bright .. hues .. sat,
|
||||
"moreblocks:superglowglass",
|
||||
"moreblocks:superglowglass",
|
||||
"moreblocks:superglowglass",
|
||||
},
|
||||
})
|
||||
|
||||
--register item attributes
|
||||
|
||||
minetest.register_node("stained_glass:" .. (h) .. "_" .. (b) .. "_" .. (s), {
|
||||
description = "Stained Glass - " .. bright .. hues .. sat,
|
||||
drawtype = "glasslike_framed_optional",
|
||||
tiles = {"stained_glass_" .. bright .. hues .. sat .. ".png", "stained_glass_" .. bright .. hues .. sat .. "_detail.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
use_texture_alpha = true,
|
||||
light_source = 14,
|
||||
is_ground_content = true,
|
||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults()
|
||||
})
|
||||
end --sat
|
||||
|
||||
end --bright
|
||||
|
||||
end --hues
|
||||
|
||||
|
||||
--secondary loop for light blocks
|
||||
--(as they don't have 50% saturation blocks to go along with 'em)
|
||||
|
||||
|
||||
for h = 1, 12 do
|
||||
|
||||
|
||||
hues = HUES[h]
|
||||
|
||||
--register recipes (set at 8 to keep colors in order)
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "stained_glass:" .. (h) .. "_8 3",
|
||||
recipe = {
|
||||
"unifieddyes:light_" .. hues,
|
||||
"moreblocks:superglowglass",
|
||||
"moreblocks:superglowglass",
|
||||
"moreblocks:superglowglass",
|
||||
},
|
||||
})
|
||||
|
||||
--register item attributes
|
||||
|
||||
minetest.register_node("stained_glass:" .. (h) .. "_8_", {
|
||||
description = "Stained Glass - light_" .. hues,
|
||||
drawtype = "glasslike_framed_optional",
|
||||
tiles = {"stained_glass_light_" .. hues .. ".png", "stained_glass_light_" .. hues .. "_detail.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
use_texture_alpha = true,
|
||||
light_source = 14,
|
||||
is_ground_content = true,
|
||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults()
|
||||
})
|
||||
|
||||
|
||||
end --hues
|
||||
|
||||
|
||||
--third loop for pastel blocks
|
||||
--(as they don't have 50% saturation blocks to go along with 'em)
|
||||
--(plus they have a diff recipe to create.)
|
||||
|
||||
|
||||
for h = 1, 12 do
|
||||
|
||||
|
||||
hues = HUES[h]
|
||||
|
||||
--register recipes (set at 9 to keep colors in order)
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "stained_glass:" .. (h) .. "_9 3",
|
||||
recipe = {
|
||||
"unifieddyes:white_paint",
|
||||
"unifieddyes:light_" .. hues,
|
||||
"moreblocks:superglowglass",
|
||||
"moreblocks:superglowglass",
|
||||
"moreblocks:superglowglass",
|
||||
},
|
||||
replacements = { {'unifieddyes:white_paint', 'bucket:bucket_empty'}, },
|
||||
})
|
||||
|
||||
--register item attributes
|
||||
|
||||
minetest.register_node("stained_glass:" .. (h) .. "_9", {
|
||||
description = "Stained Glass - pastel_" .. hues,
|
||||
drawtype = "glasslike_framed_optional",
|
||||
tiles = {"stained_glass_pastel_" .. hues .. ".png", "stained_glass_pastel_" .. hues .. "_detail.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
use_texture_alpha = true,
|
||||
light_source = 14,
|
||||
is_ground_content = true,
|
||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults()
|
||||
})
|
||||
|
||||
|
||||
end --hues
|
||||
|
||||
|
||||
--last loop for faint blocks
|
||||
--(as they don't have 50% saturation blocks to go along with 'em)
|
||||
--(plus they have a diff recipe to create.)
|
||||
|
||||
|
||||
for h = 1, 12 do
|
||||
|
||||
|
||||
hues = HUES[h]
|
||||
|
||||
--register recipes (set at 91 to keep colors in order)
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "stained_glass:" .. (h) .. "_91 3",
|
||||
recipe = {
|
||||
"unifieddyes:white_paint",
|
||||
"unifieddyes:white_paint",
|
||||
"unifieddyes:light_" .. hues,
|
||||
"moreblocks:superglowglass",
|
||||
"moreblocks:superglowglass",
|
||||
"moreblocks:superglowglass",
|
||||
},
|
||||
replacements = { {'unifieddyes:white_paint', 'bucket:bucket_empty 2'}, },
|
||||
})
|
||||
|
||||
--register item attributes
|
||||
|
||||
minetest.register_node("stained_glass:" .. (h) .. "_91", {
|
||||
description = "Stained Glass - faint_" .. hues,
|
||||
drawtype = "glasslike_framed_optional",
|
||||
tiles = {"stained_glass_faint_" .. hues .. ".png", "stained_glass_faint_" .. hues .. "_detail.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
use_texture_alpha = true,
|
||||
light_source = 14,
|
||||
is_ground_content = true,
|
||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults()
|
||||
})
|
||||
|
||||
|
||||
end --hues
|
||||
|
||||
|
||||
minetest.log("action", "[stained_glass] Loaded!")
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
stained_glass.full_light = true
|
||||
stained_glass.med_light = true
|
||||
stained_glass.no_light = true
|
||||
stained_glass.trap_full_light = true
|
||||
stained_glass.trap_med_light = true
|
||||
stained_glass.trap_no_light = true
|
BIN
textures/stained_glass_aqua.png
Normal file → Executable file
Before Width: | Height: | Size: 701 B After Width: | Height: | Size: 490 B |
BIN
textures/stained_glass_aqua_detail.png
Executable file
After Width: | Height: | Size: 481 B |
BIN
textures/stained_glass_aqua_s50.png
Normal file → Executable file
Before Width: | Height: | Size: 685 B After Width: | Height: | Size: 477 B |
BIN
textures/stained_glass_aqua_s50_detail.png
Executable file
After Width: | Height: | Size: 463 B |
BIN
textures/stained_glass_blue.png
Normal file → Executable file
Before Width: | Height: | Size: 701 B After Width: | Height: | Size: 490 B |
BIN
textures/stained_glass_blue_detail.png
Executable file
After Width: | Height: | Size: 481 B |
BIN
textures/stained_glass_blue_s50.png
Normal file → Executable file
Before Width: | Height: | Size: 680 B After Width: | Height: | Size: 472 B |
BIN
textures/stained_glass_blue_s50_detail.png
Executable file
After Width: | Height: | Size: 459 B |
BIN
textures/stained_glass_cyan.png
Normal file → Executable file
Before Width: | Height: | Size: 701 B After Width: | Height: | Size: 490 B |
BIN
textures/stained_glass_cyan_detail.png
Executable file
After Width: | Height: | Size: 481 B |
BIN
textures/stained_glass_cyan_s50.png
Normal file → Executable file
Before Width: | Height: | Size: 701 B After Width: | Height: | Size: 491 B |
BIN
textures/stained_glass_cyan_s50_detail.png
Executable file
After Width: | Height: | Size: 480 B |
BIN
textures/stained_glass_dark_aqua.png
Normal file → Executable file
Before Width: | Height: | Size: 585 B After Width: | Height: | Size: 375 B |
BIN
textures/stained_glass_dark_aqua_detail.png
Executable file
After Width: | Height: | Size: 370 B |
BIN
textures/stained_glass_dark_aqua_s50.png
Normal file → Executable file
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 347 B |
BIN
textures/stained_glass_dark_aqua_s50_detail.png
Executable file
After Width: | Height: | Size: 342 B |
BIN
textures/stained_glass_dark_blue.png
Normal file → Executable file
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 333 B |
BIN
textures/stained_glass_dark_blue_detail.png
Executable file
After Width: | Height: | Size: 327 B |
BIN
textures/stained_glass_dark_blue_s50.png
Normal file → Executable file
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 302 B |
BIN
textures/stained_glass_dark_blue_s50_detail.png
Executable file
After Width: | Height: | Size: 296 B |
BIN
textures/stained_glass_dark_cyan.png
Normal file → Executable file
Before Width: | Height: | Size: 552 B After Width: | Height: | Size: 341 B |
BIN
textures/stained_glass_dark_cyan_detail.png
Executable file
After Width: | Height: | Size: 333 B |
BIN
textures/stained_glass_dark_cyan_s50.png
Normal file → Executable file
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 302 B |
BIN
textures/stained_glass_dark_cyan_s50_detail.png
Executable file
After Width: | Height: | Size: 296 B |
BIN
textures/stained_glass_dark_green.png
Normal file → Executable file
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 333 B |
BIN
textures/stained_glass_dark_green_detail.png
Executable file
After Width: | Height: | Size: 327 B |
BIN
textures/stained_glass_dark_green_s50.png
Normal file → Executable file
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 302 B |
BIN
textures/stained_glass_dark_green_s50_detail.png
Executable file
After Width: | Height: | Size: 296 B |
BIN
textures/stained_glass_dark_lime.png
Normal file → Executable file
Before Width: | Height: | Size: 585 B After Width: | Height: | Size: 375 B |
BIN
textures/stained_glass_dark_lime_detail.png
Executable file
After Width: | Height: | Size: 370 B |
BIN
textures/stained_glass_dark_lime_s50.png
Normal file → Executable file
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 347 B |
BIN
textures/stained_glass_dark_lime_s50_detail.png
Executable file
After Width: | Height: | Size: 342 B |
BIN
textures/stained_glass_dark_magenta.png
Normal file → Executable file
Before Width: | Height: | Size: 552 B After Width: | Height: | Size: 341 B |
BIN
textures/stained_glass_dark_magenta_detail.png
Executable file
After Width: | Height: | Size: 333 B |
BIN
textures/stained_glass_dark_magenta_s50.png
Normal file → Executable file
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 302 B |
BIN
textures/stained_glass_dark_magenta_s50_detail.png
Executable file
After Width: | Height: | Size: 296 B |
BIN
textures/stained_glass_dark_orange.png
Normal file → Executable file
Before Width: | Height: | Size: 585 B After Width: | Height: | Size: 375 B |
BIN
textures/stained_glass_dark_orange_detail.png
Executable file
After Width: | Height: | Size: 370 B |
BIN
textures/stained_glass_dark_orange_s50.png
Normal file → Executable file
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 347 B |
BIN
textures/stained_glass_dark_orange_s50_detail.png
Executable file
After Width: | Height: | Size: 342 B |
BIN
textures/stained_glass_dark_red.png
Normal file → Executable file
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 333 B |
BIN
textures/stained_glass_dark_red_detail.png
Executable file
After Width: | Height: | Size: 327 B |
BIN
textures/stained_glass_dark_red_s50.png
Normal file → Executable file
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 302 B |
BIN
textures/stained_glass_dark_red_s50_detail.png
Executable file
After Width: | Height: | Size: 296 B |
BIN
textures/stained_glass_dark_redviolet.png
Normal file → Executable file
Before Width: | Height: | Size: 585 B After Width: | Height: | Size: 375 B |
BIN
textures/stained_glass_dark_redviolet_detail.png
Executable file
After Width: | Height: | Size: 370 B |
BIN
textures/stained_glass_dark_redviolet_s50.png
Normal file → Executable file
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 347 B |
BIN
textures/stained_glass_dark_redviolet_s50_detail.png
Executable file
After Width: | Height: | Size: 342 B |
BIN
textures/stained_glass_dark_skyblue.png
Normal file → Executable file
Before Width: | Height: | Size: 585 B After Width: | Height: | Size: 375 B |
BIN
textures/stained_glass_dark_skyblue_detail.png
Executable file
After Width: | Height: | Size: 370 B |
BIN
textures/stained_glass_dark_skyblue_s50.png
Normal file → Executable file
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 347 B |
BIN
textures/stained_glass_dark_skyblue_s50_detail.png
Executable file
After Width: | Height: | Size: 342 B |
BIN
textures/stained_glass_dark_violet.png
Normal file → Executable file
Before Width: | Height: | Size: 585 B After Width: | Height: | Size: 375 B |
BIN
textures/stained_glass_dark_violet_detail.png
Executable file
After Width: | Height: | Size: 370 B |
BIN
textures/stained_glass_dark_violet_s50.png
Normal file → Executable file
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 347 B |
BIN
textures/stained_glass_dark_violet_s50_detail.png
Executable file
After Width: | Height: | Size: 342 B |
BIN
textures/stained_glass_dark_yellow.png
Normal file → Executable file
Before Width: | Height: | Size: 552 B After Width: | Height: | Size: 341 B |
BIN
textures/stained_glass_dark_yellow_detail.png
Executable file
After Width: | Height: | Size: 333 B |
BIN
textures/stained_glass_dark_yellow_s50.png
Normal file → Executable file
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 302 B |
BIN
textures/stained_glass_dark_yellow_s50_detail.png
Executable file
After Width: | Height: | Size: 296 B |
BIN
textures/stained_glass_faint_aqua.png
Normal file → Executable file
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 500 B |
BIN
textures/stained_glass_faint_aqua_detail.png
Executable file
After Width: | Height: | Size: 489 B |
BIN
textures/stained_glass_faint_blue.png
Normal file → Executable file
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 500 B |
BIN
textures/stained_glass_faint_blue_detail.png
Executable file
After Width: | Height: | Size: 489 B |
BIN
textures/stained_glass_faint_cyan.png
Normal file → Executable file
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 500 B |
BIN
textures/stained_glass_faint_cyan_detail.png
Executable file
After Width: | Height: | Size: 489 B |
BIN
textures/stained_glass_faint_green.png
Normal file → Executable file
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 500 B |
BIN
textures/stained_glass_faint_green_detail.png
Executable file
After Width: | Height: | Size: 489 B |
BIN
textures/stained_glass_faint_lime.png
Normal file → Executable file
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 500 B |
BIN
textures/stained_glass_faint_lime_detail.png
Executable file
After Width: | Height: | Size: 489 B |
BIN
textures/stained_glass_faint_magenta.png
Normal file → Executable file
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 500 B |
BIN
textures/stained_glass_faint_magenta_detail.png
Executable file
After Width: | Height: | Size: 489 B |
BIN
textures/stained_glass_faint_orange.png
Normal file → Executable file
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 500 B |
BIN
textures/stained_glass_faint_orange_detail.png
Executable file
After Width: | Height: | Size: 489 B |
BIN
textures/stained_glass_faint_red.png
Normal file → Executable file
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 500 B |
BIN
textures/stained_glass_faint_red_detail.png
Executable file
After Width: | Height: | Size: 489 B |
BIN
textures/stained_glass_faint_redviolet.png
Normal file → Executable file
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 500 B |
BIN
textures/stained_glass_faint_redviolet_detail.png
Executable file
After Width: | Height: | Size: 489 B |
BIN
textures/stained_glass_faint_skyblue.png
Normal file → Executable file
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 500 B |
BIN
textures/stained_glass_faint_skyblue_detail.png
Executable file
After Width: | Height: | Size: 489 B |
BIN
textures/stained_glass_faint_violet.png
Normal file → Executable file
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 500 B |
BIN
textures/stained_glass_faint_violet_detail.png
Executable file
After Width: | Height: | Size: 489 B |
BIN
textures/stained_glass_faint_yellow.png
Normal file → Executable file
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 500 B |
BIN
textures/stained_glass_faint_yellow_detail.png
Executable file
After Width: | Height: | Size: 489 B |
BIN
textures/stained_glass_green.png
Normal file → Executable file
Before Width: | Height: | Size: 701 B After Width: | Height: | Size: 490 B |
BIN
textures/stained_glass_green_detail.png
Executable file
After Width: | Height: | Size: 481 B |
BIN
textures/stained_glass_green_s50.png
Normal file → Executable file
Before Width: | Height: | Size: 680 B After Width: | Height: | Size: 472 B |
BIN
textures/stained_glass_green_s50_detail.png
Executable file
After Width: | Height: | Size: 459 B |
BIN
textures/stained_glass_light_aqua.png
Normal file → Executable file
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 500 B |
BIN
textures/stained_glass_light_aqua_detail.png
Executable file
After Width: | Height: | Size: 489 B |
BIN
textures/stained_glass_light_blue.png
Normal file → Executable file
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 500 B |
BIN
textures/stained_glass_light_blue_detail.png
Executable file
After Width: | Height: | Size: 489 B |