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

82 lines
2.5 KiB
Lua

-- LUALOCALS < ---------------------------------------------------------
local minetest, nodecore
= minetest, nodecore
-- LUALOCALS > ---------------------------------------------------------
local modname = minetest.get_current_modname()
local function tile(n)
return modname .. "_annealed.png^[mask:" .. modname .. "_shelf_" .. n .. ".png"
end
local function cbox(s) return nodecore.fixedbox(-s, -s, -s, s, s, s) end
minetest.register_node(modname .. ":shelf", {
description = "Lode Crate",
collision_box = cbox(0.5),
selection_box = cbox(0.5),
tiles = {tile("side"), tile("base"), tile("side")},
groups = {
cracky = 3,
visinv = 1,
storebox = 2,
totable = 1,
metal_cube = 1,
scaling_time = 50
},
paramtype = "light",
sunlight_propagates = true,
sounds = nodecore.sounds("nc_lode_annealed"),
storebox_access = function(pt) return pt.above.y >= pt.under.y end
})
nodecore.register_craft({
label = "assemble lode shelf",
norotate = true,
action = "pummel",
toolgroups = {thumpy = 3},
indexkeys = {modname .. ":prill_hot"},
nodes = {
{match = modname .. ":prill_hot", replace = "air"},
{x = -1, z = -1, match = modname .. ":rod_annealed", replace = modname .. ":shelf"},
{x = 1, z = -1, match = modname .. ":rod_annealed", replace = modname .. ":shelf"},
{x = -1, z = 1, match = modname .. ":rod_annealed", replace = modname .. ":shelf"},
{x = 1, z = 1, match = modname .. ":rod_annealed", replace = modname .. ":shelf"},
},
items = {
modname .. ":prill_annealed"
}
})
nodecore.register_craft({
label = "assemble lode shelf",
norotate = true,
action = "pummel",
toolgroups = {thumpy = 3},
indexkeys = {modname .. ":prill_hot"},
nodes = {
{match = modname .. ":prill_hot", replace = "air"},
{x = -1, z = 0, match = modname .. ":rod_annealed", replace = modname .. ":shelf"},
{x = 1, z = 0, match = modname .. ":rod_annealed", replace = modname .. ":shelf"},
{x = 0, z = -1, match = modname .. ":rod_annealed", replace = modname .. ":shelf"},
{x = 0, z = 1, match = modname .. ":rod_annealed", replace = modname .. ":shelf"},
},
items = {
modname .. ":prill_annealed"
}
})
nodecore.register_craft({
label = "break apart lode shelf",
norotate = true,
action = "pummel",
toolgroups = {choppy = 3},
check = function(pos) return nodecore.stack_get(pos):is_empty() end,
indexkeys = {modname .. ":shelf"},
nodes = {
{match = modname .. ":shelf", replace = "air"},
},
items = {
{name = modname .. ":bar_annealed 2", scatter = 0.001}
}
})