diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2016-10-21 16:23:35 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2016-10-21 16:23:35 +0100 |
commit | 4d37da6fe67eb02bf6a6b9ac7c4c20bc9cb20020 (patch) | |
tree | e8c09081c8602c88116db7d7af38c8798444894f /api.lua | |
parent | cbefe68049d218111219c42606a36f65c1fc241c (diff) |
arrows go through fire
Diffstat (limited to 'api.lua')
-rw-r--r-- | api.lua | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 |