-- Wall Slab Light
minetest.register_node("lightsplus:slab_light_wall", {
description = "Wall Slab Light",
tile_images = {"lightsplus_light.png"},
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.5, 0.5},
},
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.5, 0.5},
},
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2},
})
minetest.register_node("lightsplus:slab_light_wall_on", {
description = "Active Slab Light",
tile_images = {"lightsplus_light.png"},
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.5, 0.5},
},
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.5, 0.5},
},
drop = 'lightsplus:slab_light',
light_source = 15,
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2, not_in_creative_inventory=2},
...
if node.name == 'lightsplus:slab_light_wall' then
minetest.env:add_node(pos, {name="lightsplus:slab_light_wall_on"})
nodeupdate(pos)
elseif node.name == 'lightsplus:slab_light_wall_on' then
minetest.env:add_node(pos, {name="lightsplus:slab_light_wall",})
nodeupdate(pos)
end
end
print("[Lights+] Loaded!")
minetest.register_on_punchnode(on_light_puncher)
})
minetest.env:add_node(pos, {name="lightsplus:slab_light_wall_on", param2=node.param2})
minetest.env:add_node(pos, {name="lightsplus:slab_light_wall", param2=node.param2})
Users browsing this forum: No registered users and 19 guests