Skip to content

Commit f03c992

Browse files
authored
Fix the possibility to put fire in a protected area (#3129)
1 parent 91f6e5f commit f03c992

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

mods/fire/init.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,18 @@ minetest.register_tool("fire:flint_and_steel", {
101101
return
102102
end
103103
if minetest.is_protected(pointed_thing.under, player_name) then
104-
minetest.chat_send_player(player_name, "This area is protected")
104+
minetest.record_protection_violation(pointed_thing.under, player_name)
105105
return
106106
end
107107
if nodedef.on_ignite then
108108
nodedef.on_ignite(pointed_thing.under, user)
109109
elseif minetest.get_item_group(node_under, "flammable") >= 1
110110
and minetest.get_node(pointed_thing.above).name == "air" then
111+
if minetest.is_protected(pointed_thing.above, player_name) then
112+
minetest.record_protection_violation(pointed_thing.above, player_name)
113+
return
114+
end
115+
111116
minetest.set_node(pointed_thing.above, {name = "fire:basic_flame"})
112117
end
113118
end

0 commit comments

Comments
 (0)