Compare commits

13 Commits

Author SHA1 Message Date
e7988d5867 is ground content revision (#12) 2024-03-01 15:15:43 +01:00
aa9e57ebc3 Merge pull request #10 from sys4-fr/master
Fix deprecated use of use_texture_alpha
2021-03-22 09:26:20 -05:00
aee34845cb Fix deprecated use of use_texture_alpha 2021-03-20 16:23:39 +01:00
a68dfa502c Add connected glass textures 2020-08-26 10:29:50 +02:00
fc371df620 Use mod.conf for name/dependencies (#8)
Deletes deprecated 'depends.txt'.
2020-06-04 20:37:39 +02:00
d1b0278c68 Merge pull request #7 from VanessaE/master
use Unified Dyes on_dig where needed
2019-08-06 18:28:30 -05:00
d1cdbbd5bc use Unified Dyes on_dig where needed - requires Unified Dyes commit 9ff40a7f or later 2019-07-18 02:27:51 -04:00
3d7ab900a0 Merge pull request #6 from VanessaE/master
fix not being able to airbrush [trap] super glow glass
2018-10-30 17:38:02 -05:00
827eb3e484 fix not being able to airbrush [trap] super glow glass 2018-10-25 13:20:23 -04:00
3c2ca3a606 Merge pull request #5 from VanessaE/master
get rid of old 89->256 color conversion LBM
2018-09-13 12:43:59 -05:00
5abcd8433f get rid of old 89->256 color conversion LBM
(obsolete, can only crash now anyway)
2018-09-12 23:00:48 -04:00
8fb5fa188e Merge pull request #4 from VanessaE/master
switch to colored itemstacks
2018-08-26 00:01:26 -05:00
8cb21b1057 switch to colored itemstacks
with full crafting recipes
(requires Unified Dyes commit 2a816534 or later)
2018-08-22 20:52:20 -04:00
4 changed files with 43 additions and 52 deletions

View File

@ -1,3 +0,0 @@
default
moreblocks
unifieddyes

View File

@ -17,6 +17,7 @@ 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.
@ -33,6 +34,8 @@ January 2017 -- rewritten a bit more by Vanessa E. to use engine param2 coloriza
some dye to re-color it (you have to dig and re-place if you want to
darken it). Crafting is no longer used to create the colors.
August 2018 -- altered to use proper colored itemstacks with crafting
==============================================================================
]]--
@ -43,64 +46,80 @@ local myglow = LIGHT_MAX-3
minetest.register_node("stained_glass:stained_glass", {
description = "Stained Glass",
drawtype = "glasslike",
tiles = { "stained_glass.png" },
drawtype = "glasslike_framed_optional",
tiles = { "stained_glass.png", "stained_glass_detail.png" },
paramtype = "light",
paramtype2 = "color",
palette = "unifieddyes_palette_extended.png",
place_param2 = 240,
sunlight_propagates = true,
use_texture_alpha = true,
use_texture_alpha = "blend",
light_source = myglow,
is_ground_content = true,
is_ground_content = false,
walkable = true,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1, ud_param2_colorable = 1},
sounds = default.node_sound_glass_defaults(),
drop = "moreblocks:super_glow_glass",
on_construct = unifieddyes.on_construct,
after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
drop = "moreblocks:super_glow_glass"
on_dig = unifieddyes.on_dig,
})
minetest.override_item("moreblocks:super_glow_glass", {
palette = "unifieddyes_palette_extended.png",
airbrush_replacement_node = "stained_glass:stained_glass",
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3, ud_param2_colorable = 1},
ud_replacement_node = "stained_glass:stained_glass",
after_place_node = unifieddyes.recolor_on_place
})
-- trap glass
minetest.register_node("stained_glass:stained_trap_glass", {
description = "Stained Trap-glass",
drawtype = "glasslike",
tiles = { "stained_glass.png" },
drawtype = "glasslike_framed_optional",
tiles = { "stained_glass.png", "stained_glass_detail.png" },
paramtype = "light",
paramtype2 = "color",
palette = "unifieddyes_palette_extended.png",
place_param2 = 240,
sunlight_propagates = true,
use_texture_alpha = true,
use_texture_alpha = "blend",
light_source = myglow,
is_ground_content = true,
is_ground_content = false,
walkable = false,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1, ud_param2_colorable = 1},
sounds = default.node_sound_glass_defaults(),
drop = "moreblocks:trap_super_glow_glass",
on_construct = unifieddyes.on_construct,
after_place_node = unifieddyes.recolor_on_place,
after_dig_node = unifieddyes.after_dig_node,
drop = "moreblocks:trap_super_glow_glass"
on_dig = unifieddyes.on_dig,
})
minetest.override_item("moreblocks:trap_super_glow_glass", {
palette = "unifieddyes_palette_extended.png",
airbrush_replacement_node = "stained_glass:stained_trap_glass",
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1},
ud_replacement_node = "stained_glass:stained_trap_glass",
after_place_node = unifieddyes.recolor_on_place
})
-- crafting
unifieddyes.register_color_craft({
output = "stained_glass:stained_glass",
palette = "extended",
type = "shapeless",
neutral_node = "moreblocks:super_glow_glass",
recipe = {
"NEUTRAL_NODE",
"MAIN_DYE"
}
})
unifieddyes.register_color_craft({
output = "stained_glass:stained_trap_glass",
palette = "extended",
type = "shapeless",
neutral_node = "moreblocks:trap_super_glow_glass",
recipe = {
"NEUTRAL_NODE",
"MAIN_DYE"
}
})
-- old static stuff
function stainedglass.makenode(arg)
local name=arg.blockname
local myglow=arg.glow
@ -387,32 +406,5 @@ minetest.register_lbm({
end
})
minetest.register_lbm({
name = "stained_glass:recolor_glass",
label = "Convert glass to use UD extended palette",
run_at_every_load = false,
nodenames = {
"stained_glass:stained_glass",
"stained_glass:stained_trap_glass",
"stained_glass:faint_stained_glass",
"stained_glass:faint_stained_trap_glass",
"stained_glass:pastel_stained_glass",
"stained_glass:pastel_stained_trap_glass"
},
action = function(pos, node)
local meta = minetest.get_meta(pos)
if meta:get_string("palette") ~= "ext" then
local newcolor = unifieddyes.convert_classic_palette[node.param2]
if string.find(node.name, "faint") then
newcolor = newcolor - 4*24
elseif string.find(node.name, "pastel") then
newcolor = newcolor - 3*24
end
minetest.swap_node(pos, { name = "stained_glass:stained_glass", param2 = newcolor })
meta:set_string("palette", "ext")
end
end
})
print("[stained_glass] Loaded!")

2
mod.conf Normal file
View File

@ -0,0 +1,2 @@
name = stained_glass
depends = default, moreblocks, unifieddyes

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B