forked from mtcontrib/mobs_redo
remove hardcoded unbreakable nodes from explosions
This commit is contained in:
parent
1f800ff583
commit
7dc2d22ef6
10
api.lua
10
api.lua
|
@ -2866,10 +2866,6 @@ end
|
||||||
-- set content id's
|
-- set content id's
|
||||||
local c_air = minetest.get_content_id("air")
|
local c_air = minetest.get_content_id("air")
|
||||||
local c_ignore = minetest.get_content_id("ignore")
|
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)
|
-- explosion (cannot break protected or unbreakable nodes)
|
||||||
function mobs:explosion(pos, radius, fire, smoke, sound)
|
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)
|
if (x * x) + (y * y) + (z * z) <= (radius * radius) + pr:next(-radius, radius)
|
||||||
and data[vi] ~= c_air
|
and data[vi] ~= c_air
|
||||||
and data[vi] ~= c_ignore
|
and data[vi] ~= c_ignore then
|
||||||
and data[vi] ~= c_obsidian
|
|
||||||
and data[vi] ~= c_brick
|
|
||||||
and data[vi] ~= c_chest
|
|
||||||
and data[vi] ~= c_fire then
|
|
||||||
|
|
||||||
local n = node_ok(p).name
|
local n = node_ok(p).name
|
||||||
local on_blast = minetest.registered_nodes[n].on_blast
|
local on_blast = minetest.registered_nodes[n].on_blast
|
||||||
|
|
Loading…
Reference in New Issue
Block a user