From 90e03a3c6ddd7bc15d8853d058992a01fb772636 Mon Sep 17 00:00:00 2001 From: Thomas--S Date: Sun, 1 Nov 2020 17:46:06 +0100 Subject: [PATCH] Coalburner: Quickfix for protection bug The arbitrarily high flames could destroy everything, including protection blocks. Found by the player "UltimateNoob" --- iron_age/coalburner.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/iron_age/coalburner.lua b/iron_age/coalburner.lua index 55d658e..18ea0e2 100644 --- a/iron_age/coalburner.lua +++ b/iron_age/coalburner.lua @@ -97,6 +97,7 @@ end local function flame(pos, height, heat, first_time) local idx + local playername = minetest.get_meta(pos):get_string("playername") pos = {x=pos.x, y=pos.y+height, z=pos.z} for idx=heat,1,-1 do pos = {x=pos.x, y=pos.y+1, z=pos.z} @@ -113,6 +114,9 @@ local function flame(pos, height, heat, first_time) end return end + if minetest.is_protected(pos, playername) then + return + end minetest.add_node(pos, {name = "techage:flame"..math.min(idx,7)}) local meta = minetest.get_meta(pos) meta:set_int("heat", idx)