diff --git a/homedecor/crafts.lua b/homedecor/crafts.lua index 9494dfab..5e591abb 100644 --- a/homedecor/crafts.lua +++ b/homedecor/crafts.lua @@ -1195,6 +1195,25 @@ minetest.register_craft({ -- Lighting +-- candles + +minetest.register_craft({ + output = "homedecor:candle 4", + recipe = { + {"farming:string" }, + {"homedecor:paraffin" } + } +}) + +minetest.register_craft({ + output = "homedecor:oil_lamp 4", + recipe = { + { "", "vessels:glass_bottle", "" }, + { "", "farming:string", "" }, + { "default:steel_ingot", "homedecor:oil_extract", "default:steel_ingot" } + } +}) + -- yellow minetest.register_craft({ diff --git a/homedecor/lighting.lua b/homedecor/lighting.lua index 06ade1da..54ed039c 100644 --- a/homedecor/lighting.lua +++ b/homedecor/lighting.lua @@ -268,3 +268,54 @@ minetest.register_node("homedecor:plasma_lamp", { end }) +minetest.register_node('homedecor:candle', { + description = S("Candle"), + drawtype = "nodebox", + tiles = { + 'homedecor_candle_top.png', + 'homedecor_candle_bottom.png', + {name="homedecor_candle_sides.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}}, + }, + node_box = { + type = "fixed", + fixed = { + { -0.125, -0.5, -0.125, 0.125, 0, 0.125 }, + { -0.125, 0, 0, 0.125, 0.5, 0 }, + { 0, 0, -0.125, 0, 0.5, 0.125 } + } + }, + selection_box = { + type = "fixed", + fixed = { + { -0.1875, -0.5, -0.1875, 0.1875, 0.5, 0.1875 }, + } + }, + sunlight_propagates = true, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + light_source = LIGHT_MAX-4, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node('homedecor:oil_lamp', { + description = S("Oil lamp"), + drawtype = "plantlike", + tiles = { 'homedecor_oil_lamp.png' }, + inventory_image = 'homedecor_oil_lamp.png', + sunlight_propagates = true, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + selection_box = { + type = "fixed", + fixed = { + { -0.3, -0.5, -0.3, 0.3, 0.5, 0.3 }, + } + }, + groups = { snappy = 3 }, + light_source = LIGHT_MAX-4, + sounds = default.node_sound_wood_defaults(), +}) + diff --git a/homedecor/textures/homedecor_candle_bottom.png b/homedecor/textures/homedecor_candle_bottom.png new file mode 100644 index 00000000..3b11b663 Binary files /dev/null and b/homedecor/textures/homedecor_candle_bottom.png differ diff --git a/homedecor/textures/homedecor_candle_sides.png b/homedecor/textures/homedecor_candle_sides.png new file mode 100644 index 00000000..be3d5561 Binary files /dev/null and b/homedecor/textures/homedecor_candle_sides.png differ diff --git a/homedecor/textures/homedecor_candle_top.png b/homedecor/textures/homedecor_candle_top.png new file mode 100644 index 00000000..3b11b663 Binary files /dev/null and b/homedecor/textures/homedecor_candle_top.png differ diff --git a/homedecor/textures/homedecor_oil_lamp.png b/homedecor/textures/homedecor_oil_lamp.png new file mode 100644 index 00000000..19a187cf Binary files /dev/null and b/homedecor/textures/homedecor_oil_lamp.png differ