diff --git a/homedecor/crafts.lua b/homedecor/crafts.lua index 1d416b4a..cc188e74 100644 --- a/homedecor/crafts.lua +++ b/homedecor/crafts.lua @@ -98,6 +98,11 @@ minetest.register_craftitem("homedecor:fan_blades", { inventory_image = "homedecor_fan_blades.png" }) +minetest.register_craftitem("homedecor:copper_strip", { + description = S("Copper Strip"), + inventory_image = "homedecor_copper_strip.png" +}) + -- alternate crafting if mesecons is/isn't installed if not minetest.get_modpath("mesecons") then @@ -140,6 +145,13 @@ minetest.register_alias("homedecor:brass_ingot", "technic:brass_ingot") -- the actual crafts +minetest.register_craft( { + output = "homedecor:copper_strip 6", + recipe = { + { "default:copper_ingot", "default:copper_ingot" } + }, +}) + minetest.register_craft( { output = "homedecor:fan_blades 2", recipe = { @@ -2199,3 +2211,22 @@ for i in ipairs(color_pairings) do }) end +-- misc electrical + +minetest.register_craft( { + output = "homedecor:power_outlet", + recipe = { + {"homedecor:plastic_sheeting", "homedecor:copper_strip"}, + {"homedecor:plastic_sheeting", ""}, + {"homedecor:plastic_sheeting", "homedecor:copper_strip"} + }, +}) + +minetest.register_craft( { + output = "homedecor:light_switch", + recipe = { + {"", "homedecor:plastic_sheeting", "homedecor:copper_strip"}, + {"homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:copper_strip"}, + {"", "homedecor:plastic_sheeting", "homedecor:copper_strip"} + }, +}) diff --git a/homedecor/misc-electrical.lua b/homedecor/misc-electrical.lua index cab733ae..bc67b84b 100644 --- a/homedecor/misc-electrical.lua +++ b/homedecor/misc-electrical.lua @@ -11,13 +11,14 @@ minetest.register_node("homedecor:power_outlet", { "homedecor_outlet_back.png", "homedecor_outlet_front.png" }, + inventory_image = "homedecor_outlet_inv.png", node_box = { type = "fixed", fixed = { {-0.125, -0.5, 0.4375, 0.125, -0.1875, 0.5}, } }, - groups = {cracky=3}, + groups = {cracky=3,dig_immediate=2}, sounds = default.node_sound_stone_defaults() }) @@ -34,6 +35,7 @@ minetest.register_node("homedecor:light_switch", { "homedecor_light_switch_back.png", "homedecor_light_switch_front.png" }, + inventory_image = "homedecor_light_switch_inv.png", node_box = { type = "fixed", fixed = { @@ -42,7 +44,7 @@ minetest.register_node("homedecor:light_switch", { } }, - groups = {cracky=3}, + groups = {cracky=3,dig_immediate=2}, sounds = default.node_sound_stone_defaults() }) diff --git a/homedecor/textures/homedecor_copper_strip.png b/homedecor/textures/homedecor_copper_strip.png new file mode 100644 index 00000000..3fbe1bba Binary files /dev/null and b/homedecor/textures/homedecor_copper_strip.png differ diff --git a/homedecor/textures/homedecor_light_switch_inv.png b/homedecor/textures/homedecor_light_switch_inv.png new file mode 100644 index 00000000..6e66e597 Binary files /dev/null and b/homedecor/textures/homedecor_light_switch_inv.png differ diff --git a/homedecor/textures/homedecor_outlet_inv.png b/homedecor/textures/homedecor_outlet_inv.png new file mode 100644 index 00000000..a365b359 Binary files /dev/null and b/homedecor/textures/homedecor_outlet_inv.png differ