Update game APIs for use_texture_alpha deprecation

This commit is contained in:
sfan5
2021-02-06 16:21:35 +01:00
parent 08b13c9efb
commit aa9cc39317
3 changed files with 16 additions and 2 deletions

View File

@ -63,6 +63,8 @@ end
function stairs.register_stair(subname, recipeitem, groups, images, description,
sounds, worldaligntex)
local src_def = minetest.registered_nodes[recipeitem]
-- Set backface culling and world-aligned textures
local stair_images = {}
for i, image in ipairs(images) do
@ -91,6 +93,7 @@ function stairs.register_stair(subname, recipeitem, groups, images, description,
description = description,
drawtype = "nodebox",
tiles = stair_images,
use_texture_alpha = src_def and src_def.use_texture_alpha,
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
@ -162,6 +165,8 @@ end
function stairs.register_slab(subname, recipeitem, groups, images, description,
sounds, worldaligntex)
local src_def = minetest.registered_nodes[recipeitem]
-- Set world-aligned textures
local slab_images = {}
for i, image in ipairs(images) do
@ -186,6 +191,7 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
description = description,
drawtype = "nodebox",
tiles = slab_images,
use_texture_alpha = src_def and src_def.use_texture_alpha,
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
@ -297,6 +303,8 @@ end
function stairs.register_stair_inner(subname, recipeitem, groups, images,
description, sounds, worldaligntex, full_description)
local src_def = minetest.registered_nodes[recipeitem]
-- Set backface culling and world-aligned textures
local stair_images = {}
for i, image in ipairs(images) do
@ -330,6 +338,7 @@ function stairs.register_stair_inner(subname, recipeitem, groups, images,
description = description,
drawtype = "nodebox",
tiles = stair_images,
use_texture_alpha = src_def and src_def.use_texture_alpha,
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
@ -384,6 +393,8 @@ end
function stairs.register_stair_outer(subname, recipeitem, groups, images,
description, sounds, worldaligntex, full_description)
local src_def = minetest.registered_nodes[recipeitem]
-- Set backface culling and world-aligned textures
local stair_images = {}
for i, image in ipairs(images) do
@ -417,6 +428,7 @@ function stairs.register_stair_outer(subname, recipeitem, groups, images,
description = description,
drawtype = "nodebox",
tiles = stair_images,
use_texture_alpha = src_def and src_def.use_texture_alpha,
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,