aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nodes.lua18
-rw-r--r--stairsplus/microblocks.lua2
-rw-r--r--stairsplus/panels.lua2
-rw-r--r--stairsplus/slabs.lua2
-rw-r--r--stairsplus/slopes.lua6
-rw-r--r--stairsplus/stairs.lua2
6 files changed, 23 insertions, 9 deletions
diff --git a/nodes.lua b/nodes.lua
index b6aca9f..bd64934 100644
--- a/nodes.lua
+++ b/nodes.lua
@@ -24,6 +24,8 @@ local function tile_tiles(name)
return {tex, tex, tex, tex, tex.. "^[transformR90", tex.. "^[transformR90"}
end
+local use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true
+
local box_slope = {
type = "fixed",
fixed = {
@@ -126,6 +128,7 @@ end
local function register_minimal_shapes(modname, subname, recipeitem, fields)
local defs = copytable(minimal_slopes_defs)
local desc = S("%s Slope"):format(fields.description)
+ local use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or fields.use_texture_alpha
for alternate, def in pairs(defs) do
for k, v in pairs(fields) do
def[k] = v
@@ -135,7 +138,7 @@ local function register_minimal_shapes(modname, subname, recipeitem, fields)
def.paramtype2 = def.paramtype2 or "facedir"
def.on_place = minetest.rotate_node
def.description = desc
- def.use_texture_alpha = fields.use_texture_alpha
+ def.use_texture_alpha = use_texture_alpha
def.groups = def.groups -- stairsplus:prepare_groups(fields.groups)
if fields.drop and not (type(fields.drop) == "table") then
def.drop = modname.. ":slope_" ..fields.drop..alternate
@@ -564,7 +567,7 @@ local nodes = {
tiles = {"moreblocks_dim_glow_glass.png"},
-- tiles = {"default_glass.png^[colorize:#FFFF78"},
one_texture = true,
- use_texture_alpha = true,
+ use_texture_alpha = use_texture_alpha,
paramtype = "light",
sunlight_propagates = true,
light_source = 5,
@@ -577,7 +580,7 @@ local nodes = {
tiles = {"moreblocks_dim_glow_glass.png"},
-- tiles = {"default_glass.png^[colorize:#FFFF78"},
one_texture = true,
- use_texture_alpha = true,
+ use_texture_alpha = use_texture_alpha,
paramtype = "light",
sunlight_propagates = true,
light_source = 12,
@@ -590,7 +593,7 @@ local nodes = {
tiles = {"moreblocks_low_glow_glass.png"},
-- tiles = {"default_glass.png^[colorize:#FFFF78"},
one_texture = true,
- use_texture_alpha = true,
+ use_texture_alpha = use_texture_alpha,
paramtype = "light",
sunlight_propagates = true,
light_source = 8,
@@ -802,7 +805,7 @@ for _,f in pairs(tinted_glass_1) do
neu.drawtype = "glasslike_framed_optional"
neu.tiles = t_name
neu.one_texture = true
- neu.use_texture_alpha = true
+ neu.use_texture_alpha = use_texture_alpha
neu.paramtype = "light"
neu.sunlight_propagates = true
neu.groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}
@@ -841,6 +844,7 @@ for name, def in pairs(nodes) do
temp_tiles = { def.tiles[1]}
end
for k, v in pairs(def.groups) do groups[k] = v end
+ local use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or def.use_texture_alpha
if not def.no_stairs then
stairsplus:register_all("moreblocks", name, "moreblocks:" ..name, {
description = def.description,
@@ -849,7 +853,7 @@ for name, def in pairs(nodes) do
sunlight_propagates = def.sunlight_propagates,
light_source = def.light_source,
sounds = def.sounds,
- use_texture_alpha = def.use_texture_alpha
+ use_texture_alpha = use_texture_alpha
})
else
if def.train_slopes then
@@ -862,7 +866,7 @@ for name, def in pairs(nodes) do
sunlight_propagates = def.sunlight_propagates,
light_source = def.light_source,
sounds = def.sounds,
- use_texture_alpha = def.use_texture_alpha
+ use_texture_alpha = use_texture_alpha
})
end
end
diff --git a/stairsplus/microblocks.lua b/stairsplus/microblocks.lua
index 49e4dcd..f65eb60 100644
--- a/stairsplus/microblocks.lua
+++ b/stairsplus/microblocks.lua
@@ -86,6 +86,7 @@ end
function stairsplus:register_micro(modname, subname, recipeitem, fields)
local defs = stairsplus.copytable(microblocks_defs)
local desc = S("%s Microblock"):format(fields.description)
+ local use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or fields.use_texture_alpha
for alternate, def in pairs(defs) do
for k, v in pairs(fields) do
def[k] = v
@@ -93,6 +94,7 @@ function stairsplus:register_micro(modname, subname, recipeitem, fields)
def.drawtype = "nodebox"
def.paramtype = "light"
def.paramtype2 = def.paramtype2 or "facedir"
+ def.use_texture_alpha = use_texture_alpha
def.on_place = minetest.rotate_node
def.groups = stairsplus:prepare_groups(fields.groups)
if alternate == "_1" then
diff --git a/stairsplus/panels.lua b/stairsplus/panels.lua
index 82a7300..4ffd8ca 100644
--- a/stairsplus/panels.lua
+++ b/stairsplus/panels.lua
@@ -86,6 +86,7 @@ end
function stairsplus:register_panel(modname, subname, recipeitem, fields)
local defs = stairsplus.copytable(panels_defs)
local desc = S("%s Panel"):format(fields.description)
+ local use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or fields.use_texture_alpha
for alternate, def in pairs(defs) do
for k, v in pairs(fields) do
def[k] = v
@@ -93,6 +94,7 @@ function stairsplus:register_panel(modname, subname, recipeitem, fields)
def.drawtype = "nodebox"
def.paramtype = "light"
def.paramtype2 = def.paramtype2 or "facedir"
+ def.use_texture_alpha = use_texture_alpha
def.on_place = minetest.rotate_node
def.description = desc
def.groups = stairsplus:prepare_groups(fields.groups)
diff --git a/stairsplus/slabs.lua b/stairsplus/slabs.lua
index 3af7d7e..18a25a7 100644
--- a/stairsplus/slabs.lua
+++ b/stairsplus/slabs.lua
@@ -65,6 +65,7 @@ end
function stairsplus:register_slab(modname, subname, recipeitem, fields)
local defs = stairsplus.copytable(slabs_defs)
local desc_base = S("%s Slab"):format(fields.description)
+ local use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or fields.use_texture_alpha
for alternate, shape in pairs(defs) do
local def = {}
@@ -94,6 +95,7 @@ function stairsplus:register_slab(modname, subname, recipeitem, fields)
def.drawtype = "nodebox"
def.paramtype = "light"
def.paramtype2 = def.paramtype2 or "facedir"
+ def.use_texture_alpha = use_texture_alpha
def.on_place = minetest.rotate_node
def.groups = stairsplus:prepare_groups(fields.groups)
if alternate == "_1" or alternate == "_two_sides" then
diff --git a/stairsplus/slopes.lua b/stairsplus/slopes.lua
index 91a78f2..9f16730 100644
--- a/stairsplus/slopes.lua
+++ b/stairsplus/slopes.lua
@@ -113,6 +113,7 @@ local box_slope_outer_half_raised = {
-- Node will be called <modname>:slope_<subname>
function register_slope(modname, subname, recipeitem, groups, images, description, drop, light)
+ local use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true
stairsplus:register_slope(modname, subname, recipeitem, {
groups = groups,
tiles = images,
@@ -120,7 +121,7 @@ function register_slope(modname, subname, recipeitem, groups, images, descriptio
drop = drop,
light_source = light,
sounds = default.node_sound_stone_defaults(),
- use_texture_alpha = use_texture_alpha
+ use_texture_alpha = use_texture_alpha
})
end
@@ -241,6 +242,7 @@ end
function stairsplus:register_slope(modname, subname, recipeitem, fields)
local defs = stairsplus.copytable(slopes_defs)
local desc = S("%s Slope"):format(fields.description)
+ local use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or fields.use_texture_alpha
for alternate, def in pairs(defs) do
for k, v in pairs(fields) do
def[k] = v
@@ -248,9 +250,9 @@ function stairsplus:register_slope(modname, subname, recipeitem, fields)
def.drawtype = "mesh"
def.paramtype = "light"
def.paramtype2 = def.paramtype2 or "facedir"
+ def.use_texture_alpha = use_texture_alpha
def.on_place = minetest.rotate_node
def.description = desc
- def.use_texture_alpha = fields.use_texture_alpha
def.groups = stairsplus:prepare_groups(fields.groups)
if alternate == "_half" or alternate == "_half_raised" then
def.groups.not_blocking_trains = 1
diff --git a/stairsplus/stairs.lua b/stairsplus/stairs.lua
index 0291e7d..55ee51e 100644
--- a/stairsplus/stairs.lua
+++ b/stairsplus/stairs.lua
@@ -126,6 +126,7 @@ end
function stairsplus:register_stair(modname, subname, recipeitem, fields)
local defs = stairsplus.copytable(stairs_defs)
local desc = S("%s Stairs"):format(fields.description)
+ local use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or fields.use_texture_alpha
for alternate, def in pairs(defs) do
for k, v in pairs(fields) do
def[k] = v
@@ -133,6 +134,7 @@ function stairsplus:register_stair(modname, subname, recipeitem, fields)
def.drawtype = "nodebox"
def.paramtype = "light"
def.paramtype2 = def.paramtype2 or "facedir"
+ def.use_texture_alpha = use_texture_alpha
def.on_place = minetest.rotate_node
def.description = desc
def.groups = stairsplus:prepare_groups(fields.groups)