summaryrefslogtreecommitdiff
path: root/api.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2016-10-21 16:23:35 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2016-10-21 16:23:35 +0100
commit4d37da6fe67eb02bf6a6b9ac7c4c20bc9cb20020 (patch)
treee8c09081c8602c88116db7d7af38c8798444894f /api.lua
parentcbefe68049d218111219c42606a36f65c1fc241c (diff)
arrows go through fire
Diffstat (limited to 'api.lua')
-rw-r--r--api.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/api.lua b/api.lua
index 413a460..9cb521d 100644
--- a/api.lua
+++ b/api.lua
@@ -2595,6 +2595,7 @@ 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)
@@ -2643,16 +2644,21 @@ function mobs:explosion(pos, radius, fire, smoke, sound)
and data[vi] ~= c_ignore
and data[vi] ~= c_obsidian
and data[vi] ~= c_brick
- and data[vi] ~= c_chest then
+ and data[vi] ~= c_chest
+ and data[vi] ~= c_fire then
local n = node_ok(p).name
local on_blast = minetest.registered_nodes[n].on_blast
if on_blast then
+
return on_blast(p)
+
elseif minetest.registered_nodes[n].groups.unbreakable == 1 then
+
-- do nothing
else
+
-- after effects
if fire > 0
and (minetest.registered_nodes[n].groups.flammable