Merge pull request #1 from VanessaE/alpha

Add alpha channel support for latest git clients/servers, don't use inventory cubes.
This commit is contained in:
doyousketch2 2013-05-04 09:10:18 -07:00
commit 43d06a647e
110 changed files with 303 additions and 4 deletions

View File

@ -144,9 +144,9 @@ for h = 1, 12 do
description = "Stained Glass - " .. bright .. hues .. sat, description = "Stained Glass - " .. bright .. hues .. sat,
drawtype = "glasslike", drawtype = "glasslike",
tiles = {"stained_glass_" .. bright .. hues .. sat .. ".png"}, tiles = {"stained_glass_" .. bright .. hues .. sat .. ".png"},
inventory_image = minetest.inventorycube("stained_glass_" .. bright .. hues .. sat .. ".png"),
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
use_texture_alpha = true,
light_source = 14, light_source = 14,
is_ground_content = true, is_ground_content = true,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
@ -187,9 +187,9 @@ for h = 1, 12 do
description = "Stained Glass - light_" .. hues, description = "Stained Glass - light_" .. hues,
drawtype = "glasslike", drawtype = "glasslike",
tiles = {"stained_glass_light_" .. hues .. ".png"}, tiles = {"stained_glass_light_" .. hues .. ".png"},
inventory_image = minetest.inventorycube("stained_glass_light_" .. hues .. ".png"),
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
use_texture_alpha = true,
light_source = 14, light_source = 14,
is_ground_content = true, is_ground_content = true,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
@ -231,9 +231,9 @@ for h = 1, 12 do
description = "Stained Glass - pastel_" .. hues, description = "Stained Glass - pastel_" .. hues,
drawtype = "glasslike", drawtype = "glasslike",
tiles = {"stained_glass_pastel_" .. hues .. ".png"}, tiles = {"stained_glass_pastel_" .. hues .. ".png"},
inventory_image = minetest.inventorycube("stained_glass_pastel_" .. hues .. ".png"),
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
use_texture_alpha = true,
light_source = 14, light_source = 14,
is_ground_content = true, is_ground_content = true,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
@ -276,9 +276,9 @@ for h = 1, 12 do
description = "Stained Glass - faint_" .. hues, description = "Stained Glass - faint_" .. hues,
drawtype = "glasslike", drawtype = "glasslike",
tiles = {"stained_glass_faint_" .. hues .. ".png"}, tiles = {"stained_glass_faint_" .. hues .. ".png"},
inventory_image = minetest.inventorycube("stained_glass_faint_" .. hues .. ".png"),
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
use_texture_alpha = true,
light_source = 14, light_source = 14,
is_ground_content = true, is_ground_content = true,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},

299
init.lua~ Normal file
View File

@ -0,0 +1,299 @@
--[[
Stained Glass 1.1
This mod provides luminescent stained glass blocks for Minetest 0.4.x.
Depends:
[moreblocks] by Calinou
[unifieddyes] by VanessaE
==============================================================================
Sun 24 Feb 2013 11:52:27 AM EST
Copyright (C) 2013, Eli Innis
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.
==============================================================================
Recipe for standard colors:
dye
super glow glass
super glow glass
super glow glass
Recipe for pastel colors:
light dye
white paint
super glow glass
super glow glass
super glow glass
Recipe for faint colors:
light dye
white paint
white paint
super glow glass
super glow glass
super glow glass
All recipes produce three glowing stained glass blocks.
Pastel blocks give back an empty bucket.
Faint blocks give back two empty buckets.
==============================================================================
]]--
-- 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"
}
-- 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)
}
-- 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",
tiles = {"stained_glass_" .. bright .. hues .. sat .. ".png"},
inventory_image = minetest.inventorycube("stained_glass_" .. bright .. hues .. sat .. ".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",
tiles = {"stained_glass_light_" .. hues .. ".png"},
inventory_image = minetest.inventorycube("stained_glass_light_" .. hues .. ".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",
tiles = {"stained_glass_pastel_" .. hues .. ".png"},
inventory_image = minetest.inventorycube("stained_glass_pastel_" .. hues .. ".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",
tiles = {"stained_glass_faint_" .. hues .. ".png"},
inventory_image = minetest.inventorycube("stained_glass_faint_" .. hues .. ".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
print("[stained_glass] Loaded!")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 B

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 B

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 B

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 B

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 B

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 B

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 B

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 710 B

Some files were not shown because too many files have changed in this diff Show More