1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-11-17 15:48:31 +01:00
homedecor_modpack/homedecor/lighting.lua

557 lines
17 KiB
Lua
Raw Normal View History

-- This file supplies glowlights
2013-11-10 02:52:01 +01:00
local dirs2 = { 9, 18, 7, 12 }
local S = homedecor.gettext
2013-03-05 08:18:56 +01:00
2017-01-24 21:43:20 +01:00
local function N_(x) return x end
local colors = { N_("yellow"), N_("white") }
for i in ipairs(colors) do
local color = colors[i]
minetest.register_abm({
nodenames = { "homedecor:glowlight_thin_"..color },
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
2015-03-05 23:10:27 +01:00
minetest.set_node(pos, {name = "homedecor:glowlight_quarter_"..color, param2 = 20})
end,
})
minetest.register_abm({
nodenames = { "homedecor:glowlight_thick_"..color },
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
2015-03-05 23:10:27 +01:00
minetest.set_node(pos, {name = "homedecor:glowlight_half_"..color, param2 = 20})
end,
})
minetest.register_abm({
nodenames = { "homedecor:glowlight_thin_"..color.."_wall" },
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local fdir = node.param2 or 0
2014-11-23 07:51:14 +01:00
local nfdir = dirs2[fdir+1]
2015-03-05 23:10:27 +01:00
minetest.set_node(pos, {name = "homedecor:glowlight_quarter_"..color, param2 = nfdir})
end,
})
minetest.register_abm({
nodenames = { "homedecor:glowlight_thick_"..color.."_wall" },
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local fdir = node.param2 or 0
2014-11-23 07:51:14 +01:00
local nfdir = dirs2[fdir+1]
2015-03-05 23:10:27 +01:00
minetest.set_node(pos, {name = "homedecor:glowlight_half_"..color, param2 = nfdir})
end,
})
minetest.register_abm({
nodenames = { "homedecor:glowlight_small_cube_"..color.."_ceiling" },
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
2015-03-05 23:10:27 +01:00
minetest.set_node(pos, {name = "homedecor:glowlight_small_cube_"..color, param2 = 20})
end,
})
local glowlight_nodebox = {
half = homedecor.nodebox.slab_y(1/2),
quarter = homedecor.nodebox.slab_y(1/4),
small_cube = {
type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
},
}
2015-02-28 10:14:46 +01:00
homedecor.register("glowlight_half_"..color, {
2017-01-24 21:43:20 +01:00
description = S("Thick Glowlight (@1)", S(color)),
tiles = {
2015-02-28 10:14:46 +01:00
"homedecor_glowlight_"..color.."_top.png",
"homedecor_glowlight_"..color.."_bottom.png",
"homedecor_glowlight_thick_"..color.."_sides.png",
"homedecor_glowlight_thick_"..color.."_sides.png",
"homedecor_glowlight_thick_"..color.."_sides.png",
"homedecor_glowlight_thick_"..color.."_sides.png"
},
selection_box = glowlight_nodebox.half,
node_box = glowlight_nodebox.half,
groups = { snappy = 3 },
light_source = default.LIGHT_MAX,
2015-04-29 14:14:36 +02:00
sounds = default.node_sound_glass_defaults(),
on_place = minetest.rotate_node
})
2015-02-28 10:14:46 +01:00
homedecor.register("glowlight_quarter_"..color, {
2017-01-24 21:43:20 +01:00
description = S("Thin Glowlight (@1)", S(color)),
tiles = {
2015-02-28 10:14:46 +01:00
"homedecor_glowlight_"..color.."_top.png",
"homedecor_glowlight_"..color.."_bottom.png",
"homedecor_glowlight_thin_"..color.."_sides.png",
"homedecor_glowlight_thin_"..color.."_sides.png",
"homedecor_glowlight_thin_"..color.."_sides.png",
"homedecor_glowlight_thin_"..color.."_sides.png"
},
selection_box = glowlight_nodebox.quarter,
node_box = glowlight_nodebox.quarter,
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-1,
2015-04-29 14:14:36 +02:00
sounds = default.node_sound_glass_defaults(),
on_place = minetest.rotate_node
})
-- Glowlight "cubes"
2015-02-28 10:14:46 +01:00
homedecor.register("glowlight_small_cube_"..color, {
2017-01-24 21:43:20 +01:00
description = S("Small Glowlight Cube (@1)", S(color)),
tiles = {
2015-02-28 10:14:46 +01:00
"homedecor_glowlight_cube_"..color.."_tb.png",
"homedecor_glowlight_cube_"..color.."_tb.png",
"homedecor_glowlight_cube_"..color.."_sides.png",
"homedecor_glowlight_cube_"..color.."_sides.png",
"homedecor_glowlight_cube_"..color.."_sides.png",
"homedecor_glowlight_cube_"..color.."_sides.png"
},
selection_box = glowlight_nodebox.small_cube,
node_box = glowlight_nodebox.small_cube,
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-1,
2015-04-29 14:14:36 +02:00
sounds = default.node_sound_glass_defaults(),
on_place = minetest.rotate_node
})
2015-02-28 10:14:46 +01:00
end
homedecor.register("plasma_lamp", {
2017-01-24 21:43:20 +01:00
description = S("Plasma Lamp"),
2014-06-29 18:49:35 +02:00
drawtype = "glasslike_framed",
2015-05-04 05:52:48 +02:00
tiles = {"default_gold_block.png","homedecor_glass_face_clean.png"},
2014-06-29 18:49:35 +02:00
special_tiles = {
{
name="homedecor_plasma_storm.png",
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0},
}
},
use_texture_alpha = true,
light_source = default.LIGHT_MAX - 1,
2014-06-29 18:49:35 +02:00
sunlight_propagates = true,
groups = {cracky=3,oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(),
after_place_node = function(pos, placer, itemstack, pointed_thing)
minetest.swap_node(pos, {name = "homedecor:plasma_lamp", param2 = 255})
end
})
homedecor.register("plasma_ball", {
2017-01-24 21:43:20 +01:00
description = S("Plasma Ball"),
mesh = "homedecor_plasma_ball.obj",
tiles = {
"homedecor_generic_plastic.png",
{
name = "homedecor_plasma_ball_streamers.png",
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0},
},
"homedecor_plasma_ball_glass.png"
},
2015-05-08 05:25:29 +02:00
inventory_image = "homedecor_plasma_ball_inv.png",
selection_box = {
type = "fixed",
fixed = { -0.1875, -0.5, -0.1875, 0.1875, 0, 0.1875 }
},
walkable = false,
use_texture_alpha = true,
light_source = default.LIGHT_MAX - 5,
sunlight_propagates = true,
groups = {cracky=3,oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(),
})
2015-04-14 17:58:05 +02:00
local tc_cbox = {
type = "fixed",
fixed = {
{ -0.1875, -0.5, -0.1875, 0.1875, 0.375, 0.1875 },
}
}
homedecor.register("candle", {
description = S("Thick Candle"),
2015-04-14 17:58:05 +02:00
mesh = "homedecor_candle_thick.obj",
2014-07-27 17:52:42 +02:00
tiles = {
2015-04-14 17:58:05 +02:00
'homedecor_candle_sides.png',
{name="homedecor_candle_flame.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}},
},
2015-04-17 12:38:21 +02:00
inventory_image = "homedecor_candle_inv.png",
2015-04-14 17:58:05 +02:00
selection_box = tc_cbox,
2015-04-29 14:14:36 +02:00
walkable = false,
2014-07-27 17:52:42 +02:00
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-4,
2014-07-27 17:52:42 +02:00
})
2015-04-14 17:58:05 +02:00
local c_cbox = {
type = "fixed",
fixed = {
{ -0.125, -0.5, -0.125, 0.125, 0.05, 0.125 },
2015-04-14 17:58:05 +02:00
}
}
homedecor.register("candle_thin", {
description = S("Thin Candle"),
2015-04-14 17:58:05 +02:00
mesh = "homedecor_candle_thin.obj",
tiles = {
2015-04-14 17:58:05 +02:00
'homedecor_candle_sides.png',
{name="homedecor_candle_flame.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}},
},
2015-04-17 12:38:21 +02:00
inventory_image = "homedecor_candle_thin_inv.png",
2015-04-14 17:58:05 +02:00
selection_box = c_cbox,
2014-10-17 16:09:37 +02:00
walkable = false,
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-4,
})
local cs_cbox = {
type = "fixed",
fixed = {
{ -0.15625, -0.5, -0.15625, 0.15625, 0.3125, 0.15625 },
}
}
homedecor.register("candlestick_wrought_iron", {
description = S("Candlestick (wrought iron)"),
mesh = "homedecor_candlestick.obj",
tiles = {
"homedecor_candle_sides.png",
{name="homedecor_candle_flame.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}},
"homedecor_generic_metal_wrought_iron.png",
},
inventory_image = "homedecor_candlestick_wrought_iron_inv.png",
selection_box = cs_cbox,
walkable = false,
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-4,
})
homedecor.register("candlestick_brass", {
description = S("Candlestick (brass)"),
mesh = "homedecor_candlestick.obj",
tiles = {
"homedecor_candle_sides.png",
{name="homedecor_candle_flame.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}},
"homedecor_generic_metal_brass.png",
},
inventory_image = "homedecor_candlestick_brass_inv.png",
selection_box = cs_cbox,
walkable = false,
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-4,
})
2015-04-14 19:42:22 +02:00
homedecor.register("wall_sconce", {
description = S("Wall sconce"),
mesh = "homedecor_wall_sconce.obj",
tiles = {
'homedecor_candle_sides.png',
{name="homedecor_candle_flame.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}},
'homedecor_wall_sconce_back.png',
'homedecor_generic_metal_wrought_iron.png',
2015-04-14 19:42:22 +02:00
},
inventory_image = "homedecor_wall_sconce_inv.png",
selection_box = {
type = "fixed",
fixed = { -0.1875, -0.25, 0.3125, 0.1875, 0.25, 0.5 }
},
walkable = false,
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-4,
2015-04-14 19:42:22 +02:00
})
2015-04-17 12:11:05 +02:00
local ol_cbox = {
type = "fixed",
fixed = {
{ -5/16, -8/16, -3/16, 5/16, 4/16, 3/16 },
}
}
homedecor.register("oil_lamp", {
2015-04-28 17:58:47 +02:00
description = S("Oil lamp (hurricane)"),
mesh = "homedecor_oil_lamp.obj",
tiles = {
"homedecor_generic_metal_brass.png",
{ name = "homedecor_generic_metal.png", color = homedecor.color_black },
{ name = "homedecor_generic_metal.png", color = 0xffa00000 },
"homedecor_oil_lamp_wick.png",
{ name = "homedecor_generic_metal.png", color = 0xffa00000 },
"homedecor_oil_lamp_glass.png",
},
use_texture_alpha = true,
inventory_image = "homedecor_oil_lamp_inv.png",
2015-04-17 12:11:05 +02:00
selection_box = ol_cbox,
2015-04-29 14:14:36 +02:00
walkable = false,
2014-07-27 17:52:42 +02:00
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-3,
2015-04-17 12:38:21 +02:00
sounds = default.node_sound_glass_defaults(),
2014-07-27 17:52:42 +02:00
})
2015-04-28 17:58:47 +02:00
homedecor.register("oil_lamp_tabletop", {
description = S("Oil Lamp (tabletop)"),
mesh = "homedecor_oil_lamp_tabletop.obj",
tiles = {"homedecor_oil_lamp_tabletop.png"},
inventory_image = "homedecor_oil_lamp_tabletop_inv.png",
2015-04-28 18:31:03 +02:00
selection_box = ol_cbox,
collision_box = ol_cbox,
2015-04-28 17:58:47 +02:00
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-3,
2015-04-28 17:58:47 +02:00
sounds = default.node_sound_glass_defaults(),
})
2015-02-28 10:14:46 +01:00
local gl_cbox = {
2015-02-23 13:56:27 +01:00
type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0.45, 0.25 },
}
2015-02-28 10:14:46 +01:00
minetest.register_alias("homedecor:wall_lantern", "homedecor:ground_lantern")
homedecor.register("ground_lantern", {
description = S("Ground Lantern"),
mesh = "homedecor_ground_lantern.obj",
2015-05-02 15:59:05 +02:00
tiles = { "homedecor_light.png", "homedecor_generic_metal_wrought_iron.png" },
use_texture_alpha = true,
2015-02-28 10:14:46 +01:00
inventory_image = "homedecor_ground_lantern_inv.png",
wield_image = "homedecor_ground_lantern_inv.png",
2015-02-23 13:56:27 +01:00
groups = {snappy=3},
light_source = 11,
2015-02-28 10:14:46 +01:00
selection_box = gl_cbox,
2015-04-29 14:14:36 +02:00
walkable = false
2015-02-28 10:14:46 +01:00
})
local hl_cbox = {
type = "fixed",
2015-05-02 19:48:15 +02:00
fixed = { -0.25, -0.5, -0.2, 0.25, 0.5, 0.5 },
2015-02-28 10:14:46 +01:00
}
homedecor.register("hanging_lantern", {
description = S("Hanging Lantern"),
mesh = "homedecor_hanging_lantern.obj",
2015-05-02 19:48:15 +02:00
tiles = { "homedecor_generic_metal_wrought_iron.png", "homedecor_light.png" },
2015-05-02 15:59:05 +02:00
use_texture_alpha = true,
2015-02-28 10:14:46 +01:00
inventory_image = "homedecor_hanging_lantern_inv.png",
wield_image = "homedecor_hanging_lantern_inv.png",
groups = {snappy=3},
light_source = 11,
selection_box = hl_cbox,
2015-04-29 14:14:36 +02:00
walkable = false
2014-10-16 09:22:58 +02:00
})
2015-03-29 13:34:56 +02:00
local cl_cbox = {
type = "fixed",
fixed = { -0.35, -0.45, -0.35, 0.35, 0.5, 0.35 }
}
homedecor.register("ceiling_lantern", {
drawtype = "mesh",
mesh = "homedecor_ceiling_lantern.obj",
2015-05-02 15:59:05 +02:00
tiles = { "homedecor_light.png", "homedecor_generic_metal_wrought_iron.png" },
use_texture_alpha = true,
2015-03-29 13:34:56 +02:00
inventory_image = "homedecor_ceiling_lantern_inv.png",
description = "Ceiling Lantern",
groups = {snappy=3},
2015-03-29 13:34:56 +02:00
light_source = 11,
selection_box = cl_cbox,
2015-04-29 14:14:36 +02:00
walkable = false
2015-03-29 13:34:56 +02:00
})
homedecor.register("lattice_lantern_large", {
2014-07-27 21:15:47 +02:00
description = S("Lattice lantern (large)"),
tiles = { 'homedecor_lattice_lantern_large.png' },
groups = { snappy = 3 },
light_source = default.LIGHT_MAX,
2015-04-29 14:14:36 +02:00
sounds = default.node_sound_glass_defaults(),
2014-07-27 21:15:47 +02:00
})
homedecor.register("lattice_lantern_small", {
2014-07-27 21:15:47 +02:00
description = S("Lattice lantern (small)"),
tiles = {
'homedecor_lattice_lantern_small_tb.png',
'homedecor_lattice_lantern_small_tb.png',
'homedecor_lattice_lantern_small_sides.png'
},
selection_box = {
type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
},
node_box = {
type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
},
2014-07-27 21:15:47 +02:00
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-1,
2015-04-29 14:14:36 +02:00
sounds = default.node_sound_glass_defaults(),
2014-07-27 21:15:47 +02:00
on_place = minetest.rotate_node
})
local repl = { off="low", low="med", med="hi", hi="max", max="off", }
local lamp_colors = {
2017-01-24 21:43:20 +01:00
{ N_("white"), "#ffffffe0:175" },
{ N_("blue"), "#2626c6e0:200" },
{ N_("green"), "#27a927e0:200" },
{ N_("pink"), "#ff8fb7e0:200" },
{ N_("red"), "#ad2323e0:200" },
{ N_("violet"), "#7f29d7e0:200" },
}
local tlamp_cbox = {
type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0.5, 0.25 }
}
local slamp_cbox = {
type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 1.5, 0.25 }
}
local brightness_tab = {
0xffd0d0d0,
0xffd8d8d8,
0xffe0e0e0,
0xffe8e8e8,
0xffffffff,
}
local function reg_lamp(suffix, nxt, tilesuffix, light, color, brightness)
local lampcolor = "_"..color[1]
2017-01-24 21:43:20 +01:00
local colordesc = S(color[1])
local woolcolor = color[1]
local invcolor = color[2]
homedecor.register("table_lamp"..lampcolor.."_"..suffix, {
2017-01-24 21:43:20 +01:00
description = S("Table Lamp (@1)", colordesc),
mesh = "homedecor_table_lamp.obj",
tiles = {
{ name = "wool_"..woolcolor..".png", color = brightness_tab[brightness] },
{ name = "homedecor_table_standing_lamp_lightbulb.png", color = brightness_tab[brightness] },
"homedecor_generic_wood_red.png",
{ name = "homedecor_generic_metal.png", color = homedecor.color_black },
},
inventory_image = "homedecor_table_lamp_foot_inv.png^(homedecor_table_lamp_top_inv.png^[colorize:"..invcolor..")",
walkable = false,
light_source = light,
selection_box = tlamp_cbox,
2015-04-29 14:14:36 +02:00
sounds = default.node_sound_wood_defaults(),
groups = {cracky=2,oddly_breakable_by_hand=1,
not_in_creative_inventory=((light ~= nil) and 1) or nil,
},
drop = "homedecor:table_lamp"..lampcolor.."_off",
on_punch = function(pos, node, puncher)
node.name = "homedecor:table_lamp"..lampcolor.."_"..repl[suffix]
minetest.set_node(pos, node)
end,
})
2014-09-30 16:53:10 +02:00
-- standing lamps
homedecor.register("standing_lamp"..lampcolor.."_"..suffix, {
2017-01-24 21:43:20 +01:00
description = S("Standing Lamp (@1)", colordesc),
mesh = "homedecor_standing_lamp.obj",
tiles = {
{ name = "wool_"..woolcolor..".png", color = brightness_tab[brightness] },
{ name = "homedecor_table_standing_lamp_lightbulb.png", color = brightness_tab[brightness] },
"homedecor_generic_wood_red.png",
{ name ="homedecor_generic_metal.png", color = homedecor.color_black },
},
inventory_image = "homedecor_standing_lamp_foot_inv.png^(homedecor_standing_lamp_top_inv.png^[colorize:"..invcolor..")",
walkable = false,
light_source = light,
groups = {cracky=2,oddly_breakable_by_hand=1,
not_in_creative_inventory=((light ~= nil) and 1) or nil,
},
selection_box = slamp_cbox,
2015-04-29 14:14:36 +02:00
sounds = default.node_sound_wood_defaults(),
on_rotate = screwdriver.rotate_simple,
on_punch = function(pos, node, puncher)
node.name = "homedecor:standing_lamp"..lampcolor.."_"..repl[suffix]
minetest.set_node(pos, node)
end,
expand = { top="placeholder" },
})
minetest.register_alias("homedecor:standing_lamp_bottom"..lampcolor.."_"..suffix, "homedecor:standing_lamp"..lampcolor.."_"..suffix)
minetest.register_alias("homedecor:standing_lamp_top"..lampcolor.."_"..suffix, "air")
-- for old maps that had the original 3dforniture mod
if lampcolor == "" then
minetest.register_alias("3dforniture:table_lamp_"..suffix, "homedecor:table_lamp_"..suffix)
end
end
for n, color in ipairs(lamp_colors) do
reg_lamp("off", "low", "", nil, color, 1 )
reg_lamp("low", "med", "l", 3, color, 2 )
reg_lamp("med", "hi", "m", 7, color, 3 )
reg_lamp("hi", "max", "h", 11, color, 4 )
reg_lamp("max", "off", "x", 14, color, 5 )
end
2015-02-20 22:09:46 +01:00
local dlamp_cbox = {
type = "fixed",
fixed = { -0.2, -0.5, -0.15, 0.32, 0.12, 0.15 },
}
2017-01-24 21:43:20 +01:00
local dlamp_colors = { N_("red"), N_("blue"), N_("green"), N_("violet") }
2015-02-20 22:09:46 +01:00
for _, color in ipairs(dlamp_colors) do
2015-02-20 22:09:46 +01:00
homedecor.register("desk_lamp_"..color, {
2017-01-24 21:43:20 +01:00
description = S("Desk Lamp (@1)", S(color)),
2015-02-20 22:09:46 +01:00
mesh = "homedecor_desk_lamp.obj",
tiles = {
{ name = "homedecor_table_standing_lamp_lightbulb.png", color = brightness_tab[5] },
{ name = "homedecor_generic_metal.png", color = color },
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
{ name = "homedecor_generic_metal.png", color = color }
},
2015-05-07 20:21:27 +02:00
inventory_image = "homedecor_desk_lamp_stem_inv.png^(homedecor_desk_lamp_metal_inv.png^[colorize:"..color..":140)",
2015-02-20 22:09:46 +01:00
selection_box = dlamp_cbox,
2015-04-29 14:14:36 +02:00
walkable = false,
2015-02-20 22:09:46 +01:00
groups = {snappy=3},
})
end
2015-04-22 03:33:06 +02:00
homedecor.register("ceiling_lamp", {
description = S("Ceiling Lamp"),
mesh = "homedecor_ceiling_lamp.obj",
tiles = {
"homedecor_generic_metal_brass.png",
2015-04-22 03:33:06 +02:00
"homedecor_ceiling_lamp_glass.png",
"homedecor_table_standing_lamp_lightbulb.png",
{ name = "homedecor_generic_plastic.png", color = 0xff442d04 },
2015-04-22 03:33:06 +02:00
},
2015-04-22 10:41:15 +02:00
inventory_image = "homedecor_ceiling_lamp_inv.png",
light_source = default.LIGHT_MAX,
2015-04-22 03:33:06 +02:00
groups = {snappy=3},
2015-04-29 14:14:36 +02:00
walkable = false,
2015-04-22 03:33:06 +02:00
on_punch = function(pos, node, puncher)
minetest.set_node(pos, {name = "homedecor:ceiling_lamp_off"})
end,
})
homedecor.register("ceiling_lamp_off", {
description = S("Ceiling Lamp (off)"),
mesh = "homedecor_ceiling_lamp.obj",
tiles = {
"homedecor_generic_metal_brass.png",
2015-04-22 03:33:06 +02:00
"homedecor_ceiling_lamp_glass.png",
{ "homedecor_table_standing_lamp_lightbulb.png", color = 0xffd0d0d0 },
{ name = "homedecor_generic_plastic.png", color = 0xff442d04 },
2015-04-22 03:33:06 +02:00
},
groups = {snappy=3, not_in_creative_inventory=1},
2015-04-29 14:14:36 +02:00
walkable = false,
2015-04-22 03:33:06 +02:00
on_punch = function(pos, node, puncher)
minetest.set_node(pos, {name = "homedecor:ceiling_lamp"})
end,
drop = "homedecor:ceiling_lamp"
})