From 2af57ea853f78d0a68473036bf6a141331afd824 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 22 Feb 2017 16:22:28 +0100 Subject: [PATCH] More blast resistance definitions --- mods/ENTITIES/mobs/spawner.lua | 1 + mods/ITEMS/REDSTONE/mcl_dispensers/init.lua | 1 + mods/ITEMS/REDSTONE/mcl_droppers/init.lua | 1 + mods/ITEMS/REDSTONE/mcl_observers/init.lua | 1 + mods/ITEMS/REDSTONE/mesecons_button/init.lua | 12 ++++-- .../REDSTONE/mesecons_commandblock/init.lua | 4 +- .../REDSTONE/mesecons_lightstone/init.lua | 6 ++- .../REDSTONE/mesecons_noteblock/init.lua | 3 +- mods/ITEMS/REDSTONE/mesecons_pistons/init.lua | 40 ++++++++++++++----- .../REDSTONE/mesecons_pressureplates/init.lua | 4 +- .../REDSTONE/mesecons_solarpanel/init.lua | 6 +++ mods/ITEMS/REDSTONE/mesecons_torch/init.lua | 1 + .../REDSTONE/mesecons_walllever/init.lua | 6 ++- 13 files changed, 64 insertions(+), 22 deletions(-) diff --git a/mods/ENTITIES/mobs/spawner.lua b/mods/ENTITIES/mobs/spawner.lua index 0e7a331388..d327c9e253 100644 --- a/mods/ENTITIES/mobs/spawner.lua +++ b/mods/ENTITIES/mobs/spawner.lua @@ -71,6 +71,7 @@ minetest.register_node("mobs:spawner", { end end, sounds = mcl_sounds.node_sound_metal_defaults(), + _mcl_blast_resistance = 25, }) -- spawner abm diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua index da2cf9c7fa..dd4e7072be 100644 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua @@ -44,6 +44,7 @@ local dispenserdef = { end meta:from_table(meta2:to_table()) end, + mcl_blast_resistance = 17.5, mesecons = {effector = { -- Dispense random item when triggered action_on = function (pos, node) diff --git a/mods/ITEMS/REDSTONE/mcl_droppers/init.lua b/mods/ITEMS/REDSTONE/mcl_droppers/init.lua index dc4ff5c680..239a73d95d 100644 --- a/mods/ITEMS/REDSTONE/mcl_droppers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_droppers/init.lua @@ -44,6 +44,7 @@ local dropperdef = { end meta:from_table(meta2:to_table()) end, + _mcl_blast_resistance = 17.5, mesecons = {effector = { -- Drop random item when triggered action_on = function (pos, node) diff --git a/mods/ITEMS/REDSTONE/mcl_observers/init.lua b/mods/ITEMS/REDSTONE/mcl_observers/init.lua index 34fc3db28d..10f31ffaac 100644 --- a/mods/ITEMS/REDSTONE/mcl_observers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_observers/init.lua @@ -24,6 +24,7 @@ minetest.register_node("mcl_observers:observer", { end meta:from_table(meta2:to_table()) end, + _mcl_blast_resistance = 17.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 68dea8cb52..5c148d8d2b 100644 --- a/mods/ITEMS/REDSTONE/mesecons_button/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_button/init.lua @@ -48,7 +48,8 @@ minetest.register_node("mesecons_button:button_stone_off", { mesecons = {receptor = { state = mesecon.state.off, rules = mesecon.rules.buttonlike_get - }} + }}, + _mcl_blast_resistance = 2.5, }) minetest.register_node("mesecons_button:button_stone_on", { @@ -74,7 +75,8 @@ minetest.register_node("mesecons_button:button_stone_on", { mesecons = {receptor = { state = mesecon.state.on, rules = mesecon.rules.buttonlike_get - }} + }}, + _mcl_blast_resistance = 2.5, }) minetest.register_node("mesecons_button:button_wood_off", { @@ -105,7 +107,8 @@ minetest.register_node("mesecons_button:button_wood_off", { mesecons = {receptor = { state = mesecon.state.off, rules = mesecon.rules.buttonlike_get - }} + }}, + _mcl_blast_resistance = 2.5, }) minetest.register_node("mesecons_button:button_wood_on", { @@ -131,7 +134,8 @@ minetest.register_node("mesecons_button:button_wood_on", { mesecons = {receptor = { state = mesecon.state.on, rules = mesecon.rules.buttonlike_get - }} + }}, + _mcl_blast_resistance = 2.5, }) minetest.register_craft({ diff --git a/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua b/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua index 828061b595..73009c1b8b 100644 --- a/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua @@ -189,6 +189,7 @@ minetest.register_node("mesecons_commandblock:commandblock_off", { mesecons = {effector = { action_on = commandblock_action_on }}, + mcl_blast_resistance = 18000000, }) minetest.register_node("mesecons_commandblock:commandblock_on", { @@ -204,5 +205,6 @@ minetest.register_node("mesecons_commandblock:commandblock_on", { sounds = mcl_sounds.node_sound_stone_defaults(), mesecons = {effector = { action_off = commandblock_action_off - }} + }}, + mcl_blast_resistance = 18000000, }) diff --git a/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua b/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua index e6636d84a9..04fac65318 100644 --- a/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_lightstone/init.lua @@ -9,7 +9,8 @@ minetest.register_node("mesecons_lightstone:lightstone_off", { action_on = function (pos, node) mesecon:swap_node(pos, "mesecons_lightstone:lightstone_on") end - }} + }}, + _mcl_blast_resistance = 1.5, }) minetest.register_node("mesecons_lightstone:lightstone_on", { @@ -25,7 +26,8 @@ minetest.register_node("mesecons_lightstone:lightstone_on", { action_off = function (pos, node) mesecon:swap_node(pos, "mesecons_lightstone:lightstone_off") end - }} + }}, + _mcl_blast_resistance = 1.5, }) minetest.register_craft({ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua b/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua index 1bef265b34..d18f13c5db 100644 --- a/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua @@ -20,7 +20,8 @@ minetest.register_node("mesecons_noteblock:noteblock", { action_on = function (pos, node) mesecon.noteblock_play(pos, node.param2) end - }} + }}, + _mcl_blast_resistance = 4, }) minetest.register_craft({ diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua b/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua index ff4fcb4b46..b1fc91b618 100644 --- a/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua @@ -171,7 +171,8 @@ minetest.register_node("mesecons_pistons:piston_normal_off", { mesecons = {effector={ action_on = piston_on, rules = piston_get_rules - }} + }}, + _mcl_blast_resistance = 2.5, }) -- onstate @@ -200,7 +201,8 @@ minetest.register_node("mesecons_pistons:piston_normal_on", { mesecons = {effector={ action_off = piston_off, rules = piston_get_rules - }} + }}, + _mcl_blast_resistance = 2.5, }) -- pusher @@ -222,6 +224,7 @@ minetest.register_node("mesecons_pistons:piston_pusher_normal", { selection_box = piston_pusher_box, node_box = piston_pusher_box, sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 2.5, }) -- Sticky ones @@ -256,7 +259,8 @@ minetest.register_node("mesecons_pistons:piston_sticky_off", { mesecons = {effector={ action_on = piston_on, rules = piston_get_rules - }} + }}, + _mcl_blast_resistance = 2.5, }) -- onstate @@ -285,7 +289,8 @@ minetest.register_node("mesecons_pistons:piston_sticky_on", { mesecons = {effector={ action_off = piston_off, rules = piston_get_rules - }} + }}, + _mcl_blast_resistance = 2.5, }) -- pusher @@ -307,6 +312,7 @@ minetest.register_node("mesecons_pistons:piston_pusher_sticky", { selection_box = piston_pusher_box, node_box = piston_pusher_box, sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 2.5, }) -- @@ -361,6 +367,7 @@ minetest.register_node("mesecons_pistons:piston_up_normal_off", { rules = piston_up_rules, }}, sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 2.5, }) -- onstate @@ -389,7 +396,8 @@ minetest.register_node("mesecons_pistons:piston_up_normal_on", { mesecons = {effector={ action_off = piston_off, rules = piston_up_rules, - }} + }}, + _mcl_blast_resistance = 2.5, }) -- pusher @@ -411,6 +419,7 @@ minetest.register_node("mesecons_pistons:piston_up_pusher_normal", { selection_box = piston_up_pusher_box, node_box = piston_up_pusher_box, sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 2.5, }) @@ -448,7 +457,8 @@ minetest.register_node("mesecons_pistons:piston_up_sticky_off", { mesecons = {effector={ action_on = piston_on, rules = piston_up_rules, - }} + }}, + _mcl_blast_resistance = 2.5, }) -- onstate @@ -477,7 +487,8 @@ minetest.register_node("mesecons_pistons:piston_up_sticky_on", { mesecons = {effector={ action_off = piston_off, rules = piston_up_rules, - }} + }}, + _mcl_blast_resistance = 2.5, }) -- pusher @@ -499,6 +510,7 @@ minetest.register_node("mesecons_pistons:piston_up_pusher_sticky", { selection_box = piston_up_pusher_box, node_box = piston_up_pusher_box, sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 2.5, }) -- @@ -554,7 +566,8 @@ minetest.register_node("mesecons_pistons:piston_down_normal_off", { mesecons = {effector={ action_on = piston_on, rules = piston_down_rules, - }} + }}, + _mcl_blast_resistance = 2.5, }) -- onstate @@ -583,7 +596,8 @@ minetest.register_node("mesecons_pistons:piston_down_normal_on", { mesecons = {effector={ action_off = piston_off, rules = piston_down_rules, - }} + }}, + _mcl_blast_resistance = 2.5, }) -- pusher @@ -605,6 +619,7 @@ minetest.register_node("mesecons_pistons:piston_down_pusher_normal", { selection_box = piston_down_pusher_box, node_box = piston_down_pusher_box, sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 2.5, }) -- Sticky @@ -638,7 +653,8 @@ minetest.register_node("mesecons_pistons:piston_down_sticky_off", { mesecons = {effector={ action_on = piston_on, rules = piston_down_rules, - }} + }}, + _mcl_blast_resistance = 2.5, }) -- onstate @@ -667,7 +683,8 @@ minetest.register_node("mesecons_pistons:piston_down_sticky_on", { mesecons = {effector={ action_off = piston_off, rules = piston_down_rules, - }} + }}, + _mcl_blast_resistance = 2.5, }) -- pusher @@ -689,6 +706,7 @@ minetest.register_node("mesecons_pistons:piston_down_pusher_sticky", { selection_box = piston_down_pusher_box, node_box = piston_down_pusher_box, sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 2.5, }) diff --git a/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua b/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua index 759e867f18..68d518467a 100644 --- a/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua @@ -74,6 +74,7 @@ function mesecon:register_pressure_plate(offstate, onstate, description, texture on_construct = function(pos) minetest.get_node_timer(pos):start(PRESSURE_PLATE_INTERVAL) end, + _mcl_blast_resistance = 2.5, }) minetest.register_node(onstate, { @@ -99,7 +100,8 @@ function mesecon:register_pressure_plate(offstate, onstate, description, texture if not mesecon:connected_to_receptor(two_below) then mesecon:turnoff(two_below) end - end + end, + _mcl_blast_resistance = 2.5, }) minetest.register_craft({ diff --git a/mods/ITEMS/REDSTONE/mesecons_solarpanel/init.lua b/mods/ITEMS/REDSTONE/mesecons_solarpanel/init.lua index e47929ab02..c8fd136087 100644 --- a/mods/ITEMS/REDSTONE/mesecons_solarpanel/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_solarpanel/init.lua @@ -28,6 +28,7 @@ minetest.register_node("mesecons_solarpanel:solar_panel_on", { minetest.swap_node(pos, {name = "mesecons_solarpanel:solar_panel_inverted_off"}) mesecon:receptor_off(pos) end, + _mcl_blast_resistance = 1, }) -- Solar Panel @@ -57,6 +58,7 @@ minetest.register_node("mesecons_solarpanel:solar_panel_off", { minetest.swap_node(pos, {name = "mesecons_solarpanel:solar_panel_inverted_on"}) mesecon:receptor_on(pos) end, + _mcl_blast_resistance = 1, }) minetest.register_craft({ @@ -80,6 +82,7 @@ minetest.register_abm( mesecon:receptor_on(pos) end end, + _mcl_blast_resistance = 1, }) minetest.register_abm( @@ -94,6 +97,7 @@ minetest.register_abm( mesecon:receptor_off(pos) end end, + _mcl_blast_resistance = 1, }) --- Solar panel inversed @@ -126,6 +130,7 @@ minetest.register_node("mesecons_solarpanel:solar_panel_inverted_on", { minetest.swap_node(pos, {name = "mesecons_solarpanel:solar_panel_off"}) mesecon:receptor_off(pos) end, + _mcl_blast_resistance = 1, }) -- Solar Panel @@ -156,6 +161,7 @@ minetest.register_node("mesecons_solarpanel:solar_panel_inverted_off", { minetest.swap_node(pos, {name = "mesecons_solarpanel:solar_panel_on"}) mesecon:receptor_on(pos) end, + _mcl_blast_resistance = 1, }) minetest.register_abm( diff --git a/mods/ITEMS/REDSTONE/mesecons_torch/init.lua b/mods/ITEMS/REDSTONE/mesecons_torch/init.lua index 4bd12b44f7..9f188a2f65 100644 --- a/mods/ITEMS/REDSTONE/mesecons_torch/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_torch/init.lua @@ -81,6 +81,7 @@ minetest.register_node("mesecons_torch:redstoneblock", { state = mesecon.state.on, rules = torch_get_output_rules }}, + mcl_blast_resistance = 30, }) minetest.register_craft({ diff --git a/mods/ITEMS/REDSTONE/mesecons_walllever/init.lua b/mods/ITEMS/REDSTONE/mesecons_walllever/init.lua index 1eae7eafb2..7366d13a57 100644 --- a/mods/ITEMS/REDSTONE/mesecons_walllever/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_walllever/init.lua @@ -39,7 +39,8 @@ minetest.register_node("mesecons_walllever:wall_lever_off", { mesecons = {receptor = { rules = mesecon.rules.buttonlike_get, state = mesecon.state.off - }} + }}, + _mcl_blast_resistance = 2.5, }) minetest.register_node("mesecons_walllever:wall_lever_on", { drawtype = "nodebox", @@ -79,7 +80,8 @@ minetest.register_node("mesecons_walllever:wall_lever_on", { mesecons = {receptor = { rules = mesecon.rules.buttonlike_get, state = mesecon.state.on - }} + }}, + _mcl_blast_resistance = 2.5, }) minetest.register_craft({