From 842a571b60f3a0d6685a12326779584d438729e1 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Mon, 1 Oct 2012 21:06:10 -0400 Subject: [PATCH] Added ceiling-mounted glow cube. The regular and ceiling ones can be exchanged by placing either into the crafting glid. Works for both colors. --- crafts.lua | 32 ++++++++++ lighting.lua | 56 ++++++++++++++++++ ...cor_glowlight_cube_white_sides_ceiling.png | Bin 0 -> 240 bytes ...or_glowlight_cube_yellow_sides_ceiling.png | Bin 0 -> 251 bytes 4 files changed, 88 insertions(+) create mode 100644 textures/homedecor_glowlight_cube_white_sides_ceiling.png create mode 100644 textures/homedecor_glowlight_cube_yellow_sides_ceiling.png diff --git a/crafts.lua b/crafts.lua index 734b2b23..dbf11a43 100644 --- a/crafts.lua +++ b/crafts.lua @@ -1109,6 +1109,22 @@ minetest.register_craft({ } }) +minetest.register_craft({ + type = "shapeless", + output = "homedecor:glowlight_small_cube_yellow_ceiling", + recipe = { + "homedecor:glowlight_small_cube_yellow", + } +}) + +minetest.register_craft({ + type = "shapeless", + output = "homedecor:glowlight_small_cube_yellow", + recipe = { + "homedecor:glowlight_small_cube_yellow_ceiling", + } +}) + -- white minetest.register_craft({ @@ -1144,6 +1160,22 @@ minetest.register_craft({ } }) +minetest.register_craft({ + type = "shapeless", + output = "homedecor:glowlight_small_cube_white_ceiling", + recipe = { + "homedecor:glowlight_small_cube_white", + } +}) + +minetest.register_craft({ + type = "shapeless", + output = "homedecor:glowlight_small_cube_white", + recipe = { + "homedecor:glowlight_small_cube_white_ceiling", + } +}) + -- Fences and gates minetest.register_craft( { diff --git a/lighting.lua b/lighting.lua index 2c26c50d..fa8997f9 100644 --- a/lighting.lua +++ b/lighting.lua @@ -87,6 +87,34 @@ minetest.register_node('homedecor:glowlight_small_cube_yellow', { sounds = default.node_sound_leaves_defaults(), }) +minetest.register_node('homedecor:glowlight_small_cube_yellow_ceiling', { + description = "Yellow Glowlight (small cube, on ceiling)", + drawtype = "nodebox", + tiles = { + 'homedecor_glowlight_cube_yellow_tb.png', + 'homedecor_glowlight_cube_yellow_tb.png', + 'homedecor_glowlight_cube_yellow_sides_ceiling.png', + 'homedecor_glowlight_cube_yellow_sides_ceiling.png', + 'homedecor_glowlight_cube_yellow_sides_ceiling.png', + 'homedecor_glowlight_cube_yellow_sides_ceiling.png' + }, + selection_box = { + type = "fixed", + fixed = { -0.25, 0, -0.25, 0.25, 0.5, 0.25 } + }, + node_box = { + type = "fixed", + fixed = { -0.25, 0, -0.25, 0.25, 0.5, 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', { @@ -172,3 +200,31 @@ minetest.register_node('homedecor:glowlight_small_cube_white', { light_source = LIGHT_MAX-1, sounds = default.node_sound_leaves_defaults(), }) + +minetest.register_node('homedecor:glowlight_small_cube_white_ceiling', { + description = "White Glowlight (small cube, on ceiling)", + drawtype = "nodebox", + tiles = { + 'homedecor_glowlight_cube_white_tb.png', + 'homedecor_glowlight_cube_white_tb.png', + 'homedecor_glowlight_cube_white_sides_ceiling.png', + 'homedecor_glowlight_cube_white_sides_ceiling.png', + 'homedecor_glowlight_cube_white_sides_ceiling.png', + 'homedecor_glowlight_cube_white_sides_ceiling.png' + }, + selection_box = { + type = "fixed", + fixed = { -0.25, 0, -0.25, 0.25, 0.5, 0.25 } + }, + node_box = { + type = "fixed", + fixed = { -0.25, 0, -0.25, 0.25, 0.5, 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_ceiling.png b/textures/homedecor_glowlight_cube_white_sides_ceiling.png new file mode 100644 index 0000000000000000000000000000000000000000..6b9b6a5bd78e95c890de73465d61acccf526f6e4 GIT binary patch literal 240 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#4i^(6i-djf#N9xleoq(25RLP1CmiHuHsoMQG@Kgq-!xW{&5VD_Wc`VYpUkhk zd8tnXjUM`=^ATY5bqxh-Xj7aM=x1dnZu&ZGV z3=6jQF;!?D{H1tPJGQ?(k2iGc%;Iyalq3ab{>)r*Z&Hf>-SAUq)*3v2Gw=19*d1vl j=CAoq^#5tiuV6^Ln)<2WeBfQ6(-=Hm{an^LB{Ts5MqgD| literal 0 HcmV?d00001 diff --git a/textures/homedecor_glowlight_cube_yellow_sides_ceiling.png b/textures/homedecor_glowlight_cube_yellow_sides_ceiling.png new file mode 100644 index 0000000000000000000000000000000000000000..8d4e64104640065306e3bb2e645f8163f104b2e7 GIT binary patch literal 251 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#4i^(6i_rbHilsoIS)MMAAsXl3UOc_-V1k6(!*-83NeVMAxWu&m-p?-nV8djt zMKeBRXSZBiQ2lF-HfKk@C0n)m$PnVAL)e7&5`bR9jNp&@9P>N9_vU7SqQK;WbsXEa?6|1-_yGUz wt_05q9+P{F4PP$`)c*gl{MEmc=0CXkeK`y!FF1MF5$H+=Pgg&ebxsLQ0MC43asU7T literal 0 HcmV?d00001