summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-07-08 16:16:03 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2017-07-08 16:16:03 +0100
commit7dc2d22ef6fa40e9f9d9172f242962efd36fb484 (patch)
tree8231e92e9b9f8aa5ccb133189f0cc0d38904336e
parent1f800ff58330c4dde9c1e5b43cfed2f9c5fbe0a9 (diff)
remove hardcoded unbreakable nodes from explosions
-rw-r--r--api.lua10
1 files changed, 1 insertions, 9 deletions
diff --git a/api.lua b/api.lua
index 9d4307a..6254355 100644
--- a/api.lua
+++ b/api.lua
@@ -2866,10 +2866,6 @@ end
-- set content id's
local c_air = minetest.get_content_id("air")
local c_ignore = minetest.get_content_id("ignore")
-local c_obsidian = minetest.get_content_id("default:obsidian")
-local c_brick = minetest.get_content_id("default:obsidianbrick")
-local c_chest = minetest.get_content_id("default:chest_locked")
-local c_fire = minetest.get_content_id("fire:basic_flame")
-- explosion (cannot break protected or unbreakable nodes)
function mobs:explosion(pos, radius, fire, smoke, sound)
@@ -2921,11 +2917,7 @@ function mobs:explosion(pos, radius, fire, smoke, sound)
if (x * x) + (y * y) + (z * z) <= (radius * radius) + pr:next(-radius, radius)
and data[vi] ~= c_air
- and data[vi] ~= c_ignore
- and data[vi] ~= c_obsidian
- and data[vi] ~= c_brick
- and data[vi] ~= c_chest
- and data[vi] ~= c_fire then
+ and data[vi] ~= c_ignore then
local n = node_ok(p).name
local on_blast = minetest.registered_nodes[n].on_blast