From 7491fd4aa8188074c7642f0c0d6736ada344021e Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Sat, 25 May 2019 19:35:14 -0400 Subject: [PATCH] Allow most light sources to be toggled on/off with right-click. Rework glowlight slab and cube textures, simplify, use overlays and compositing, so that the bulk of the light can switch between a dark, matte surface, and a bright surface with central glare gradient, and so that the surface and eging respond to param2 color. Tweak all other relevant nodes so that their light source changes to a darkened (or even translucent texture) when off. On/off switching doesn't affect things like oil lamps, candles, chandeliers, etc. Just basically the stuff that would be electric-powered in real life. If in a protected area, only that area's owner can turn the light on/off. --- homedecor_lighting/init.lua | 1066 ++++++++++------- .../textures/homedecor_glowlight_base.png | Bin 0 -> 83 bytes .../textures/homedecor_glowlight_bottom.png | Bin 95 -> 0 bytes .../homedecor_glowlight_cube_sides.png | Bin 93 -> 0 bytes .../homedecor_glowlight_cube_sides_edges.png | Bin 0 -> 106 bytes ... homedecor_glowlight_cube_sides_glare.png} | Bin .../textures/homedecor_glowlight_cube_tb.png | Bin 94 -> 0 bytes .../homedecor_glowlight_cube_tb_edges.png | Bin 0 -> 104 bytes ...=> homedecor_glowlight_cube_top_glare.png} | Bin .../textures/homedecor_glowlight_tb_edges.png | Bin 0 -> 96 bytes .../homedecor_glowlight_thick_sides.png | Bin 95 -> 0 bytes .../homedecor_glowlight_thick_sides_edges.png | Bin 0 -> 100 bytes ...homedecor_glowlight_thick_sides_glare.png} | Bin ...omedecor_glowlight_thick_sides_overlay.png | Bin 307 -> 0 bytes .../homedecor_glowlight_thin_sides.png | Bin 96 -> 0 bytes .../homedecor_glowlight_thin_sides_edges.png | Bin 0 -> 97 bytes .../homedecor_glowlight_thin_sides_glare.png | Bin 0 -> 313 bytes ...homedecor_glowlight_thin_sides_overlay.png | Bin 187 -> 0 bytes .../textures/homedecor_glowlight_top.png | Bin 93 -> 0 bytes .../homedecor_glowlight_top_glare.png | Bin 0 -> 423 bytes .../homedecor_lattice_lantern_large.png | Bin 360 -> 0 bytes .../homedecor_lattice_lantern_large_light.png | Bin 0 -> 661 bytes ...omedecor_lattice_lantern_large_overlay.png | Bin 0 -> 210 bytes .../homedecor_lattice_lantern_small_sides.png | Bin 377 -> 0 bytes ...ecor_lattice_lantern_small_sides_light.png | Bin 0 -> 493 bytes ...or_lattice_lantern_small_sides_overlay.png | Bin 0 -> 282 bytes .../homedecor_lattice_lantern_small_tb.png | Bin 379 -> 0 bytes ...medecor_lattice_lantern_small_tb_light.png | Bin 0 -> 493 bytes ...decor_lattice_lantern_small_tb_overlay.png | Bin 0 -> 287 bytes .../textures/homedecor_plasma_lamp_off.png | Bin 0 -> 68 bytes ...medecor_table_generic_light_source_off.png | Bin 0 -> 450 bytes ...medecor_table_generic_light_source_on.png} | Bin 32 files changed, 605 insertions(+), 461 deletions(-) create mode 100644 homedecor_lighting/textures/homedecor_glowlight_base.png delete mode 100644 homedecor_lighting/textures/homedecor_glowlight_bottom.png delete mode 100644 homedecor_lighting/textures/homedecor_glowlight_cube_sides.png create mode 100644 homedecor_lighting/textures/homedecor_glowlight_cube_sides_edges.png rename homedecor_lighting/textures/{homedecor_glowlight_cube_sides_overlay.png => homedecor_glowlight_cube_sides_glare.png} (100%) delete mode 100644 homedecor_lighting/textures/homedecor_glowlight_cube_tb.png create mode 100644 homedecor_lighting/textures/homedecor_glowlight_cube_tb_edges.png rename homedecor_lighting/textures/{homedecor_glowlight_cube_tb_overlay.png => homedecor_glowlight_cube_top_glare.png} (100%) create mode 100644 homedecor_lighting/textures/homedecor_glowlight_tb_edges.png delete mode 100644 homedecor_lighting/textures/homedecor_glowlight_thick_sides.png create mode 100644 homedecor_lighting/textures/homedecor_glowlight_thick_sides_edges.png rename homedecor_lighting/textures/{homedecor_glowlight_top_overlay.png => homedecor_glowlight_thick_sides_glare.png} (100%) delete mode 100644 homedecor_lighting/textures/homedecor_glowlight_thick_sides_overlay.png delete mode 100644 homedecor_lighting/textures/homedecor_glowlight_thin_sides.png create mode 100644 homedecor_lighting/textures/homedecor_glowlight_thin_sides_edges.png create mode 100644 homedecor_lighting/textures/homedecor_glowlight_thin_sides_glare.png delete mode 100644 homedecor_lighting/textures/homedecor_glowlight_thin_sides_overlay.png delete mode 100644 homedecor_lighting/textures/homedecor_glowlight_top.png create mode 100644 homedecor_lighting/textures/homedecor_glowlight_top_glare.png delete mode 100644 homedecor_lighting/textures/homedecor_lattice_lantern_large.png create mode 100644 homedecor_lighting/textures/homedecor_lattice_lantern_large_light.png create mode 100644 homedecor_lighting/textures/homedecor_lattice_lantern_large_overlay.png delete mode 100644 homedecor_lighting/textures/homedecor_lattice_lantern_small_sides.png create mode 100644 homedecor_lighting/textures/homedecor_lattice_lantern_small_sides_light.png create mode 100644 homedecor_lighting/textures/homedecor_lattice_lantern_small_sides_overlay.png delete mode 100644 homedecor_lighting/textures/homedecor_lattice_lantern_small_tb.png create mode 100644 homedecor_lighting/textures/homedecor_lattice_lantern_small_tb_light.png create mode 100644 homedecor_lighting/textures/homedecor_lattice_lantern_small_tb_overlay.png create mode 100644 homedecor_lighting/textures/homedecor_plasma_lamp_off.png create mode 100644 homedecor_lighting/textures/homedecor_table_generic_light_source_off.png rename homedecor_lighting/textures/{homedecor_table_standing_lamp_lightbulb.png => homedecor_table_generic_light_source_on.png} (100%) diff --git a/homedecor_lighting/init.lua b/homedecor_lighting/init.lua index 3650ec81..8af4aa85 100644 --- a/homedecor_lighting/init.lua +++ b/homedecor_lighting/init.lua @@ -1,178 +1,543 @@ --- This file supplies glowlights +-- This file supplies the majority of homedecor's lighting local S = homedecor.gettext -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 } - }, +local brightness_tab = { + 0xffd0d0d0, + 0xffd8d8d8, + 0xffe0e0e0, + 0xffe8e8e8, + 0xffffffff, } -minetest.register_node(":homedecor:glowlight_half", { - description = S("Thick Glowlight"), - tiles = { - "homedecor_glowlight_top.png", - "homedecor_glowlight_bottom.png", - "homedecor_glowlight_thick_sides.png", - "homedecor_glowlight_thick_sides.png", - "homedecor_glowlight_thick_sides.png", - "homedecor_glowlight_thick_sides.png" - }, - overlay_tiles = { - { name = "homedecor_glowlight_top_overlay.png", color = "white"}, - "", - { name = "homedecor_glowlight_thick_sides_overlay.png", color = "white"}, - { name = "homedecor_glowlight_thick_sides_overlay.png", color = "white"}, - { name = "homedecor_glowlight_thick_sides_overlay.png", color = "white"}, - { name = "homedecor_glowlight_thick_sides_overlay.png", color = "white"}, - }, - use_texture_alpha = true, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "colorwallmounted", - palette = "unifieddyes_palette_colorwallmounted.png", - selection_box = { - type = "wallmounted", - wall_top = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 }, - wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }, - wall_side = { -0.5, -0.5, -0.5, 0, 0.5, 0.5 } - }, - node_box = glowlight_nodebox.half, - groups = { snappy = 3, ud_param2_colorable = 1 }, - light_source = default.LIGHT_MAX, - sounds = default.node_sound_glass_defaults(), - after_place_node = function(pos, placer, itemstack, pointed_thing) - unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing) - end, -}) +function homedecor.toggle_light(pos, node, clicker, itemstack, pointed_thing) + if minetest.is_protected(pos, clicker:get_player_name()) then + minetest.record_protection_violation(pos, + sender:get_player_name()) + return + end + local sep = string.find(node.name, "_o", -5) + local onoff = string.sub(node.name, sep + 1) + local newname = string.sub(node.name, 1, sep - 1)..((onoff == "off") and "_on" or "_off") + minetest.swap_node(pos, {name = newname, param2 = node.param2}) +end -minetest.register_node(":homedecor:glowlight_quarter", { - description = S("Thin Glowlight"), - tiles = { - "homedecor_glowlight_top.png", - "homedecor_glowlight_bottom.png", - "homedecor_glowlight_thin_sides.png", - "homedecor_glowlight_thin_sides.png", - "homedecor_glowlight_thin_sides.png", - "homedecor_glowlight_thin_sides.png" - }, - overlay_tiles = { - { name = "homedecor_glowlight_top_overlay.png", color = "white"}, - "", - { name = "homedecor_glowlight_thin_sides_overlay.png", color = "white"}, - { name = "homedecor_glowlight_thin_sides_overlay.png", color = "white"}, - { name = "homedecor_glowlight_thin_sides_overlay.png", color = "white"}, - { name = "homedecor_glowlight_thin_sides_overlay.png", color = "white"}, - }, - use_texture_alpha = true, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "colorwallmounted", - palette = "unifieddyes_palette_colorwallmounted.png", - selection_box = { - type = "wallmounted", - wall_top = { -0.5, 0.25, -0.5, 0.5, 0.5, 0.5 }, - wall_bottom = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }, - wall_side = { -0.5, -0.5, -0.5, -0.25, 0.5, 0.5 } - }, - node_box = glowlight_nodebox.quarter, - groups = { snappy = 3, ud_param2_colorable = 1 }, - light_source = default.LIGHT_MAX-1, - sounds = default.node_sound_glass_defaults(), - after_place_node = function(pos, placer, itemstack, pointed_thing) - unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing) - end, -}) +for _, onoff in ipairs({"on", "off"}) do -minetest.register_node(":homedecor:glowlight_small_cube", { - description = S("Small Glowlight Cube"), - tiles = { - "homedecor_glowlight_cube_tb.png", - "homedecor_glowlight_cube_tb.png", - "homedecor_glowlight_cube_sides.png", - "homedecor_glowlight_cube_sides.png", - "homedecor_glowlight_cube_sides.png", - "homedecor_glowlight_cube_sides.png" - }, - overlay_tiles = { - { name = "homedecor_glowlight_cube_tb_overlay.png", color = "white"}, - { name = "homedecor_glowlight_cube_tb_overlay.png", color = "white"}, - { name = "homedecor_glowlight_cube_sides_overlay.png", color = "white"}, - { name = "homedecor_glowlight_cube_sides_overlay.png", color = "white"}, - { name = "homedecor_glowlight_cube_sides_overlay.png", color = "white"}, - { name = "homedecor_glowlight_cube_sides_overlay.png", color = "white"}, - }, - use_texture_alpha = true, - paramtype = "light", - paramtype2 = "colorwallmounted", - drawtype = "nodebox", - palette = "unifieddyes_palette_colorwallmounted.png", - selection_box = { - type = "wallmounted", - wall_top = { -0.25, 0, -0.25, 0.25, 0.5, 0.25 }, - wall_bottom = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }, - wall_side = { -0.5, -0.25, -0.25, 0, 0.25, 0.25 } - }, - node_box = glowlight_nodebox.small_cube, - groups = { snappy = 3, ud_param2_colorable = 1 }, - light_source = default.LIGHT_MAX-1, - sounds = default.node_sound_glass_defaults(), - after_place_node = function(pos, placer, itemstack, pointed_thing) - unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing) - end, -}) + local onflag = (onoff == "on") + local tiles + local overlay + if not onflag then nici = 1 end -homedecor.register("plasma_lamp", { - description = S("Plasma Lamp/Light"), - drawtype = "mesh", - mesh = "plasma_lamp.obj", - tiles = { - "default_gold_block.png", - { + 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 } + }, + } + + local base = "homedecor_glowlight_base.png" + + local tb_edges = "homedecor_glowlight_tb_edges.png" + local sides_edges = "homedecor_glowlight_thick_sides_edges.png" + local sides_glare = "homedecor_glowlight_thick_sides_glare.png" + + if onflag then + tiles = { + "("..base.."^"..tb_edges..")^[brighten", + "("..base.."^"..tb_edges..")^[brighten", + "("..base.."^"..sides_edges..")^[brighten", + "("..base.."^"..sides_edges..")^[brighten", + "("..base.."^"..sides_edges..")^[brighten", + "("..base.."^"..sides_edges..")^[brighten", + } + overlay = { + { name = "homedecor_glowlight_top_glare.png", color = "white"}, + "", + { name = sides_glare, color = "white"}, + { name = sides_glare, color = "white"}, + { name = sides_glare, color = "white"}, + { name = sides_glare, color = "white"}, + } + else + tiles = { + base.."^"..tb_edges, + base.."^"..tb_edges, + base.."^"..sides_edges, + base.."^"..sides_edges, + base.."^"..sides_edges, + base.."^"..sides_edges, + } + overlay = nil + end + + minetest.register_alias("homedecor:glowlight_half", "homedecor:glowlight_half_on") + + minetest.register_node(":homedecor:glowlight_half_"..onoff, { + description = S("Thick Glowlight"), + tiles = tiles, + overlay_tiles = overlay, + use_texture_alpha = true, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "colorwallmounted", + palette = "unifieddyes_palette_colorwallmounted.png", + selection_box = { + type = "wallmounted", + wall_top = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 }, + wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }, + wall_side = { -0.5, -0.5, -0.5, 0, 0.5, 0.5 } + }, + node_box = glowlight_nodebox.half, + groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici }, + light_source = onflag and default.LIGHT_MAX or nil, + sounds = default.node_sound_glass_defaults(), + after_place_node = function(pos, placer, itemstack, pointed_thing) + unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing) + end, + on_rightclick = homedecor.toggle_light + }) + + sides_edges = "homedecor_glowlight_thin_sides_edges.png" + sides_glare = "homedecor_glowlight_thin_sides_glare.png" + + if onflag then + tiles = { + "("..base.."^"..tb_edges..")^[brighten", + "("..base.."^"..tb_edges..")^[brighten", + "("..base.."^"..sides_edges..")^[brighten", + "("..base.."^"..sides_edges..")^[brighten", + "("..base.."^"..sides_edges..")^[brighten", + "("..base.."^"..sides_edges..")^[brighten", + } + overlay = { + { name = "homedecor_glowlight_top_glare.png", color = "white"}, + "", + { name = sides_glare, color = "white"}, + { name = sides_glare, color = "white"}, + { name = sides_glare, color = "white"}, + { name = sides_glare, color = "white"}, + } + else + tiles = { + base.."^"..tb_edges, + base.."^"..tb_edges, + base.."^"..sides_edges, + base.."^"..sides_edges, + base.."^"..sides_edges, + base.."^"..sides_edges, + } + overlay = nil + end + + minetest.register_alias("homedecor:glowlight_quarter", "homedecor:glowlight_quarter_on") + + minetest.register_node(":homedecor:glowlight_quarter_"..onoff, { + description = S("Thin Glowlight"), + tiles = tiles, + overlay_tiles = overlay, + use_texture_alpha = true, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "colorwallmounted", + palette = "unifieddyes_palette_colorwallmounted.png", + selection_box = { + type = "wallmounted", + wall_top = { -0.5, 0.25, -0.5, 0.5, 0.5, 0.5 }, + wall_bottom = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }, + wall_side = { -0.5, -0.5, -0.5, -0.25, 0.5, 0.5 } + }, + node_box = glowlight_nodebox.quarter, + groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici }, + light_source = onflag and (default.LIGHT_MAX - 1) or nil, + sounds = default.node_sound_glass_defaults(), + after_place_node = function(pos, placer, itemstack, pointed_thing) + unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing) + end, + on_rightclick = homedecor.toggle_light + }) + + tb_edges = "homedecor_glowlight_cube_tb_edges.png" + sides_edges = "homedecor_glowlight_cube_sides_edges.png" + sides_glare = "homedecor_glowlight_cube_sides_glare.png" + + if onflag then + tiles = { + "("..base.."^"..tb_edges..")^[brighten", + "("..base.."^"..tb_edges..")^[brighten", + "("..base.."^"..sides_edges..")^[brighten", + "("..base.."^"..sides_edges..")^[brighten", + "("..base.."^"..sides_edges..")^[brighten", + "("..base.."^"..sides_edges..")^[brighten", + } + overlay = { + { name = "homedecor_glowlight_cube_top_glare.png", color = "white"}, + "", + { name = sides_glare, color = "white"}, + { name = sides_glare, color = "white"}, + { name = sides_glare, color = "white"}, + { name = sides_glare, color = "white"}, + } + else + tiles = { + base.."^"..tb_edges, + base.."^"..tb_edges, + base.."^"..sides_edges, + base.."^"..sides_edges, + base.."^"..sides_edges, + base.."^"..sides_edges, + } + overlay = nil + end + + minetest.register_alias("homedecor:glowlight_small_cube", "homedecor:glowlight_small_cube_on") + + minetest.register_node(":homedecor:glowlight_small_cube_"..onoff, { + description = S("Small Glowlight Cube"), + tiles = tiles, + overlay_tiles = overlay, + use_texture_alpha = true, + paramtype = "light", + paramtype2 = "colorwallmounted", + drawtype = "nodebox", + palette = "unifieddyes_palette_colorwallmounted.png", + selection_box = { + type = "wallmounted", + wall_top = { -0.25, 0, -0.25, 0.25, 0.5, 0.25 }, + wall_bottom = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }, + wall_side = { -0.5, -0.25, -0.25, 0, 0.25, 0.25 } + }, + node_box = glowlight_nodebox.small_cube, + groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici }, + light_source = onflag and (default.LIGHT_MAX - 1) or nil, + sounds = default.node_sound_glass_defaults(), + after_place_node = function(pos, placer, itemstack, pointed_thing) + unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing) + end, + on_rightclick = homedecor.toggle_light + }) + + local lighttex + + if onflag then + lighttex = { 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, - sunlight_propagates = true, - groups = {cracky=3,oddly_breakable_by_hand=3}, - sounds = default.node_sound_glass_defaults(), -}) + else + lighttex = "homedecor_plasma_lamp_off.png" + end -homedecor.register("plasma_ball", { - description = S("Plasma Ball"), - mesh = "homedecor_plasma_ball.obj", - tiles = { - { name = "homedecor_generic_plastic.png", color = homedecor.color_black }, - { + minetest.register_alias("homedecor:plasma_lamp", "homedecor:plasma_lamp_on") + + homedecor.register("plasma_lamp_"..onoff, { + description = S("Plasma Lamp/Light"), + drawtype = "mesh", + mesh = "plasma_lamp.obj", + tiles = { + "default_gold_block.png", + lighttex + }, + use_texture_alpha = true, + light_source = onflag and (default.LIGHT_MAX - 1) or nil, + sunlight_propagates = true, + groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici}, + sounds = default.node_sound_glass_defaults(), + on_rightclick = homedecor.toggle_light + }) + + local lighttex = "homedecor_blanktile.png" + if onflag then + lighttex = { name = "homedecor_plasma_ball_streamers.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0}, - }, - "homedecor_plasma_ball_glass.png" - }, - 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(), -}) + } + end -local tc_cbox = { - type = "fixed", - fixed = { - { -0.1875, -0.5, -0.1875, 0.1875, 0.375, 0.1875 }, + minetest.register_alias("homedecor:plasma_ball", "homedecor:plasma_ball_on") + + homedecor.register("plasma_ball_"..onoff, { + description = S("Plasma Ball"), + mesh = "homedecor_plasma_ball.obj", + tiles = { + { name = "homedecor_generic_plastic.png", color = homedecor.color_black }, + lighttex, + "homedecor_plasma_ball_glass.png" + }, + 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 = onflag and (default.LIGHT_MAX - 5) or nil, + sunlight_propagates = true, + groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici}, + sounds = default.node_sound_glass_defaults(), + on_rightclick = homedecor.toggle_light + }) + + local tc_cbox = { + type = "fixed", + fixed = { + { -0.1875, -0.5, -0.1875, 0.1875, 0.375, 0.1875 }, + } } -} + + local gl_cbox = { + type = "fixed", + fixed = { -0.25, -0.5, -0.25, 0.25, 0.45, 0.25 }, + } + + minetest.register_alias("homedecor:wall_lantern", "homedecor:ground_lantern") + + local lighttex + if onflag then + lighttex = "homedecor_light.png" + else + lighttex = "homedecor_table_generic_light_source_off.png" + end + + minetest.register_alias("homedecor:ground_lantern", "homedecor:ground_lantern_on") + + homedecor.register("ground_lantern_"..onoff, { + description = S("Ground Lantern/Light"), + mesh = "homedecor_ground_lantern.obj", + tiles = { lighttex, "homedecor_generic_metal_wrought_iron.png" }, + use_texture_alpha = true, + inventory_image = "homedecor_ground_lantern_inv.png", + wield_image = "homedecor_ground_lantern_inv.png", + groups = {snappy=3, not_in_creative_inventory = nici}, + light_source = onflag and (default.LIGHT_MAX - 3) or nil, + selection_box = gl_cbox, + walkable = false, + on_rightclick = homedecor.toggle_light + }) + + local hl_cbox = { + type = "fixed", + fixed = { -0.25, -0.5, -0.2, 0.25, 0.5, 0.5 }, + } + + minetest.register_alias("homedecor:hanging_lantern", "homedecor:hanging_lantern_on") + + homedecor.register("hanging_lantern_"..onoff, { + description = S("Hanging Lantern/Light"), + mesh = "homedecor_hanging_lantern.obj", + tiles = { "homedecor_generic_metal_wrought_iron.png", lighttex }, + use_texture_alpha = true, + inventory_image = "homedecor_hanging_lantern_inv.png", + wield_image = "homedecor_hanging_lantern_inv.png", + groups = {snappy=3, not_in_creative_inventory = nici}, + light_source = onflag and (default.LIGHT_MAX - 3) or nil, + selection_box = hl_cbox, + walkable = false, + on_rightclick = homedecor.toggle_light + }) + + local cl_cbox = { + type = "fixed", + fixed = { -0.35, -0.45, -0.35, 0.35, 0.5, 0.35 } + } + + minetest.register_alias("homedecor:ceiling_lantern", "homedecor:ceiling_lantern_on") + + homedecor.register("ceiling_lantern_"..onoff, { + drawtype = "mesh", + mesh = "homedecor_ceiling_lantern.obj", + tiles = { lighttex, "homedecor_generic_metal_wrought_iron.png" }, + use_texture_alpha = true, + inventory_image = "homedecor_ceiling_lantern_inv.png", + description = S("Ceiling Lantern/Light"), + groups = {snappy=3, not_in_creative_inventory = nici}, + light_source = onflag and (default.LIGHT_MAX - 3) or nil, + selection_box = cl_cbox, + walkable = false, + on_rightclick = homedecor.toggle_light + }) + + if minetest.get_modpath("darkage") then + minetest.register_alias("homedecor:lattice_lantern_large_on", "darkage:lamp") + minetest.register_alias("homedecor:lattice_lantern_large_off", "darkage:lamp") + sm_light = default.LIGHT_MAX-5 + else + local lighttex + if onflag then + lighttex = "homedecor_lattice_lantern_large_light.png" + else + lighttex = "homedecor_table_generic_light_source_off.png" + end + + minetest.register_alias("homedecor:lattice_lantern_large", "homedecor:lattice_lantern_large_on") + + homedecor.register("lattice_lantern_large_"..onoff, { + description = S("Lattice lantern/Light (large)"), + tiles = { lighttex.."^homedecor_lattice_lantern_large_overlay.png" }, + groups = { snappy = 3, not_in_creative_inventory = nici }, + light_source = onflag and default.LIGHT_MAX or nil, + sounds = default.node_sound_glass_defaults(), + on_rightclick = homedecor.toggle_light + }) + end + + local lighttex_tb + local lighttex_sides + + if onflag then + lighttex_tb = "homedecor_lattice_lantern_small_tb_light.png" + lighttex_sides = "homedecor_lattice_lantern_small_sides_light.png" + else + lighttex_tb = "homedecor_table_generic_light_source_off.png" + lighttex_sides = "homedecor_table_generic_light_source_off.png" + end + + minetest.register_alias("homedecor:lattice_lantern_small", "homedecor:lattice_lantern_small_on") + + homedecor.register("lattice_lantern_small_"..onoff, { + description = S("Lattice lantern/light (small)"), + tiles = { + lighttex_tb.."^homedecor_lattice_lantern_small_tb_overlay.png", + lighttex_tb.."^homedecor_lattice_lantern_small_tb_overlay.png", + lighttex_sides.."^homedecor_lattice_lantern_small_sides_overlay.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 } + }, + groups = { snappy = 3, not_in_creative_inventory = nici }, + light_source = onflag and (default.LIGHT_MAX - 2) or nil, + sounds = default.node_sound_glass_defaults(), + on_place = minetest.rotate_node, + on_rightclick = homedecor.toggle_light + }) + + -- "gooseneck" style desk lamps + + local dlamp_cbox = { + type = "wallmounted", + wall_side = { -0.2, -0.5, -0.15, 0.32, 0.12, 0.15 }, + } + + minetest.register_alias("homedecor:desk_lamp", "homedecor:desk_lamp_on") + + homedecor.register("desk_lamp_"..onoff, { + description = S("Desk Lamp/Light"), + mesh = "homedecor_desk_lamp.obj", + tiles = { + "homedecor_generic_metal.png", + "homedecor_generic_metal.png", + { name = "homedecor_generic_metal.png", color = homedecor.color_med_grey }, + { name = "homedecor_table_generic_light_source_"..onoff..".png", color = brightness_tab[5] }, + }, + inventory_image = "homedecor_desk_lamp_inv.png", + paramtype = "light", + paramtype2 = "colorwallmounted", + palette = "unifieddyes_palette_colorwallmounted.png", + selection_box = dlamp_cbox, + node_box = dlamp_cbox, + walkable = false, + groups = {snappy=3, ud_param2_colorable = 1, not_in_creative_inventory = nici}, + after_place_node = function(pos, placer, itemstack, pointed_thing) + unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing) + end, + on_rotate = unifieddyes.fix_after_screwdriver_nsew, + light_source = onflag and (default.LIGHT_MAX - 2) or nil, + on_rightclick = homedecor.toggle_light + }) + + -- "kitchen"/"dining room" ceiling lamp + + homedecor.register("ceiling_lamp_"..onoff, { + description = S("Ceiling Lamp/Light"), + mesh = "homedecor_ceiling_lamp.obj", + tiles = { + "homedecor_generic_metal_brass.png", + "homedecor_ceiling_lamp_glass.png", + "homedecor_table_generic_light_source_"..onoff..".png", + { name = "homedecor_generic_plastic.png", color = 0xff442d04 }, + }, + inventory_image = "homedecor_ceiling_lamp_inv.png", + light_source = onflag and default.LIGHT_MAX or nil, + groups = {snappy=3, not_in_creative_inventory = nici}, + walkable = false, + on_rightclick = homedecor.toggle_light + }) + + minetest.register_alias("homedecor:rope_light_on_floor", "homedecor:rope_light_on_floor_on") + + minetest.register_node(":homedecor:rope_light_on_floor_"..onoff, { + description = "Rope lighting (on floor)", + inventory_image = "homedecor_rope_light_on_floor.png", + paramtype = "light", + light_source = onflag and (default.LIGHT_MAX - 3) or nil, + walkable = false, + sunlight_propagates = true, + tiles = { "homedecor_table_generic_light_source_"..onoff..".png" }, + drawtype = "nodebox", + node_box = { + type = "connected", + fixed = {}, + connect_front = { -1/16, -8/16, -8/16, 1/16, -6/16, 1/16 }, + connect_left = { -8/16, -8/16, -1/16, 1/16, -6/16, 1/16 }, + connect_back = { -1/16, -8/16, -1/16, 1/16, -6/16, 8/16 }, + connect_right = { -1/16, -8/16, -1/16, 8/16, -6/16, 1/16 }, + disconnected_sides = { + { -6/16, -8/16, -6/16, -4/16, -6/16, 6/16 }, + { 4/16, -8/16, -6/16, 6/16, -6/16, 6/16 }, + { -6/16, -8/16, -6/16, 6/16, -6/16, -4/16 }, + { -6/16, -8/16, 4/16, 6/16, -6/16, 6/16 } + }, + }, + connects_to = { "homedecor:rope_light_on_floor" }, + mesh = "homedecor_chandelier.obj", + groups = {cracky=3, not_in_creative_inventory = nici}, + sounds = default.node_sound_stone_defaults(), + on_rightclick = homedecor.toggle_light + }) + + minetest.register_alias("homedecor:rope_light_on_ceiling", "homedecor:rope_light_on_ceiling_on") + + minetest.register_node(":homedecor:rope_light_on_ceiling_"..onoff, { + description = "Rope lighting (on ceiling)", + inventory_image = "homedecor_rope_light_on_ceiling.png", + paramtype = "light", + light_source = onflag and (default.LIGHT_MAX - 3) or nil, + walkable = false, + sunlight_propagates = true, + tiles = { "homedecor_table_generic_light_source_"..onoff..".png" }, + drawtype = "nodebox", + node_box = { + type = "connected", + fixed = {}, + connect_front = { -1/16, 8/16, -8/16, 1/16, 6/16, 1/16 }, + connect_left = { -8/16, 8/16, -1/16, 1/16, 6/16, 1/16 }, + connect_back = { -1/16, 8/16, -1/16, 1/16, 6/16, 8/16 }, + connect_right = { -1/16, 8/16, -1/16, 8/16, 6/16, 1/16 }, + disconnected_sides = { + { -6/16, 8/16, -6/16, -4/16, 6/16, 6/16 }, + { 4/16, 8/16, -6/16, 6/16, 6/16, 6/16 }, + { -6/16, 8/16, -6/16, 6/16, 6/16, -4/16 }, + { -6/16, 8/16, 4/16, 6/16, 6/16, 6/16 } + }, + }, + connects_to = { "homedecor:rope_light_on_ceiling" }, + mesh = "homedecor_chandelier.obj", + groups = {cracky=3, not_in_creative_inventory = nici}, + sounds = default.node_sound_stone_defaults(), + on_rightclick = homedecor.toggle_light + }) + +end + +-- Light sources and other items that either don't turn on/off +-- or which need special light-control code. homedecor.register("candle", { description = S("Thick Candle"), @@ -304,105 +669,98 @@ homedecor.register("oil_lamp_tabletop", { sounds = default.node_sound_glass_defaults(), }) -local gl_cbox = { +local chains_sbox = { type = "fixed", - fixed = { -0.25, -0.5, -0.25, 0.25, 0.45, 0.25 }, + fixed = { -0.1, -0.5, -0.1, 0.1, 0.5, 0.1 } } -minetest.register_alias("homedecor:wall_lantern", "homedecor:ground_lantern") - -homedecor.register("ground_lantern", { - description = S("Ground Lantern/Light"), - mesh = "homedecor_ground_lantern.obj", - tiles = { "homedecor_light.png", "homedecor_generic_metal_wrought_iron.png" }, - use_texture_alpha = true, - inventory_image = "homedecor_ground_lantern_inv.png", - wield_image = "homedecor_ground_lantern_inv.png", - groups = {snappy=3}, - light_source = 11, - selection_box = gl_cbox, - walkable = false -}) - -local hl_cbox = { +local topchains_sbox = { type = "fixed", - fixed = { -0.25, -0.5, -0.2, 0.25, 0.5, 0.5 }, + fixed = { + { -0.25, 0.35, -0.25, 0.25, 0.5, 0.25 }, + { -0.1, -0.5, -0.1, 0.1, 0.4, 0.1 } + } } -homedecor.register("hanging_lantern", { - description = S("Hanging Lantern/Light"), - mesh = "homedecor_hanging_lantern.obj", - tiles = { "homedecor_generic_metal_wrought_iron.png", "homedecor_light.png" }, - use_texture_alpha = true, - inventory_image = "homedecor_hanging_lantern_inv.png", - wield_image = "homedecor_hanging_lantern_inv.png", - groups = {snappy=3}, - light_source = 11, - selection_box = hl_cbox, - walkable = false -}) - -local cl_cbox = { - type = "fixed", - fixed = { -0.35, -0.45, -0.35, 0.35, 0.5, 0.35 } -} - -homedecor.register("ceiling_lantern", { +minetest.register_node(":homedecor:chain_steel_top", { + description = S("Hanging chain (ceiling mount, steel)"), drawtype = "mesh", - mesh = "homedecor_ceiling_lantern.obj", - tiles = { "homedecor_light.png", "homedecor_generic_metal_wrought_iron.png" }, - use_texture_alpha = true, - inventory_image = "homedecor_ceiling_lantern_inv.png", - description = S("Ceiling Lantern/Light"), - groups = {snappy=3}, - light_source = 11, - selection_box = cl_cbox, - walkable = false + mesh = "homedecor_chains_top.obj", + tiles = {"basic_materials_chain_steel.png"}, + walkable = false, + climbable = true, + sunlight_propagates = true, + paramtype = "light", + inventory_image = "basic_materials_chain_steel_inv.png", + groups = {cracky=3}, + selection_box = topchains_sbox, }) -local sm_light = default.LIGHT_MAX-2 +minetest.register_node(":homedecor:chain_brass_top", { + description = S("Hanging chain (ceiling mount, brass)"), + drawtype = "mesh", + mesh = "homedecor_chains_top.obj", + tiles = {"basic_materials_chain_brass.png"}, + walkable = false, + climbable = true, + sunlight_propagates = true, + paramtype = "light", + inventory_image = "basic_materials_chain_brass_inv.png", + groups = {cracky=3}, + selection_box = topchains_sbox, +}) -if minetest.get_modpath("darkage") then - minetest.register_alias("homedecor:lattice_lantern_large", "darkage:lamp") - sm_light = default.LIGHT_MAX-5 -else - homedecor.register("lattice_lantern_large", { - description = S("Lattice lantern/Light (large)"), - tiles = { 'homedecor_lattice_lantern_large.png' }, - groups = { snappy = 3 }, - light_source = default.LIGHT_MAX, - sounds = default.node_sound_glass_defaults(), - }) -end - -homedecor.register("lattice_lantern_small", { - description = S("Lattice lantern (small)"), +minetest.register_node(":homedecor:chandelier_steel", { + description = S("Chandelier (steel)"), + paramtype = "light", + light_source = 12, + walkable = false, + climbable = true, + sunlight_propagates = true, tiles = { - 'homedecor_lattice_lantern_small_tb.png', - 'homedecor_lattice_lantern_small_tb.png', - 'homedecor_lattice_lantern_small_sides.png' + "basic_materials_chain_steel.png", + "homedecor_candle_flat.png", + { + name="homedecor_candle_flame.png", + animation={ + type="vertical_frames", + aspect_w=16, + aspect_h=16, + length=3.0 + } + } }, - 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 } - }, - groups = { snappy = 3 }, - light_source = sm_light, - sounds = default.node_sound_glass_defaults(), - on_place = minetest.rotate_node + drawtype = "mesh", + mesh = "homedecor_chandelier.obj", + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), }) -local brightness_tab = { - 0xffd0d0d0, - 0xffd8d8d8, - 0xffe0e0e0, - 0xffe8e8e8, - 0xffffffff, -} +minetest.register_node(":homedecor:chandelier_brass", { + description = S("Chandelier (brass)"), + paramtype = "light", + light_source = 12, + walkable = false, + climbable = true, + sunlight_propagates = true, + tiles = { + "basic_materials_chain_brass.png", + "homedecor_candle_flat.png", + { + name="homedecor_candle_flame.png", + animation={ + type="vertical_frames", + aspect_w=16, + aspect_h=16, + length=3.0 + } + } + }, + drawtype = "mesh", + mesh = "homedecor_chandelier.obj", + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) -- table lamps and standing lamps @@ -436,13 +794,14 @@ local slamp_cbox = { local function reg_lamp(suffix, nxt, light, brightness) local wool_brighten = (light or 0) * 15 + local onoff = (suffix == "off") and "off" or "on" homedecor.register("table_lamp_"..suffix, { description = S("Table Lamp/Light"), mesh = "homedecor_table_lamp.obj", tiles = { "wool_grey.png^[colorize:#ffffff:"..wool_brighten, - { name = "homedecor_table_standing_lamp_lightbulb.png", color = brightness_tab[brightness] }, + { name = "homedecor_table_generic_light_source_"..onoff..".png", color = brightness_tab[brightness] }, { name = "homedecor_generic_wood_red.png", color = 0xffffffff }, { name = "homedecor_generic_metal.png", color = homedecor.color_black }, }, @@ -475,7 +834,7 @@ local function reg_lamp(suffix, nxt, light, brightness) mesh = "homedecor_standing_lamp.obj", tiles = { "wool_grey.png^[colorize:#ffffff:"..wool_brighten, - { name = "homedecor_table_standing_lamp_lightbulb.png", color = brightness_tab[brightness] }, + { name = "homedecor_table_generic_light_source_"..onoff..".png", color = brightness_tab[brightness] }, { name = "homedecor_generic_wood_red.png", color = 0xffffffff }, { name = "homedecor_generic_metal.png", color = homedecor.color_black }, }, @@ -514,72 +873,6 @@ reg_lamp("med", "hi", 7, 3 ) reg_lamp("hi", "max", 11, 4 ) reg_lamp("max", "off", 14, 5 ) --- "gooseneck" style desk lamps - -local dlamp_cbox = { - type = "wallmounted", - wall_side = { -0.2, -0.5, -0.15, 0.32, 0.12, 0.15 }, -} - -homedecor.register("desk_lamp", { - description = S("Desk Lamp/Light"), - mesh = "homedecor_desk_lamp.obj", - tiles = { - "homedecor_generic_metal.png", - "homedecor_generic_metal.png", - { name = "homedecor_generic_metal.png", color = homedecor.color_med_grey }, - { name = "homedecor_table_standing_lamp_lightbulb.png", color = brightness_tab[5] }, - }, - inventory_image = "homedecor_desk_lamp_inv.png", - paramtype = "light", - paramtype2 = "colorwallmounted", - palette = "unifieddyes_palette_colorwallmounted.png", - selection_box = dlamp_cbox, - node_box = dlamp_cbox, - walkable = false, - groups = {snappy=3, ud_param2_colorable = 1}, - after_place_node = function(pos, placer, itemstack, pointed_thing) - unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing) - end, - on_rotate = unifieddyes.fix_after_screwdriver_nsew -}) - --- "kitchen"/"dining room" ceiling lamp - -homedecor.register("ceiling_lamp", { - description = S("Ceiling Lamp/Light"), - mesh = "homedecor_ceiling_lamp.obj", - tiles = { - "homedecor_generic_metal_brass.png", - "homedecor_ceiling_lamp_glass.png", - "homedecor_table_standing_lamp_lightbulb.png", - { name = "homedecor_generic_plastic.png", color = 0xff442d04 }, - }, - inventory_image = "homedecor_ceiling_lamp_inv.png", - light_source = default.LIGHT_MAX, - groups = {snappy=3}, - walkable = false, - on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) - minetest.set_node(pos, {name = "homedecor:ceiling_lamp_off"}) - end, -}) - -homedecor.register("ceiling_lamp_off", { - description = S("Ceiling Lamp/Light (off)"), - mesh = "homedecor_ceiling_lamp.obj", - tiles = { - "homedecor_generic_metal_brass.png", - "homedecor_ceiling_lamp_glass.png", - { "homedecor_table_standing_lamp_lightbulb.png", color = 0xffd0d0d0 }, - { name = "homedecor_generic_plastic.png", color = 0xff442d04 }, - }, - groups = {snappy=3, not_in_creative_inventory=1}, - walkable = false, - on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) - minetest.set_node(pos, {name = "homedecor:ceiling_lamp"}) - end, - drop = "homedecor:ceiling_lamp" -}) -- conversion LBM for param2 coloring @@ -743,156 +1036,7 @@ minetest.register_lbm({ end }) -local chains_sbox = { - type = "fixed", - fixed = { -0.1, -0.5, -0.1, 0.1, 0.5, 0.1 } -} -local topchains_sbox = { - type = "fixed", - fixed = { - { -0.25, 0.35, -0.25, 0.25, 0.5, 0.25 }, - { -0.1, -0.5, -0.1, 0.1, 0.4, 0.1 } - } -} - -minetest.register_node(":homedecor:chain_steel_top", { - description = S("Hanging chain (ceiling mount, steel)"), - drawtype = "mesh", - mesh = "homedecor_chains_top.obj", - tiles = {"basic_materials_chain_steel.png"}, - walkable = false, - climbable = true, - sunlight_propagates = true, - paramtype = "light", - inventory_image = "basic_materials_chain_steel_inv.png", - groups = {cracky=3}, - selection_box = topchains_sbox, -}) - -minetest.register_node(":homedecor:chain_brass_top", { - description = S("Hanging chain (ceiling mount, brass)"), - drawtype = "mesh", - mesh = "homedecor_chains_top.obj", - tiles = {"basic_materials_chain_brass.png"}, - walkable = false, - climbable = true, - sunlight_propagates = true, - paramtype = "light", - inventory_image = "basic_materials_chain_brass_inv.png", - groups = {cracky=3}, - selection_box = topchains_sbox, -}) - -minetest.register_node(":homedecor:chandelier_steel", { - description = S("Chandelier (steel)"), - paramtype = "light", - light_source = 12, - walkable = false, - climbable = true, - sunlight_propagates = true, - tiles = { - "basic_materials_chain_steel.png", - "homedecor_candle_flat.png", - { - name="homedecor_candle_flame.png", - animation={ - type="vertical_frames", - aspect_w=16, - aspect_h=16, - length=3.0 - } - } - }, - drawtype = "mesh", - mesh = "homedecor_chandelier.obj", - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node(":homedecor:chandelier_brass", { - description = S("Chandelier (brass)"), - paramtype = "light", - light_source = 12, - walkable = false, - climbable = true, - sunlight_propagates = true, - tiles = { - "basic_materials_chain_brass.png", - "homedecor_candle_flat.png", - { - name="homedecor_candle_flame.png", - animation={ - type="vertical_frames", - aspect_w=16, - aspect_h=16, - length=3.0 - } - } - }, - drawtype = "mesh", - mesh = "homedecor_chandelier.obj", - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node(":homedecor:rope_light_on_floor", { - description = "Rope lighting (on floor)", - inventory_image = "homedecor_rope_light_on_floor.png", - paramtype = "light", - light_source = default.LIGHT_MAX-3, - walkable = false, - sunlight_propagates = true, - tiles = { "homedecor_table_standing_lamp_lightbulb.png" }, - drawtype = "nodebox", - node_box = { - type = "connected", - fixed = {}, - connect_front = { -1/16, -8/16, -8/16, 1/16, -6/16, 1/16 }, - connect_left = { -8/16, -8/16, -1/16, 1/16, -6/16, 1/16 }, - connect_back = { -1/16, -8/16, -1/16, 1/16, -6/16, 8/16 }, - connect_right = { -1/16, -8/16, -1/16, 8/16, -6/16, 1/16 }, - disconnected_sides = { - { -6/16, -8/16, -6/16, -4/16, -6/16, 6/16 }, - { 4/16, -8/16, -6/16, 6/16, -6/16, 6/16 }, - { -6/16, -8/16, -6/16, 6/16, -6/16, -4/16 }, - { -6/16, -8/16, 4/16, 6/16, -6/16, 6/16 } - }, - }, - connects_to = { "homedecor:rope_light_on_floor" }, - mesh = "homedecor_chandelier.obj", - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node(":homedecor:rope_light_on_ceiling", { - description = "Rope lighting (on ceiling)", - inventory_image = "homedecor_rope_light_on_ceiling.png", - paramtype = "light", - light_source = default.LIGHT_MAX-3, - walkable = false, - sunlight_propagates = true, - tiles = { "homedecor_table_standing_lamp_lightbulb.png" }, - drawtype = "nodebox", - node_box = { - type = "connected", - fixed = {}, - connect_front = { -1/16, 8/16, -8/16, 1/16, 6/16, 1/16 }, - connect_left = { -8/16, 8/16, -1/16, 1/16, 6/16, 1/16 }, - connect_back = { -1/16, 8/16, -1/16, 1/16, 6/16, 8/16 }, - connect_right = { -1/16, 8/16, -1/16, 8/16, 6/16, 1/16 }, - disconnected_sides = { - { -6/16, 8/16, -6/16, -4/16, 6/16, 6/16 }, - { 4/16, 8/16, -6/16, 6/16, 6/16, 6/16 }, - { -6/16, 8/16, -6/16, 6/16, 6/16, -4/16 }, - { -6/16, 8/16, 4/16, 6/16, 6/16, 6/16 } - }, - }, - connects_to = { "homedecor:rope_light_on_ceiling" }, - mesh = "homedecor_chandelier.obj", - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), -}) -- crafting diff --git a/homedecor_lighting/textures/homedecor_glowlight_base.png b/homedecor_lighting/textures/homedecor_glowlight_base.png new file mode 100644 index 0000000000000000000000000000000000000000..1cee3bc0f7d0ec8c63cb357357fff8cff2593779 GIT binary patch literal 83 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|Ql2i3AsXkC=UA0$F>5w-Ho6$B gN(?!C;UWV==UK-4b6g(s16472y85}Sb4q9e0NIokw*UYD literal 0 HcmV?d00001 diff --git a/homedecor_lighting/textures/homedecor_glowlight_bottom.png b/homedecor_lighting/textures/homedecor_glowlight_bottom.png deleted file mode 100644 index 37a6b4d2cafc70e6f3ba2ff385e9e22c51a8523e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 95 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx*Bp9q_EZ7UA)I41rLnJOI|2cc+L<7q|%DvTe*XM&n|4d3e?Qt>FVdQ&MBb@ E03t>re*gdg literal 0 HcmV?d00001 diff --git a/homedecor_lighting/textures/homedecor_glowlight_cube_sides_overlay.png b/homedecor_lighting/textures/homedecor_glowlight_cube_sides_glare.png similarity index 100% rename from homedecor_lighting/textures/homedecor_glowlight_cube_sides_overlay.png rename to homedecor_lighting/textures/homedecor_glowlight_cube_sides_glare.png diff --git a/homedecor_lighting/textures/homedecor_glowlight_cube_tb.png b/homedecor_lighting/textures/homedecor_glowlight_cube_tb.png deleted file mode 100644 index c415202c832ead9a82b5a72f01b2a3a31404f3b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 94 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!D3?x-;bCrM;TYyi9>%DvTe*XMJ|w$)WHC5S5`Wq7`=cvRn!(f6&t;ucLK6Thog2^q diff --git a/homedecor_lighting/textures/homedecor_glowlight_cube_tb_edges.png b/homedecor_lighting/textures/homedecor_glowlight_cube_tb_edges.png new file mode 100644 index 0000000000000000000000000000000000000000..f7bca653e2636583dad8d82d8d8352bb69db46ad GIT binary patch literal 104 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%``kpS1Ar_~T6C_xBUNE)u%m3^5 zZ(h4rS2<4jqhy0`UuTehkJNz!2b{8edYF6|82s<@zVPxBe*x6W;OXk;vd$@?2>?Yy B9w-0+ literal 0 HcmV?d00001 diff --git a/homedecor_lighting/textures/homedecor_glowlight_cube_tb_overlay.png b/homedecor_lighting/textures/homedecor_glowlight_cube_top_glare.png similarity index 100% rename from homedecor_lighting/textures/homedecor_glowlight_cube_tb_overlay.png rename to homedecor_lighting/textures/homedecor_glowlight_cube_top_glare.png diff --git a/homedecor_lighting/textures/homedecor_glowlight_tb_edges.png b/homedecor_lighting/textures/homedecor_glowlight_tb_edges.png new file mode 100644 index 0000000000000000000000000000000000000000..fcf524fa7a7e3aea116bd3d10fdc29aabdf3dddd GIT binary patch literal 96 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`>Ygr+Ar_~TZEAjesAuzHP-T;` stNCFs%-ouAr6G{njkkfp&1 literal 0 HcmV?d00001 diff --git a/homedecor_lighting/textures/homedecor_glowlight_thick_sides.png b/homedecor_lighting/textures/homedecor_glowlight_thick_sides.png deleted file mode 100644 index bae01085c90a1a9c6198da1fb1e731cfe32d8c23..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 95 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!D3?x-;bCrM;TYyi9>%DvTe*XM$}+MRb}%yp&*Wp>J|*QhP@cil)z4*}Q$iB}9kv=T diff --git a/homedecor_lighting/textures/homedecor_glowlight_thick_sides_edges.png b/homedecor_lighting/textures/homedecor_glowlight_thick_sides_edges.png new file mode 100644 index 0000000000000000000000000000000000000000..a4217506f68935a11e4b88b8186c0c0a0a64f4f6 GIT binary patch literal 100 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`+MX_sAr_~TZEAjesAuzHP-T;` xtNCFs%-ouAg@KLD&1><*B=MeQ&50BF7>;ca7n=X9$P}oJ!PC{xWt~$(69AWf8)5(e literal 0 HcmV?d00001 diff --git a/homedecor_lighting/textures/homedecor_glowlight_top_overlay.png b/homedecor_lighting/textures/homedecor_glowlight_thick_sides_glare.png similarity index 100% rename from homedecor_lighting/textures/homedecor_glowlight_top_overlay.png rename to homedecor_lighting/textures/homedecor_glowlight_thick_sides_glare.png diff --git a/homedecor_lighting/textures/homedecor_glowlight_thick_sides_overlay.png b/homedecor_lighting/textures/homedecor_glowlight_thick_sides_overlay.png deleted file mode 100644 index 0d871d17843b5b83bee7d987f0b7280bb4c3c621..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 307 zcmV-30nGl1P)gNKU^k}SpgR~5Xo9gnVHyQFZ}WZfSmKQnLPpb zzyypyR0JRa8Mp#7a4Mx7V~mFZz|0?<%4vciO~s-_E!BCTD%a)ir>Io6}hz*`4=Yu)LM7I zRt9e5#j=I0DV!BAA%y+l0Buw)Z*F@NlQZ$t7_S0cob!1xh3qglak{{)v4k(&UM|uM zyzAQmC-qwu>4#N5OW>^wlv0k`?N;Xajfwtedi|3zegJ*^UHEadsgnQz002ovPDHLk FV1g%Ye>VUC diff --git a/homedecor_lighting/textures/homedecor_glowlight_thin_sides.png b/homedecor_lighting/textures/homedecor_glowlight_thin_sides.png deleted file mode 100644 index 51832b54c10f671c72c0863ca5c94d3214ad9eca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 96 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!D3?x-;bCrM;TYyi9>%DvTe*XMwlwhAa4chE$j^~{8+^OG7pQ>2)78&qol`;+08uj=djJ3c diff --git a/homedecor_lighting/textures/homedecor_glowlight_thin_sides_edges.png b/homedecor_lighting/textures/homedecor_glowlight_thin_sides_edges.png new file mode 100644 index 0000000000000000000000000000000000000000..6110d677c62cbaf6e8a337f01bc9482f7fc27be8 GIT binary patch literal 97 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`8lEnWAr_~TZEAjesAuzHP-T;` utNCFs%-q^AF-gCtDbQhRi^-SIOboMUNqJt;yHEqv!{F)a=d#Wzp$PzMY8$@* literal 0 HcmV?d00001 diff --git a/homedecor_lighting/textures/homedecor_glowlight_thin_sides_glare.png b/homedecor_lighting/textures/homedecor_glowlight_thin_sides_glare.png new file mode 100644 index 0000000000000000000000000000000000000000..fd92157b04488d1b6d94a4a59414b3d2acfe9d47 GIT binary patch literal 313 zcmV-90mlA`P)m~`i~$$G1Q1{VJ|p1DIhT9y zF|$Tg)r-gj@c0KHeeeaGBH$Hx0ctg^GZC2sbD)TT8E_5cKo$W*1f;J3PEOpwS!V%a zW>3H(x`<8uuSiGW4QPQqP-kY=iAWv;259X4xXL=(!XZ|mL~QbSyGFmd1QAjJuo1XRE=64|4Hp3tsP%HH%nu$Rv8fVQyZz9S^&T zU1Uzn+^X l(hufI$zn6QYG3(~_nv^F+?3Zc%Ym+8@O1TaS?83{1OUs%DvTe*XMkP>TuAIA&E2LR7Y63k3!DdSOl2v7YecQie zyWLis&1N2BybU4z0UaxcUZ=fWY0uw-h0XRFs zEQC(FgYNhHCdNqkTuAQ@ zn~!XJ84(=J>~CGy&E)>!-j+X>!)mokB4VR~buRl@e4>|>Qd8GY&2G2rJ^<5?pQicN R@(BO{002ovPDHLkV1mv`w=@6% literal 0 HcmV?d00001 diff --git a/homedecor_lighting/textures/homedecor_lattice_lantern_large.png b/homedecor_lighting/textures/homedecor_lattice_lantern_large.png deleted file mode 100644 index ac3223005b8f2b5a5d5655d496c89d18b20c5f55..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 360 zcmV-u0hj)XP)7#0U$4=gRGb0lBr6xGx5FSk&H~V@1C*FMay&qV>sR?a0DC*M;s{}QaL2YRb{U+kPSH$ zUBpYsNt!a`b@Y6D(O4_mS|X041~V(0AZB_Wu!)i5_YxJT30000Am>szWD3D`0T;>?85l% z#QE;U`R~Q~@5lM?$ocTf`SHy8^UV75&ieDu`t;HI^wawG)B5(*`u5iQ_t*RP+57t0 z`}*4Z`rP~b-u(OE`~2bi{Nw!m<^25T{QT(r{ptPv>w3+q*Z=?l!%0LzR5;6xlk0M; zFbssv2?P=#n48TlKvEzOpzr^9UD?o1r_<)>?|vi6@-AbH83*fVJ7?GPgMjlO@ICkJ z*hlMNFjdCE+;twJxFSyW(bR;}PiL3pC`ytjB4j6wUH5#*Ntz0grU?+=Bf>KOF{QiS zg+mrH%kxYMApGLFCkF)6dJx8`$cmyw6-6e}IK&ttnCcH*$fB&Sb<@<>sw|{PG+{IB z?_Hp0MO8QL4b?Vvg(e_q3d8$+9+BR(_pa;vuDiEQRc0a%vB#MyJ(bXJZ~ZVl9>dVT z-I}V9X@s}9j228pUN*O`e~jZajpL*5K;#$#f_b{ZwY@{1p7Z>iK-}AFi56It`Sb$S zU>KkCf|{S>u(gPI!01BQfErBmvZ9uGq84h4kh5T$pc<^}`}?}87HUR9KnS3$6|g`D zu_&O%OEKd=fL9}4F8T7AFAueyy889he|{Fe^YgpQ-@cm+^`~Jr%O%Qka2!1M-EtP0 zmfo7m44$njxHgl!Y3<`?d!H^Yq|8wgzK?cOn<_Yt4n|D5q2$D0u{h}HY9fqcWGjhr v;7^^>X_%VO;ndM2-L}5cYyC{Ov!(k3lBHLIp0&m;00000NkvXXu0mjfBKm!4 literal 0 HcmV?d00001 diff --git a/homedecor_lighting/textures/homedecor_lattice_lantern_large_overlay.png b/homedecor_lighting/textures/homedecor_lattice_lantern_large_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..e6bbae5ea84c0b39e610a98cb5db1e93eb0941c3 GIT binary patch literal 210 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnH3?%tPCZz)@&H$efS0D`p|NsAQzI*->ki}RM z{2?U#kO$v%Kfs&-pE#>;;eiuK#4+8J2!B1*L8DT zc{dkwnEp*JFWF~&ELK;UHTlVe1!pZ+JBH0Hqoa|N89z`tASv z?*IDl|NHO%`|$t!@&Ehs|NHa*`}F_(^#A`v3m>|Ni{{{{8>{{$2ko z9RL6T0d!JMQvg8b*k%9#0KQ2?K~y-6?T}lJgD?;TLlLl(eSq!Q0cLoZ`yX<@R$8r{ z8>Bu*r5<%(E^ppcXc}n#PzWtUH};-jd_OX@Wx{|nfkd(oTvsMEog=b%VIdk<5k?b{ zr-~w9(Nu&!AZ)s`A)k*@z%xHLGI`sWZ7EzyUNv*(tV*i9@W`@ravu94RBD=ta^#bj z33g&#kKaHtt549bLAA-(`P}`x!nRuHJrdy=8 z->LQAs`lWk_TjAd;jQ-KulD1w_T#YjAd*r zz4+?B`0Bs->%aKx!1(OI`0T;>?85l%!}#sQ`R&B`?!@`-#rf{W`R~U0@5lM?$ocTe z`SHv7@yz-1%=+@o`tr^C^UeD6&ieDu`t#8G^w9eB(fak%`t{WM_SE|J)%y3<`}fxS z_t*RR+WYz2`}*Ab`rZ5c;rsmI{QTqm{N()n=KTEV{r&1wd4}cy0004WQchCGit2jAdujeFQ`xXU2r!O|g?3U-Z?6?tb4**?v7A2Sb ze$OvSH219kfx;1mOBSAq-=d=ZKKdaFy;P5<%jIU?&FQnhQTx;%=glDz*L3j<00000NkvXXu0mjfhU_fM literal 0 HcmV?d00001 diff --git a/homedecor_lighting/textures/homedecor_lattice_lantern_small_sides_overlay.png b/homedecor_lighting/textures/homedecor_lattice_lantern_small_sides_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..7122b6b98b27d8eaf18a69cb6e016614d83e21ff GIT binary patch literal 282 zcmV+#0pHqoa|N89z`tASv z?*IDl|NHO%`|$t!@&Ehs|NHa*`}F_(^#A`v3m>|Ni{{{{8>{{zLR- zL;wH)0d!JMQvg8b*k%9#0AEQ&K~y-)?T}Fpz#s@iOWFO;yv2-(v$$m6_5+MGPb#pr zC1gfg(qwS97S(4$oAItNVR)uQVL*E22Z3KZ9AgSwrntJVcBlxQ&p1i~%75s5nZh}w g)jOn|!theupSijKtRoZ1ZvX%Q07*qoM6N<$f)mJ@H2?qr literal 0 HcmV?d00001 diff --git a/homedecor_lighting/textures/homedecor_lattice_lantern_small_tb.png b/homedecor_lighting/textures/homedecor_lattice_lantern_small_tb.png deleted file mode 100644 index eb28a0d56e3a67591c4ac1463542f8bccec8542e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 379 zcmV->0fhdEP)!~gHb|MATK^3VVE+W-0K|M}|w`t1Mu z?f?4j|N8I$`|tnz@c;Yq|NHX)`}6<%^#A{ zxxLXN00001bW%=J06^y0W&i*Hy-7qtR5*?8kV|%hFc1Vy5gf_+7$jL3m_Z=!f5&X? zNIpSQ>w4X<`*ix}iKc<(fkJ5MyW#8!#=j5rZJE&HOkiZRH(XaHG@T=|cwr$LR}lsi zk-Lf_-_cZrb3jPCk&v%jDd3s!iA+w3*_Of^qgTxwIjb^ODm=1m931<$2$h*8qU`zL zWrCep*L~kvnJh0>th(une1zH$#7{wIMX3GI;!M0u2-77}d-B>j6KrI(!8j_yFACw0 Z^8<yhz002ovPDHLkV1nA&$z%Wk diff --git a/homedecor_lighting/textures/homedecor_lattice_lantern_small_tb_light.png b/homedecor_lighting/textures/homedecor_lattice_lantern_small_tb_light.png new file mode 100644 index 0000000000000000000000000000000000000000..4d7c3257ace6f57072092141eccf35829661603a GIT binary patch literal 493 zcmV z->LQAs`lWk_TjAd;jQ-KulD1w_T#YjAd*r zz4+?B`0Bs->%aKx!1(OI`0T;>?85l%!}#sQ`R&B`?!@`-#rf{W`R~U0@5lM?$ocTe z`SHv7@yz-1%=+@o`tr^C^UeD6&ieDu`t#8G^w9eB(fak%`t{WM_SE|J)%y3<`}fxS z_t*RR+WYz2`}*Ab`rZ5c;rsmI{QTqm{N()n=KTEV{r&1wd4}cy0004WQchC_g!) zq5?ppL$Qr7*Xt$T3dbY>FnF*&CE4wkC8tebQ2_LYVs}pOMR8BhJK+uh(0Auik{4xJ z1yl7L`L*u8H5GqT@08A_~1!PiCvtZ1PmCw&Af*mzcIU9(%S)RHX^e-B46Q jxova$tZ&x;5Ac}>0$L#vrf=PV00000NkvXXu0mjf$qFiV literal 0 HcmV?d00001 diff --git a/homedecor_lighting/textures/homedecor_lattice_lantern_small_tb_overlay.png b/homedecor_lighting/textures/homedecor_lattice_lantern_small_tb_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..f22874d14e8802e1a77fcf20ed1ee03c97442af8 GIT binary patch literal 287 zcmV+)0pR|LP)!~gHb|MATK^3VVE+W-0K|M}|w`t1Mu z?f?4j|N8I$`|tnz@c;Yq|NHX)`}6<%^#A{ zyzlsU00001bW%=J06^y0W&i*HVM#ZM=LZu z8$n40QSDy)O#=F9V;h7SJ0pXS(1b*#sZci7-5RU7~2?aooGlQd}?~zC# Oi^0>?&t;ucLK6U2Pz);o literal 0 HcmV?d00001 diff --git a/homedecor_lighting/textures/homedecor_table_generic_light_source_off.png b/homedecor_lighting/textures/homedecor_table_generic_light_source_off.png new file mode 100644 index 0000000000000000000000000000000000000000..e18bb2c95e3bb2a7d4c6cbf2d62e3ac4d5bf0a32 GIT binary patch literal 450 zcmV;z0X_bSP)HbgXdZ=R>F7IA zJIc~lD{+zXBg9Du8p})8zyW7Zz*s^S>1ws=`guqWeagG6H<2#EEG9#&bOmDjQw?xJ zhoPXQ^VxMJ^1zo@1nuG;J($8Ee~8@~U6kYK|~9IHsjc69kN z<&u)e@x0oXM$Ofq`|Ia955sB_w9LnO0H--dPnetq<)vI^f~yPlpC&93Q*_OFgfxYD zNtWbaQeD4)Xt@$AVq{lSJCi|%B{G*n*Ceo|eZ)|1Ab6hXE02UkEU=g=v#+v)C;C-5 z2_Xg3MZ)WEghUE2nh!;?E?E)td9KGw14%x3*@KS0e$r(%lj$n)bmFUaW@25HEZecH z#)5JPo|cefb0QdGF&`$09d_^d=EqwIK~s&C<|Xr5Ys2zMzjJG1lKoEQef0=Qh@A4O sT-2~KzINO+vt%bu(*ax{lA3gv|EHac0FAQB=>Px#07*qoM6N<$g0g4Ivj6}9 literal 0 HcmV?d00001 diff --git a/homedecor_lighting/textures/homedecor_table_standing_lamp_lightbulb.png b/homedecor_lighting/textures/homedecor_table_generic_light_source_on.png similarity index 100% rename from homedecor_lighting/textures/homedecor_table_standing_lamp_lightbulb.png rename to homedecor_lighting/textures/homedecor_table_generic_light_source_on.png