From bd8c71be7cab8558067895d57366bdbe40fdbe5c Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 27 Feb 2017 01:52:24 +0100 Subject: [PATCH] Apply hardness to some redstone elements --- mods/ITEMS/REDSTONE/mcl_dispensers/init.lua | 7 ++++--- mods/ITEMS/REDSTONE/mcl_droppers/init.lua | 5 +++-- mods/ITEMS/REDSTONE/mcl_observers/init.lua | 3 ++- mods/ITEMS/REDSTONE/mesecons_button/init.lua | 12 ++++++++---- mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua | 6 ++++-- mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua | 3 ++- 6 files changed, 23 insertions(+), 13 deletions(-) diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua index dd4e7072be..545a45d98e 100644 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua @@ -44,7 +44,8 @@ local dispenserdef = { end meta:from_table(meta2:to_table()) end, - mcl_blast_resistance = 17.5, + _mcl_blast_resistance = 17.5, + _mcl_hardness = 3.5, mesecons = {effector = { -- Dispense random item when triggered action_on = function (pos, node) @@ -357,7 +358,7 @@ horizontal_def.tiles = { "default_furnace_side.png", "mcl_dispensers_dispenser_front_horizontal.png" } horizontal_def.paramtype2 = "facedir" -horizontal_def.groups = {cracky=2,container=2} +horizontal_def.groups = {pickaxey=1, container=2} minetest.register_node("mcl_dispensers:dispenser", horizontal_def) @@ -370,7 +371,7 @@ down_def.tiles = { "default_furnace_side.png", "default_furnace_side.png", "default_furnace_side.png", "default_furnace_side.png" } -down_def.groups = {cracky=2,container=2,not_in_creative_inventory=1} +down_def.groups = {pickaxey=1, container=2,not_in_creative_inventory=1} down_def.drop = "mcl_dispensers:dispenser" minetest.register_node("mcl_dispensers:dispenser_down", down_def) diff --git a/mods/ITEMS/REDSTONE/mcl_droppers/init.lua b/mods/ITEMS/REDSTONE/mcl_droppers/init.lua index 239a73d95d..fc01e42256 100644 --- a/mods/ITEMS/REDSTONE/mcl_droppers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_droppers/init.lua @@ -45,6 +45,7 @@ local dropperdef = { meta:from_table(meta2:to_table()) end, _mcl_blast_resistance = 17.5, + _mcl_hardness = 3.5, mesecons = {effector = { -- Drop random item when triggered action_on = function (pos, node) @@ -113,7 +114,7 @@ horizontal_def.tiles = { "default_furnace_side.png", "mcl_droppers_dropper_front_horizontal.png" } horizontal_def.paramtype2 = "facedir" -horizontal_def.groups = {cracky=2,container=2} +horizontal_def.groups = {pickaxey=1, container=2} minetest.register_node("mcl_droppers:dropper", horizontal_def) @@ -126,7 +127,7 @@ down_def.tiles = { "default_furnace_side.png", "default_furnace_side.png", "default_furnace_side.png", "default_furnace_side.png" } -down_def.groups = {cracky=2,container=2,not_in_creative_inventory=1} +down_def.groups = {pickaxey=1, container=2,not_in_creative_inventory=1} down_def.drop = "mcl_droppers:dropper" minetest.register_node("mcl_droppers:dropper_down", down_def) diff --git a/mods/ITEMS/REDSTONE/mcl_observers/init.lua b/mods/ITEMS/REDSTONE/mcl_observers/init.lua index 10f31ffaac..bd04aa3fb5 100644 --- a/mods/ITEMS/REDSTONE/mcl_observers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_observers/init.lua @@ -4,7 +4,7 @@ minetest.register_node("mcl_observers:observer", { sounds = mcl_sounds.node_sound_stone_defaults(), paramtype2 = "facedir", -- TODO: Add to craft guide and creative inventory when it's useful - groups = { cracky=2, not_in_craft_guide=1, not_in_creative_inventory=1 }, + groups = {pickaxey=1, not_in_craft_guide=1, not_in_creative_inventory=1 }, tiles = { "mcl_observers_observer_top.png", "default_furnace_bottom.png", "mcl_observers_observer_side.png", "mcl_observers_observer_side.png", @@ -25,6 +25,7 @@ minetest.register_node("mcl_observers:observer", { meta:from_table(meta2:to_table()) end, _mcl_blast_resistance = 17.5, + _mcl_hardness = 3.5, -- TODO: Mesecons handling mesecons = {effector = { }} diff --git a/mods/ITEMS/REDSTONE/mesecons_button/init.lua b/mods/ITEMS/REDSTONE/mesecons_button/init.lua index 5c148d8d2b..030da8ecbb 100644 --- a/mods/ITEMS/REDSTONE/mesecons_button/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_button/init.lua @@ -36,7 +36,7 @@ minetest.register_node("mesecons_button:button_stone_off", { type = "fixed", fixed = boxes_off -- the button itself }, - groups = {cracky=3, attached_node=1, dig_by_water=1}, + groups = {handy=1,pickaxey=1, attached_node=1, dig_by_water=1}, description = "Stone Button", on_rightclick = function (pos, node) mesecon:swap_node(pos, "mesecons_button:button_stone_on") @@ -50,6 +50,7 @@ minetest.register_node("mesecons_button:button_stone_off", { rules = mesecon.rules.buttonlike_get }}, _mcl_blast_resistance = 2.5, + _mcl_hardness = 0.5, }) minetest.register_node("mesecons_button:button_stone_on", { @@ -68,7 +69,7 @@ minetest.register_node("mesecons_button:button_stone_on", { type = "fixed", fixed = boxes_on -- the button itself }, - groups = {cracky=3, not_in_creative_inventory=1, attached_node=1, dig_by_water=1}, + groups = {handy=1,pickaxey=1, not_in_creative_inventory=1, attached_node=1, dig_by_water=1}, drop = 'mesecons_button:button_stone_off', description = "Stone Button", sounds = mcl_sounds.node_sound_stone_defaults(), @@ -77,6 +78,7 @@ minetest.register_node("mesecons_button:button_stone_on", { rules = mesecon.rules.buttonlike_get }}, _mcl_blast_resistance = 2.5, + _mcl_hardness = 0.5, }) minetest.register_node("mesecons_button:button_wood_off", { @@ -95,7 +97,7 @@ minetest.register_node("mesecons_button:button_wood_off", { type = "fixed", fixed = boxes_off -- the button itself }, - groups = {choppy=3, attached_node=1, dig_by_water=1}, + groups = {handy=1,axey=1, attached_node=1, dig_by_water=1}, description = "Wooden Button", on_rightclick = function (pos, node) mesecon:swap_node(pos, "mesecons_button:button_wood_on") @@ -109,6 +111,7 @@ minetest.register_node("mesecons_button:button_wood_off", { rules = mesecon.rules.buttonlike_get }}, _mcl_blast_resistance = 2.5, + _mcl_hardness = 0.5, }) minetest.register_node("mesecons_button:button_wood_on", { @@ -127,7 +130,7 @@ minetest.register_node("mesecons_button:button_wood_on", { type = "fixed", fixed = boxes_on -- the button itself }, - groups = {choppy=3, not_in_creative_inventory=1, attached_node=1, dig_by_water=1}, + groups = {handy=1,axey=1, not_in_creative_inventory=1, attached_node=1, dig_by_water=1}, drop = 'mesecons_button:button_wood_off', description = "Wooden Button", sounds = mcl_sounds.node_sound_wood_defaults(), @@ -136,6 +139,7 @@ minetest.register_node("mesecons_button:button_wood_on", { rules = mesecon.rules.buttonlike_get }}, _mcl_blast_resistance = 2.5, + _mcl_hardness = 0.5, }) minetest.register_craft({ diff --git a/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua b/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua index 04fac65318..58fda90778 100644 --- a/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua @@ -1,7 +1,7 @@ minetest.register_node("mesecons_lightstone:lightstone_off", { tiles = {"jeija_lightstone_gray_off.png"}, inventory_image = minetest.inventorycube("jeija_lightstone_gray_off.png"), - groups = {cracky=2, mesecon_effector_off = 1, mesecon = 2}, + groups = {handy=1, mesecon_effector_off = 1, mesecon = 2}, is_ground_content = false, description= "Redstone Lamp", sounds = mcl_sounds.node_sound_stone_defaults(), @@ -11,12 +11,13 @@ minetest.register_node("mesecons_lightstone:lightstone_off", { end }}, _mcl_blast_resistance = 1.5, + _mcl_hardness = 0.3, }) minetest.register_node("mesecons_lightstone:lightstone_on", { tiles = {"jeija_lightstone_gray_on.png"}, inventory_image = minetest.inventorycube("jeija_lightstone_gray_off.png"), - groups = {cracky=2,not_in_creative_inventory=1, mesecon = 2}, + groups = {handy=1, not_in_creative_inventory=1, mesecon = 2}, drop = "node mesecons_lightstone:lightstone_off", is_ground_content = false, -- Real light level: 15 (Minetest caps at 14) @@ -28,6 +29,7 @@ minetest.register_node("mesecons_lightstone:lightstone_on", { end }}, _mcl_blast_resistance = 1.5, + _mcl_hardness = 0.3, }) minetest.register_craft({ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua b/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua index d18f13c5db..62ec9361a8 100644 --- a/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua @@ -1,7 +1,7 @@ minetest.register_node("mesecons_noteblock:noteblock", { description = "Note Block", tiles = {"mesecons_noteblock.png"}, - groups = {choppy=2,oddly_breakable_by_hand=2}, + groups = {handy=1,axey=1, oddly_breakable_by_hand=2}, drawtype = "allfaces_optional", visual_scale = 1.3, paramtype="light", @@ -22,6 +22,7 @@ minetest.register_node("mesecons_noteblock:noteblock", { end }}, _mcl_blast_resistance = 4, + _mcl_hardness = 0.8, }) minetest.register_craft({