Get rid of most 5.4.0 texture warnings

This commit also shortens the lua_tube.lua code a bit
This commit is contained in:
SmallJoker
2021-03-24 19:47:25 +01:00
parent 9ad6e5d07a
commit d2954c5277
3 changed files with 55 additions and 68 deletions

View File

@ -26,6 +26,11 @@ local texture_mt = {
end
}
-- This will remove any semi-transparent pixels
-- because that is still buggy in Minetest, force this as default
local texture_alpha_mode = minetest.features.use_texture_alpha_string_modes
and "clip" or true
local register_one_tube = function(name, tname, dropname, desc, plain, noctrs, ends, short, inv, special, connects, style)
noctrs = noctrs or default_noctrs
setmetatable(noctrs, texture_mt)
@ -82,6 +87,7 @@ local register_one_tube = function(name, tname, dropname, desc, plain, noctrs, e
description = tubedesc,
drawtype = "nodebox",
tiles = outimgs,
use_texture_alpha = texture_alpha_mode,
sunlight_propagates = true,
inventory_image = iimg,
wield_image = iimg,