From b67028a417aeec462e2e8a7b30a43f0e129395ae Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sun, 16 Aug 2020 10:14:18 +0200 Subject: [PATCH] Fix use_texture_alpha warnings since 5.4.0-dev --- nodes.lua | 9 +++++++++ stairsplus/common.lua | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/nodes.lua b/nodes.lua index 4bb8c3c..e255e0a 100644 --- a/nodes.lua +++ b/nodes.lua @@ -194,6 +194,7 @@ local nodes = { description = S("Iron Glass"), drawtype = "glasslike_framed_optional", tiles = {"default_glass.png^[colorize:#DEDEDE", "default_glass_detail.png^[colorize:#DEDEDE"}, + use_texture_alpha = true, paramtype = "light", sunlight_propagates = true, is_ground_content = false, @@ -204,6 +205,7 @@ local nodes = { description = S("Coal Glass"), drawtype = "glasslike_framed_optional", tiles = {"default_glass.png^[colorize:#828282", "default_glass_detail.png^[colorize:#828282"}, + use_texture_alpha = true, paramtype = "light", sunlight_propagates = true, is_ground_content = false, @@ -214,6 +216,7 @@ local nodes = { description = S("Clean Glass"), drawtype = "glasslike_framed_optional", tiles = {"moreblocks_clean_glass.png", "moreblocks_clean_glass_detail.png"}, + use_texture_alpha = true, paramtype = "light", sunlight_propagates = true, is_ground_content = false, @@ -313,6 +316,7 @@ local nodes = { description = S("Trap Glass"), drawtype = "glasslike_framed_optional", tiles = {"default_glass.png^moreblocks_trap_box_glass.png", "default_glass_detail.png"}, + use_texture_alpha = true, paramtype = "light", sunlight_propagates = true, is_ground_content = false, @@ -325,6 +329,7 @@ local nodes = { description = S("Trap Obsidian Glass"), drawtype = "glasslike_framed_optional", tiles = {"default_obsidian_glass.png^moreblocks_trap_box_glass.png", "default_obsidian_glass_detail.png"}, + use_texture_alpha = true, paramtype = "light", sunlight_propagates = true, is_ground_content = false, @@ -394,6 +399,7 @@ local nodes = { description = S("Glow Glass"), drawtype = "glasslike_framed_optional", tiles = {"default_glass.png^[colorize:#E9CD61", "default_glass_detail.png^[colorize:#E9CD61"}, + use_texture_alpha = true, paramtype = "light", sunlight_propagates = true, is_ground_content = false, @@ -405,6 +411,7 @@ local nodes = { description = S("Trap Glow Glass"), drawtype = "glasslike_framed_optional", tiles = {"default_glass.png^[colorize:#E9CD61^moreblocks_trap_box_glass.png", "default_glass_detail.png^[colorize:#E9CD61"}, + use_texture_alpha = true, paramtype = "light", sunlight_propagates = true, is_ground_content = false, @@ -418,6 +425,7 @@ local nodes = { description = S("Super Glow Glass"), drawtype = "glasslike_framed_optional", tiles = {"default_glass.png^[colorize:#FFFF78", "default_glass_detail.png^[colorize:#FFFF78"}, + use_texture_alpha = true, paramtype = "light", sunlight_propagates = true, is_ground_content = false, @@ -429,6 +437,7 @@ local nodes = { description = S("Trap Super Glow Glass"), drawtype = "glasslike_framed_optional", tiles = {"default_glass.png^[colorize:#FFFF78^moreblocks_trap_box_glass.png", "default_glass_detail.png^[colorize:#FFFF78"}, + use_texture_alpha = true, paramtype = "light", sunlight_propagates = true, is_ground_content = false, diff --git a/stairsplus/common.lua b/stairsplus/common.lua index d42ccfa..de852ca 100644 --- a/stairsplus/common.lua +++ b/stairsplus/common.lua @@ -16,6 +16,7 @@ local descriptions = { } stairsplus.register_single = function(category, alternate, info, modname, subname, recipeitem, fields) + local src_def = minetest.registered_nodes[recipeitem] or {} local desc_base = descriptions[category]:format(fields.description) local def = {} @@ -31,6 +32,9 @@ stairsplus.register_single = function(category, alternate, info, modname, subnam def.drawtype = "nodebox" def.paramtype = "light" def.paramtype2 = def.paramtype2 or "facedir" + if def.use_texture_alpha == nil then + def.use_texture_alpha = src_def.use_texture_alpha + end -- This makes node rotation work on placement def.place_param2 = nil