Fix texture alpha deprecation warnings
This commit is contained in:
parent
a4c18c984b
commit
3b5b3f0c11
@ -1,6 +1,7 @@
|
||||
local realchess = {}
|
||||
local S = minetest.get_translator("xdecor")
|
||||
local FS = function(...) return minetest.formspec_escape(S(...)) end
|
||||
local ALPHA_OPAQUE = minetest.features.use_texture_alpha_string_modes and "opaque" or false
|
||||
screwdriver = screwdriver or {}
|
||||
|
||||
local function index_to_xy(idx)
|
||||
@ -1429,6 +1430,7 @@ minetest.register_node(":realchess:chessboard", {
|
||||
inventory_image = "chessboard_top.png",
|
||||
wield_image = "chessboard_top.png",
|
||||
tiles = {"chessboard_top.png", "chessboard_top.png", "chessboard_sides.png"},
|
||||
use_texture_alpha = ALPHA_OPAQUE,
|
||||
groups = {choppy=3, oddly_breakable_by_hand=2, flammable=3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = {type = "fixed", fixed = {-.375, -.5, -.375, .375, -.4375, .375}},
|
||||
|
@ -6,6 +6,7 @@ local plate = {}
|
||||
screwdriver = screwdriver or {}
|
||||
|
||||
local S = minetest.get_translator("xdecor")
|
||||
local ALPHA_OPAQUE = minetest.features.use_texture_alpha_string_modes and "opaque" or false
|
||||
|
||||
local function door_toggle(pos_actuator, pos_door, player)
|
||||
local player_name = player:get_player_name()
|
||||
@ -59,6 +60,7 @@ function plate.register(material, desc, def)
|
||||
xdecor.register("pressure_" .. material .. "_off", {
|
||||
description = def.description or (desc .. " Pressure Plate"),
|
||||
tiles = {"xdecor_pressure_" .. material .. ".png"},
|
||||
use_texture_alpha = ALPHA_OPAQUE,
|
||||
drawtype = "nodebox",
|
||||
node_box = xdecor.pixelbox(16, {{1, 0, 1, 14, 1, 14}}),
|
||||
groups = def.groups,
|
||||
@ -70,6 +72,7 @@ function plate.register(material, desc, def)
|
||||
})
|
||||
xdecor.register("pressure_" .. material .. "_on", {
|
||||
tiles = {"xdecor_pressure_" .. material .. ".png"},
|
||||
use_texture_alpha = ALPHA_OPAQUE,
|
||||
drawtype = "nodebox",
|
||||
node_box = xdecor.pixelbox(16, {{1, 0, 1, 14, 0.4, 14}}),
|
||||
groups = def.groups,
|
||||
@ -95,6 +98,7 @@ plate.register("stone", "Stone", {
|
||||
xdecor.register("lever_off", {
|
||||
description = S("Lever"),
|
||||
tiles = {"xdecor_lever_off.png"},
|
||||
use_texture_alpha = ALPHA_OPAQUE,
|
||||
drawtype = "nodebox",
|
||||
node_box = xdecor.pixelbox(16, {{2, 1, 15, 12, 14, 1}}),
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 2},
|
||||
@ -118,6 +122,7 @@ xdecor.register("lever_off", {
|
||||
|
||||
xdecor.register("lever_on", {
|
||||
tiles = {"xdecor_lever_on.png"},
|
||||
use_texture_alpha = ALPHA_OPAQUE,
|
||||
drawtype = "nodebox",
|
||||
node_box = xdecor.pixelbox(16, {{2, 1, 15, 12, 14, 1}}),
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 2, not_in_creative_inventory = 1},
|
||||
|
@ -1,5 +1,7 @@
|
||||
screwdriver = screwdriver or {}
|
||||
local S = minetest.get_translator("xdecor")
|
||||
local ALPHA_CLIP = minetest.features.use_texture_alpha_string_modes and "clip" or true
|
||||
local ALPHA_OPAQUE = minetest.features.use_texture_alpha_string_modes and "opaque" or false
|
||||
|
||||
local function register_pane(name, desc, def)
|
||||
xpanes.register_pane(name, {
|
||||
@ -80,6 +82,7 @@ local function register_storage(name, desc, def)
|
||||
inventory = {size = def.inv_size or 24},
|
||||
infotext = desc,
|
||||
tiles = def.tiles,
|
||||
use_texture_alpha = ALPHA_OPAQUE,
|
||||
node_box = def.node_box,
|
||||
on_rotate = def.on_rotate,
|
||||
on_place = def.on_place,
|
||||
@ -480,6 +483,7 @@ local painting_box = {
|
||||
xdecor.register("painting_1", {
|
||||
description = S("Painting"),
|
||||
tiles = {"xdecor_painting_1.png"},
|
||||
use_texture_alpha = ALPHA_OPAQUE,
|
||||
inventory_image = "xdecor_painting_empty.png",
|
||||
wield_image = "xdecor_painting_empty.png",
|
||||
paramtype2 = "wallmounted",
|
||||
@ -505,6 +509,7 @@ xdecor.register("painting_1", {
|
||||
for i = 2, 4 do
|
||||
xdecor.register("painting_" .. i, {
|
||||
tiles = {"xdecor_painting_" .. i .. ".png"},
|
||||
use_texture_alpha = ALPHA_OPAQUE,
|
||||
paramtype2 = "wallmounted",
|
||||
drop = "xdecor:painting_1",
|
||||
sunlight_propagates = true,
|
||||
@ -584,6 +589,7 @@ xdecor.register("tatami", {
|
||||
xdecor.register("trampoline", {
|
||||
description = S("Trampoline"),
|
||||
tiles = {"xdecor_trampoline.png", "mailbox_blank16.png", "xdecor_trampoline_sides.png"},
|
||||
use_texture_alpha = ALPHA_CLIP,
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 1, fall_damage_add_percent = -80, bouncy = 90},
|
||||
node_box = xdecor.nodebox.slab_y(0.5),
|
||||
sounds = {
|
||||
@ -616,6 +622,7 @@ xdecor.register("woodframed_glass", {
|
||||
drawtype = "glasslike_framed",
|
||||
sunlight_propagates = true,
|
||||
tiles = {"xdecor_woodframed_glass.png", "xdecor_woodframed_glass_detail.png"},
|
||||
use_texture_alpha = ALPHA_CLIP,
|
||||
groups = {cracky = 2, oddly_breakable_by_hand = 1},
|
||||
sounds = default.node_sound_glass_defaults()
|
||||
})
|
||||
|
@ -310,6 +310,7 @@ for i = 1, #nodes do
|
||||
drawtype = "nodebox",
|
||||
sounds = def.sounds,
|
||||
tiles = tiles,
|
||||
use_texture_alpha = def.use_texture_alpha,
|
||||
groups = groups,
|
||||
-- `unpack` has been changed to `table.unpack` in newest Lua versions
|
||||
node_box = xdecor.pixelbox(16, {unpack(d, 3)}),
|
||||
|
Loading…
Reference in New Issue
Block a user