Aaron Suen 1632b6352a Revert "Appease 5.4-dev texture_alpha warnings"
This reverts commit 253c2282917ecade5b8356d592edab40b1d517f5.

Apparently this warning is full of crap.  Explicitly
setting use_texture_alpha in the node def does
something DIFFERENT than what the engine says
it's doing enabling it internally.  use_texture_alpha
enables alpha BLENDING, which is what we
don't want with interpolation filters, whereas
leaving it off enables alpha THRESHOLDING which
is exactly what we want.
2020-09-05 23:46:44 -04:00

60 lines
1.9 KiB
Lua

-- LUALOCALS < ---------------------------------------------------------
local minetest, nodecore
= minetest, nodecore
-- LUALOCALS > ---------------------------------------------------------
local modname = minetest.get_current_modname()
local bark = "nc_tree_tree_side.png^[mask:nc_api_storebox_frame.png"
local plank = modname .. "_plank.png^(" .. bark .. ")"
minetest.register_node(modname .. ":shelf", {
description = "Wooden Shelf",
tiles = {bark, plank},
selection_box = nodecore.fixedbox(),
collision_box = nodecore.fixedbox(),
groups = {
choppy = 1,
visinv = 1,
flammable = 2,
fire_fuel = 3,
storebox = 1,
totable = 1,
scaling_time = 50
},
paramtype = "light",
sounds = nodecore.sounds("nc_tree_woody"),
storebox_access = function(pt) return pt.above.y == pt.under.y end,
on_ignite = function(pos)
if minetest.get_node(pos).name == modname .. ":shelf" then
return nodecore.stack_get(pos)
end
end
})
nodecore.register_craft({
label = "assemble wood shelf",
norotate = true,
indexkeys = {modname .. ":plank"},
nodes = {
{match = modname .. ":plank", replace = "air"},
{x = -1, z = -1, match = modname .. ":frame", replace = modname .. ":shelf"},
{x = 1, z = -1, match = modname .. ":frame", replace = modname .. ":shelf"},
{x = -1, z = 1, match = modname .. ":frame", replace = modname .. ":shelf"},
{x = 1, z = 1, match = modname .. ":frame", replace = modname .. ":shelf"},
}
})
nodecore.register_craft({
label = "assemble wood shelf",
norotate = true,
indexkeys = {modname .. ":plank"},
nodes = {
{match = modname .. ":plank", replace = "air"},
{x = 0, z = -1, match = modname .. ":frame", replace = modname .. ":shelf"},
{x = 0, z = 1, match = modname .. ":frame", replace = modname .. ":shelf"},
{x = -1, z = 0, match = modname .. ":frame", replace = modname .. ":shelf"},
{x = 1, z = 0, match = modname .. ":frame", replace = modname .. ":shelf"},
}
})