protected nodes are not flammables

This commit is contained in:
Freedom 2022-04-07 21:12:31 +02:00
parent b96fb2af17
commit 265271a5f7
Signed by: pepebotella
GPG Key ID: ECA3C6D8DCAD5255
1 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,8 @@ local function has_flammable(pos)
for k,v in pairs(adjacents) do
local p=vector.add(pos,v)
local n=minetest.get_node_or_nil(p)
if n and minetest.get_item_group(n.name, "flammable") ~= 0 then
if n and not minetest.is_protected(pos, "")
and minetest.get_item_group(n.name, "flammable") ~= 0 then
return p
end
end