diff --git a/crafts.lua b/crafts.lua index 027dff81..e1770de5 100644 --- a/crafts.lua +++ b/crafts.lua @@ -1072,29 +1072,66 @@ minetest.register_craft({ -- Lighting +-- yellow + minetest.register_craft({ - output = "homedecor:glowlight_thick 6", + output = "homedecor:glowlight_thick_yellow 6", recipe = { {"moreblocks:superglowglass", "moreblocks:superglowglass", "moreblocks:superglowglass", }, } }) minetest.register_craft({ - output = "homedecor:glowlight_thin 6", + output = "homedecor:glowlight_thin_yellow 6", recipe = { - {"homedecor:glowlight_thick", "homedecor:glowlight_thick", "homedecor:glowlight_thick", }, + {"homedecor:glowlight_thick_yellow", "homedecor:glowlight_thick_yellow", "homedecor:glowlight_thick_yellow", }, } }) minetest.register_craft({ - output = "homedecor:glowlight_small_cube 8", + output = "homedecor:glowlight_small_cube_yellow 8", recipe = { {"default:stick" }, {"moreblocks:superglowglass" }, } }) --- Fences +-- white + +minetest.register_craft({ + output = "homedecor:glowlight_thick_white 6", + recipe = { + { "wool:white", "wool:white", "wool:white" }, + {"moreblocks:superglowglass", "moreblocks:superglowglass", "moreblocks:superglowglass", }, + } +}) + +minetest.register_craft({ + type = "shapeless", + output = "homedecor:glowlight_thick_white 2", + recipe = { + "wool:white", + "homedecor:glowlight_thick_yellow", + "homedecor:glowlight_thick_yellow", + } +}) + +minetest.register_craft({ + output = "homedecor:glowlight_thin_white 6", + recipe = { + {"homedecor:glowlight_thick_white", "homedecor:glowlight_thick_white", "homedecor:glowlight_thick_white", }, + } +}) + +minetest.register_craft({ + output = "homedecor:glowlight_small_cube_white 8", + recipe = { + {"wool:white" }, + {"moreblocks:superglowglass" }, + } +}) + +-- Fences and gates minetest.register_craft( { output = 'homedecor:fence_brass 6', diff --git a/init.lua b/init.lua index 7a8988f2..a78e9e39 100644 --- a/init.lua +++ b/init.lua @@ -11,6 +11,7 @@ -- License: LGPL -- +dofile(minetest.get_modpath("homedecor").."/lighting.lua") dofile(minetest.get_modpath("homedecor").."/fences.lua") dofile(minetest.get_modpath("homedecor").."/kitchen_cabinet.lua") dofile(minetest.get_modpath("homedecor").."/refrigerator.lua") @@ -779,12 +780,14 @@ minetest.register_node('homedecor:speaker', { minetest.register_node('homedecor:speaker_small', { description = "Small Surround Speaker", drawtype = "nodebox", - tiles = { 'homedecor_speaker_top.png', - 'homedecor_speaker_bottom.png', - 'homedecor_speaker_right.png', - 'homedecor_speaker_left.png', - 'homedecor_speaker_back.png', - 'homedecor_speaker_front.png'}, + tiles = { + 'homedecor_speaker_top.png', + 'homedecor_speaker_bottom.png', + 'homedecor_speaker_right.png', + 'homedecor_speaker_left.png', + 'homedecor_speaker_back.png', + 'homedecor_speaker_front.png' + }, selection_box = { type = "fixed", fixed = { -0.2, -0.5, 0, 0.2, 0, 0.4 } @@ -802,85 +805,6 @@ minetest.register_node('homedecor:speaker_small', { sounds = default.node_sound_leaves_defaults(), }) -minetest.register_node('homedecor:glowlight_thick', { - description = "Glowlight (thick)", - drawtype = "nodebox", - tiles = { 'homedecor_glowlight_tb.png', - 'homedecor_glowlight_tb.png', - 'homedecor_glowlight_thick_sides.png', - 'homedecor_glowlight_thick_sides.png', - 'homedecor_glowlight_thick_sides.png', - 'homedecor_glowlight_thick_sides.png'}, - selection_box = { - type = "fixed", - fixed = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 } - }, - node_box = { - type = "fixed", - fixed = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 } - }, - - sunlight_propagates = false, - paramtype = "light", - walkable = true, - groups = { snappy = 3 }, - light_source = LIGHT_MAX, - sounds = default.node_sound_leaves_defaults(), -}) - -minetest.register_node('homedecor:glowlight_thin', { - description = "Glowlight (thin)", - drawtype = "nodebox", - tiles = { 'homedecor_glowlight_tb.png', - 'homedecor_glowlight_tb.png', - 'homedecor_glowlight_thin_sides.png', - 'homedecor_glowlight_thin_sides.png', - 'homedecor_glowlight_thin_sides.png', - 'homedecor_glowlight_thin_sides.png'}, - selection_box = { - type = "fixed", - fixed = { -0.5, 0.25, -0.5, 0.5, 0.5, 0.5 } - }, - node_box = { - type = "fixed", - fixed = { -0.5, 0.25, -0.5, 0.5, 0.5, 0.5 } - }, - - sunlight_propagates = false, - paramtype = "light", - walkable = true, - groups = { snappy = 3 }, - light_source = LIGHT_MAX-1, - sounds = default.node_sound_leaves_defaults(), -}) - -minetest.register_node('homedecor:glowlight_small_cube', { - description = "Glowlight (small cube)", - drawtype = "nodebox", - 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' - }, - 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 } - }, - - sunlight_propagates = false, - paramtype = "light", - walkable = true, - groups = { snappy = 3 }, - light_source = LIGHT_MAX-1, - sounds = default.node_sound_leaves_defaults(), -}) - -- local curtaincolors = { diff --git a/lighting.lua b/lighting.lua new file mode 100644 index 00000000..2c26c50d --- /dev/null +++ b/lighting.lua @@ -0,0 +1,174 @@ + +-- This file supplies glowlights + +-- Yellow + +minetest.register_node('homedecor:glowlight_thick_yellow', { + description = "Yellow Glowlight (thick)", + drawtype = "nodebox", + tiles = { + 'homedecor_glowlight_yellow_tb.png', + 'homedecor_glowlight_yellow_tb.png', + 'homedecor_glowlight_thick_yellow_sides.png', + 'homedecor_glowlight_thick_yellow_sides.png', + 'homedecor_glowlight_thick_yellow_sides.png', + 'homedecor_glowlight_thick_yellow_sides.png' + }, + selection_box = { + type = "fixed", + fixed = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 } + }, + node_box = { + type = "fixed", + fixed = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 } + }, + + sunlight_propagates = false, + paramtype = "light", + walkable = true, + groups = { snappy = 3 }, + light_source = LIGHT_MAX, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:glowlight_thin_yellow', { + description = "Yellow Glowlight (thin)", + drawtype = "nodebox", + tiles = { + 'homedecor_glowlight_yellow_tb.png', + 'homedecor_glowlight_yellow_tb.png', + 'homedecor_glowlight_thin_yellow_sides.png', + 'homedecor_glowlight_thin_yellow_sides.png', + 'homedecor_glowlight_thin_yellow_sides.png', + 'homedecor_glowlight_thin_yellow_sides.png' + }, + selection_box = { + type = "fixed", + fixed = { -0.5, 0.25, -0.5, 0.5, 0.5, 0.5 } + }, + node_box = { + type = "fixed", + fixed = { -0.5, 0.25, -0.5, 0.5, 0.5, 0.5 } + }, + + sunlight_propagates = false, + paramtype = "light", + walkable = true, + groups = { snappy = 3 }, + light_source = LIGHT_MAX-1, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:glowlight_small_cube_yellow', { + description = "Yellow Glowlight (small cube)", + drawtype = "nodebox", + tiles = { + 'homedecor_glowlight_cube_yellow_tb.png', + 'homedecor_glowlight_cube_yellow_tb.png', + 'homedecor_glowlight_cube_yellow_sides.png', + 'homedecor_glowlight_cube_yellow_sides.png', + 'homedecor_glowlight_cube_yellow_sides.png', + 'homedecor_glowlight_cube_yellow_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 } + }, + + sunlight_propagates = false, + paramtype = "light", + walkable = true, + groups = { snappy = 3 }, + light_source = LIGHT_MAX-1, + sounds = default.node_sound_leaves_defaults(), +}) + +-- White + +minetest.register_node('homedecor:glowlight_thick_white', { + description = "White Glowlight (thick)", + drawtype = "nodebox", + tiles = { + 'homedecor_glowlight_white_tb.png', + 'homedecor_glowlight_white_tb.png', + 'homedecor_glowlight_thick_white_sides.png', + 'homedecor_glowlight_thick_white_sides.png', + 'homedecor_glowlight_thick_white_sides.png', + 'homedecor_glowlight_thick_white_sides.png' + }, + selection_box = { + type = "fixed", + fixed = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 } + }, + node_box = { + type = "fixed", + fixed = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 } + }, + + sunlight_propagates = false, + paramtype = "light", + walkable = true, + groups = { snappy = 3 }, + light_source = LIGHT_MAX, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:glowlight_thin_white', { + description = "White Glowlight (thin)", + drawtype = "nodebox", + tiles = { + 'homedecor_glowlight_white_tb.png', + 'homedecor_glowlight_white_tb.png', + 'homedecor_glowlight_thin_white_sides.png', + 'homedecor_glowlight_thin_white_sides.png', + 'homedecor_glowlight_thin_white_sides.png', + 'homedecor_glowlight_thin_white_sides.png' + }, + selection_box = { + type = "fixed", + fixed = { -0.5, 0.25, -0.5, 0.5, 0.5, 0.5 } + }, + node_box = { + type = "fixed", + fixed = { -0.5, 0.25, -0.5, 0.5, 0.5, 0.5 } + }, + + sunlight_propagates = false, + paramtype = "light", + walkable = true, + groups = { snappy = 3 }, + light_source = LIGHT_MAX-1, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:glowlight_small_cube_white', { + description = "White Glowlight (small cube)", + drawtype = "nodebox", + tiles = { + 'homedecor_glowlight_cube_white_tb.png', + 'homedecor_glowlight_cube_white_tb.png', + 'homedecor_glowlight_cube_white_sides.png', + 'homedecor_glowlight_cube_white_sides.png', + 'homedecor_glowlight_cube_white_sides.png', + 'homedecor_glowlight_cube_white_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 } + }, + + sunlight_propagates = false, + paramtype = "light", + walkable = true, + groups = { snappy = 3 }, + light_source = LIGHT_MAX-1, + sounds = default.node_sound_leaves_defaults(), +}) diff --git a/textures/homedecor_glowlight_cube_white_sides.png b/textures/homedecor_glowlight_cube_white_sides.png new file mode 100644 index 00000000..51bd18db Binary files /dev/null and b/textures/homedecor_glowlight_cube_white_sides.png differ diff --git a/textures/homedecor_glowlight_cube_white_tb.png b/textures/homedecor_glowlight_cube_white_tb.png new file mode 100644 index 00000000..6066f685 Binary files /dev/null and b/textures/homedecor_glowlight_cube_white_tb.png differ diff --git a/textures/homedecor_glowlight_cube_sides.png b/textures/homedecor_glowlight_cube_yellow_sides.png similarity index 100% rename from textures/homedecor_glowlight_cube_sides.png rename to textures/homedecor_glowlight_cube_yellow_sides.png diff --git a/textures/homedecor_glowlight_cube_tb.png b/textures/homedecor_glowlight_cube_yellow_tb.png similarity index 100% rename from textures/homedecor_glowlight_cube_tb.png rename to textures/homedecor_glowlight_cube_yellow_tb.png diff --git a/textures/homedecor_glowlight_thick_white_sides.png b/textures/homedecor_glowlight_thick_white_sides.png new file mode 100644 index 00000000..b3ed7966 Binary files /dev/null and b/textures/homedecor_glowlight_thick_white_sides.png differ diff --git a/textures/homedecor_glowlight_thick_sides.png b/textures/homedecor_glowlight_thick_yellow_sides.png similarity index 100% rename from textures/homedecor_glowlight_thick_sides.png rename to textures/homedecor_glowlight_thick_yellow_sides.png diff --git a/textures/homedecor_glowlight_thin_white_sides.png b/textures/homedecor_glowlight_thin_white_sides.png new file mode 100644 index 00000000..4b41d05f Binary files /dev/null and b/textures/homedecor_glowlight_thin_white_sides.png differ diff --git a/textures/homedecor_glowlight_thin_sides.png b/textures/homedecor_glowlight_thin_yellow_sides.png similarity index 100% rename from textures/homedecor_glowlight_thin_sides.png rename to textures/homedecor_glowlight_thin_yellow_sides.png diff --git a/textures/homedecor_glowlight_white_tb.png b/textures/homedecor_glowlight_white_tb.png new file mode 100644 index 00000000..5da44940 Binary files /dev/null and b/textures/homedecor_glowlight_white_tb.png differ diff --git a/textures/homedecor_glowlight_tb.png b/textures/homedecor_glowlight_yellow_tb.png similarity index 100% rename from textures/homedecor_glowlight_tb.png rename to textures/homedecor_glowlight_yellow_tb.png