k so ive added a new feature into my mod but when i go to punch it to turn it on, it doesnt turn on. Could someone help and if its needed heres the code
minetest.register_node("techno:techno_lamp", {
description = "techno lamp",
drawtype = "glasslike",
paramtype = "light",
sunlight_propagates = true,
tiles = {"techno_lamp.png"},
groups = {choppy=3,cracky=2},
})
minetest.register_node("techno:techno_lamp_on", {
description = "techno lamp",
tile_images = {"techno_lamp.png"},
drawtype = "glasslike",
paramtype = "light",
sunlight_propagates = true,
drop = 'techno:techno_lamp',
light_source = 14,
groups = {choppy=3,cracky=3,not_in_creative_inventory=1},
})
minetest.register_craft({
output = '"techno:techno_lamp"',
recipe = {
{'techno:steel_cluster', 'default:cobble', 'techno:steel_cluster'},
{'default:cobble', 'default:glass', 'default:cobble'},
{'techno:steel_cluster', 'default:cobble', 'techno:steel_cluster'},
}
})
local on_light_puncher = function (pos, node, puncher)
if node.name == 'techno:techno_lamp' then
minetest.env:add_node(pos, {name="techno:techno_lamp_on"})
nodeupdate(pos)
elseif node.name == 'techno:techno_lamp_on' then
minetest.env:add_node(pos, {name="techno:techno_lamp",})
nodeupdate(pos)
end
end
also the inventory image is really dark, dunno how to fix that...