test for the use_texture_alpha_string_modes feature

This commit is contained in:
HybridDog 2021-03-15 14:46:06 +01:00
parent e162cabae4
commit ba31d9e663
2 changed files with 11 additions and 3 deletions

View File

@ -58,6 +58,10 @@ for n,i in pairs({{0,0},{1,0},{1,1}}) do
top_texture = pre..top_texture top_texture = pre..top_texture
end end
local use_texture_alpha
if minetest.features.use_texture_alpha_string_modes then
use_texture_alpha = "opaque"
end
minetest.register_node("moremesecons_dual_delayer:dual_delayer_"..i1 ..i2, { minetest.register_node("moremesecons_dual_delayer:dual_delayer_"..i1 ..i2, {
description = "Dual Delayer", description = "Dual Delayer",
drop = "moremesecons_dual_delayer:dual_delayer_00", drop = "moremesecons_dual_delayer:dual_delayer_00",
@ -74,7 +78,7 @@ for n,i in pairs({{0,0},{1,0},{1,1}}) do
}, },
groups = groups, groups = groups,
tiles = {top_texture, "moremesecons_dual_delayer_bottom.png", "moremesecons_dual_delayer_side_left.png", "moremesecons_dual_delayer_side_right.png", "moremesecons_dual_delayer_ends.png", "moremesecons_dual_delayer_ends.png"}, tiles = {top_texture, "moremesecons_dual_delayer_bottom.png", "moremesecons_dual_delayer_side_left.png", "moremesecons_dual_delayer_side_right.png", "moremesecons_dual_delayer_ends.png", "moremesecons_dual_delayer_ends.png"},
use_texture_alpha = "opaque", use_texture_alpha = use_texture_alpha,
mesecons = { mesecons = {
receptor = { receptor = {
state = mesecon.state.off, state = mesecon.state.off,

View File

@ -47,6 +47,10 @@ local boxes = {{ -6/16, -8/16, -6/16, 6/16, -7/16, 6/16 }, -- the main slab
{ -8/16, -8/16, -1/16, -6/16, -7/16, 1/16 }, -- the two wire stubs { -8/16, -8/16, -1/16, -6/16, -7/16, 1/16 }, -- the two wire stubs
{ 6/16, -8/16, -1/16, 8/16, -7/16, 1/16 }} { 6/16, -8/16, -1/16, 8/16, -7/16, 1/16 }}
local use_texture_alpha
if minetest.features.use_texture_alpha_string_modes then
use_texture_alpha = "opaque"
end
mesecon.register_node("moremesecons_timegate:timegate", { mesecon.register_node("moremesecons_timegate:timegate", {
description = "Time Gate", description = "Time Gate",
drawtype = "nodebox", drawtype = "nodebox",
@ -84,7 +88,7 @@ mesecon.register_node("moremesecons_timegate:timegate", {
"moremesecons_timegate_sides_off.png", "moremesecons_timegate_sides_off.png",
"moremesecons_timegate_sides_off.png" "moremesecons_timegate_sides_off.png"
}, },
use_texture_alpha = "opaque", use_texture_alpha = use_texture_alpha,
groups = {bendy=2,snappy=1,dig_immediate=2}, groups = {bendy=2,snappy=1,dig_immediate=2},
mesecons = { mesecons = {
receptor = receptor =
@ -107,7 +111,7 @@ mesecon.register_node("moremesecons_timegate:timegate", {
"moremesecons_timegate_sides_on.png", "moremesecons_timegate_sides_on.png",
"moremesecons_timegate_sides_on.png" "moremesecons_timegate_sides_on.png"
}, },
use_texture_alpha = "opaque", use_texture_alpha = use_texture_alpha,
groups = {bendy=2,snappy=1,dig_immediate=2, not_in_creative_inventory=1}, groups = {bendy=2,snappy=1,dig_immediate=2, not_in_creative_inventory=1},
mesecons = { mesecons = {
receptor = { receptor = {