Fix use_texture_alpha warnings since 5.4.0-dev

Update xpanes documentation (most panes have alpha)
This commit is contained in:
SmallJoker 2020-08-16 10:17:56 +02:00
parent 7d95b6f4c9
commit 738b53249b
9 changed files with 30 additions and 3 deletions

View file

@ -792,7 +792,9 @@ Creates panes that automatically connect to each other
groups = {group = rating}, -- Uses the known node groups, see [Known damage and digging time defining groups] groups = {group = rating}, -- Uses the known node groups, see [Known damage and digging time defining groups]
sounds = SoundSpec, -- See [#Default sounds] sounds = SoundSpec, -- See [#Default sounds]
recipe = {{"","","","","","","","",""}}, -- Recipe field only recipe = {{"","","","","","","","",""}}, -- Recipe field only
use_texture_alpha = true, -- Optional boolean (default: `false`) for colored glass panes use_texture_alpha = true,
-- ^ Set to 'false' for opaque panes, to increase rendering
-- performance. Default is 'true'
} }

View file

@ -31,6 +31,7 @@ function beds.register_bed(name, def)
wield_image = def.wield_image, wield_image = def.wield_image,
drawtype = "nodebox", drawtype = "nodebox",
tiles = def.tiles.bottom, tiles = def.tiles.bottom,
use_texture_alpha = true,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
is_ground_content = false, is_ground_content = false,
@ -151,6 +152,7 @@ function beds.register_bed(name, def)
minetest.register_node(name .. "_top", { minetest.register_node(name .. "_top", {
drawtype = "nodebox", drawtype = "nodebox",
tiles = def.tiles.top, tiles = def.tiles.top,
use_texture_alpha = true,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
is_ground_content = false, is_ground_content = false,

View file

@ -449,6 +449,7 @@ function default.register_mesepost(name, def)
}, },
paramtype = "light", paramtype = "light",
tiles = {def.texture, def.texture, post_texture_dark, post_texture_dark, post_texture, post_texture}, tiles = {def.texture, def.texture, post_texture_dark, post_texture_dark, post_texture, post_texture},
use_texture_alpha = true,
light_source = default.LIGHT_MAX, light_source = default.LIGHT_MAX,
sunlight_propagates = true, sunlight_propagates = true,
is_ground_content = false, is_ground_content = false,

View file

@ -2565,6 +2565,7 @@ local function register_sign(material, desc, def)
description = desc, description = desc,
drawtype = "nodebox", drawtype = "nodebox",
tiles = {"default_sign_wall_" .. material .. ".png"}, tiles = {"default_sign_wall_" .. material .. ".png"},
use_texture_alpha = true,
inventory_image = "default_sign_" .. material .. ".png", inventory_image = "default_sign_" .. material .. ".png",
wield_image = "default_sign_" .. material .. ".png", wield_image = "default_sign_" .. material .. ".png",
paramtype = "light", paramtype = "light",
@ -2793,6 +2794,7 @@ minetest.register_node("default:glass", {
description = S("Glass"), description = S("Glass"),
drawtype = "glasslike_framed_optional", drawtype = "glasslike_framed_optional",
tiles = {"default_glass.png", "default_glass_detail.png"}, tiles = {"default_glass.png", "default_glass_detail.png"},
use_texture_alpha = true,
paramtype = "light", paramtype = "light",
paramtype2 = "glasslikeliquidlevel", paramtype2 = "glasslikeliquidlevel",
sunlight_propagates = true, sunlight_propagates = true,
@ -2805,6 +2807,7 @@ minetest.register_node("default:obsidian_glass", {
description = S("Obsidian Glass"), description = S("Obsidian Glass"),
drawtype = "glasslike_framed_optional", drawtype = "glasslike_framed_optional",
tiles = {"default_obsidian_glass.png", "default_obsidian_glass_detail.png"}, tiles = {"default_obsidian_glass.png", "default_obsidian_glass_detail.png"},
use_texture_alpha = true,
paramtype = "light", paramtype = "light",
paramtype2 = "glasslikeliquidlevel", paramtype2 = "glasslikeliquidlevel",
is_ground_content = false, is_ground_content = false,

View file

@ -29,6 +29,7 @@ minetest.register_node("default:torch", {
name = "default_torch_on_floor_animated.png", name = "default_torch_on_floor_animated.png",
animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3} animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3}
}}, }},
use_texture_alpha = true,
paramtype = "light", paramtype = "light",
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
sunlight_propagates = true, sunlight_propagates = true,
@ -81,6 +82,7 @@ minetest.register_node("default:torch_wall", {
name = "default_torch_on_floor_animated.png", name = "default_torch_on_floor_animated.png",
animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3} animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3}
}}, }},
use_texture_alpha = true,
paramtype = "light", paramtype = "light",
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
sunlight_propagates = true, sunlight_propagates = true,
@ -105,6 +107,7 @@ minetest.register_node("default:torch_ceiling", {
name = "default_torch_on_floor_animated.png", name = "default_torch_on_floor_animated.png",
animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3} animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3}
}}, }},
use_texture_alpha = true,
paramtype = "light", paramtype = "light",
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
sunlight_propagates = true, sunlight_propagates = true,

View file

@ -428,6 +428,7 @@ function doors.register(name, def)
def.drawtype = "mesh" def.drawtype = "mesh"
def.paramtype = "light" def.paramtype = "light"
def.paramtype2 = "facedir" def.paramtype2 = "facedir"
def.use_texture_alpha = true
def.sunlight_propagates = true def.sunlight_propagates = true
def.walkable = true def.walkable = true
def.is_ground_content = false def.is_ground_content = false
@ -578,6 +579,7 @@ function doors.register_trapdoor(name, def)
def.drawtype = "nodebox" def.drawtype = "nodebox"
def.paramtype = "light" def.paramtype = "light"
def.paramtype2 = "facedir" def.paramtype2 = "facedir"
def.use_texture_alpha = true
def.is_ground_content = false def.is_ground_content = false
if def.protected then if def.protected then

View file

@ -277,6 +277,7 @@ local waterlily_def = {
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
tiles = {"flowers_waterlily.png", "flowers_waterlily_bottom.png"}, tiles = {"flowers_waterlily.png", "flowers_waterlily_bottom.png"},
use_texture_alpha = true,
inventory_image = "flowers_waterlily.png", inventory_image = "flowers_waterlily.png",
wield_image = "flowers_waterlily.png", wield_image = "flowers_waterlily.png",
liquids_pointable = true, liquids_pointable = true,

View file

@ -61,6 +61,8 @@ end
function stairs.register_stair(subname, recipeitem, groups, images, description, function stairs.register_stair(subname, recipeitem, groups, images, description,
sounds, worldaligntex) sounds, worldaligntex)
local src_def = minetest.registered_nodes[recipeitem]
-- Set backface culling and world-aligned textures -- Set backface culling and world-aligned textures
local stair_images = {} local stair_images = {}
for i, image in ipairs(images) do for i, image in ipairs(images) do
@ -82,6 +84,7 @@ function stairs.register_stair(subname, recipeitem, groups, images, description,
end end
end end
end end
local new_groups = table.copy(groups) local new_groups = table.copy(groups)
new_groups.stair = 1 new_groups.stair = 1
warn_if_exists("stairs:stair_" .. subname) warn_if_exists("stairs:stair_" .. subname)
@ -89,6 +92,7 @@ function stairs.register_stair(subname, recipeitem, groups, images, description,
description = description, description = description,
drawtype = "nodebox", drawtype = "nodebox",
tiles = stair_images, tiles = stair_images,
use_texture_alpha = src_def and src_def.use_texture_alpha,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
is_ground_content = false, is_ground_content = false,
@ -160,6 +164,8 @@ end
function stairs.register_slab(subname, recipeitem, groups, images, description, function stairs.register_slab(subname, recipeitem, groups, images, description,
sounds, worldaligntex) sounds, worldaligntex)
local src_def = minetest.registered_nodes[recipeitem]
-- Set world-aligned textures -- Set world-aligned textures
local slab_images = {} local slab_images = {}
for i, image in ipairs(images) do for i, image in ipairs(images) do
@ -184,6 +190,7 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
description = description, description = description,
drawtype = "nodebox", drawtype = "nodebox",
tiles = slab_images, tiles = slab_images,
use_texture_alpha = src_def and src_def.use_texture_alpha,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
is_ground_content = false, is_ground_content = false,
@ -297,6 +304,8 @@ end
function stairs.register_stair_inner(subname, recipeitem, groups, images, function stairs.register_stair_inner(subname, recipeitem, groups, images,
description, sounds, worldaligntex, full_description) description, sounds, worldaligntex, full_description)
local src_def = minetest.registered_nodes[recipeitem]
-- Set backface culling and world-aligned textures -- Set backface culling and world-aligned textures
local stair_images = {} local stair_images = {}
for i, image in ipairs(images) do for i, image in ipairs(images) do
@ -330,6 +339,7 @@ function stairs.register_stair_inner(subname, recipeitem, groups, images,
description = description, description = description,
drawtype = "nodebox", drawtype = "nodebox",
tiles = stair_images, tiles = stair_images,
use_texture_alpha = src_def and src_def.use_texture_alpha,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
is_ground_content = false, is_ground_content = false,
@ -384,6 +394,8 @@ end
function stairs.register_stair_outer(subname, recipeitem, groups, images, function stairs.register_stair_outer(subname, recipeitem, groups, images,
description, sounds, worldaligntex, full_description) description, sounds, worldaligntex, full_description)
local src_def = minetest.registered_nodes[recipeitem]
-- Set backface culling and world-aligned textures -- Set backface culling and world-aligned textures
local stair_images = {} local stair_images = {}
for i, image in ipairs(images) do for i, image in ipairs(images) do
@ -417,6 +429,7 @@ function stairs.register_stair_outer(subname, recipeitem, groups, images,
description = description, description = description,
drawtype = "nodebox", drawtype = "nodebox",
tiles = stair_images, tiles = stair_images,
use_texture_alpha = src_def and src_def.use_texture_alpha,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
is_ground_content = false, is_ground_content = false,

View file

@ -113,10 +113,10 @@ function xpanes.register_pane(name, def)
def.textures[1], def.textures[1],
def.textures[1] def.textures[1]
}, },
use_texture_alpha = def.use_texture_alpha ~= false,
groups = flatgroups, groups = flatgroups,
drop = "xpanes:" .. name .. "_flat", drop = "xpanes:" .. name .. "_flat",
sounds = def.sounds, sounds = def.sounds,
use_texture_alpha = def.use_texture_alpha or false,
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}}, fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}},
@ -142,10 +142,10 @@ function xpanes.register_pane(name, def)
def.textures[3], def.textures[3],
def.textures[1] def.textures[1]
}, },
use_texture_alpha = def.use_texture_alpha ~= false,
groups = groups, groups = groups,
drop = "xpanes:" .. name .. "_flat", drop = "xpanes:" .. name .. "_flat",
sounds = def.sounds, sounds = def.sounds,
use_texture_alpha = def.use_texture_alpha or false,
node_box = { node_box = {
type = "connected", type = "connected",
fixed = {{-1/32, -1/2, -1/32, 1/32, 1/2, 1/32}}, fixed = {{-1/32, -1/2, -1/32, 1/32, 1/2, 1/32}},