From f03c99286439c992191913c60a0c98bcc8109721 Mon Sep 17 00:00:00 2001 From: Andrii Nemchenko <62670490+andriyndev@users.noreply.github.com> Date: Sat, 22 Jun 2024 13:54:57 +0300 Subject: [PATCH] Fix the possibility to put fire in a protected area (#3129) --- mods/fire/init.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mods/fire/init.lua b/mods/fire/init.lua index 3069aa80..538cfa6f 100644 --- a/mods/fire/init.lua +++ b/mods/fire/init.lua @@ -101,13 +101,18 @@ minetest.register_tool("fire:flint_and_steel", { return end if minetest.is_protected(pointed_thing.under, player_name) then - minetest.chat_send_player(player_name, "This area is protected") + minetest.record_protection_violation(pointed_thing.under, player_name) return end if nodedef.on_ignite then nodedef.on_ignite(pointed_thing.under, user) elseif minetest.get_item_group(node_under, "flammable") >= 1 and minetest.get_node(pointed_thing.above).name == "air" then + if minetest.is_protected(pointed_thing.above, player_name) then + minetest.record_protection_violation(pointed_thing.above, player_name) + return + end + minetest.set_node(pointed_thing.above, {name = "fire:basic_flame"}) end end