Aaron Suen ee48e9684f Convert lanterns from always-item to mainly-node
Relying on the dynamic light thing for lanterns when they are
placed on the ground causes unexpected behavior when it comes to
lens activation and the displacement of dynamic light outside of
the node space of the lantern itself.  It also causes issues with
lanterns lost deep underwater, i.e. they don't emit light when
they effectively should.
2022-10-20 07:20:48 -04:00

34 lines
877 B
Lua

-- LUALOCALS < ---------------------------------------------------------
local minetest, nodecore
= minetest, nodecore
-- LUALOCALS > ---------------------------------------------------------
local modname = minetest.get_current_modname()
nodecore.register_craft({
label = "assemble lantern",
normal = {x = 1},
indexkeys = {"nc_optics:glass_opaque"},
nodes = {
{match = "nc_optics:glass_opaque", replace = "air"},
{x = -1, match = "nc_tote:handle", replace = modname .. ":lamp0"},
}
})
nodecore.register_craft({
label = "break apart lantern",
action = "pummel",
toolgroups = {choppy = 5},
indexkeys = {"group:" .. modname},
nodes = {
{
match = {groups = {[modname] = true}},
replace = "air"
}
},
items = {
{name = "nc_lode:bar_annealed 2", count = 4, scatter = 5},
{name = "nc_optics:glass_crude", scatter = 5}
}
})