mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-22 14:12:26 +01:00
Fix the possibility to put fire in a protected area (#3129)
This commit is contained in:
parent
91f6e5faec
commit
f03c992864
@ -101,13 +101,18 @@ minetest.register_tool("fire:flint_and_steel", {
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
if minetest.is_protected(pointed_thing.under, player_name) then
|
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
|
return
|
||||||
end
|
end
|
||||||
if nodedef.on_ignite then
|
if nodedef.on_ignite then
|
||||||
nodedef.on_ignite(pointed_thing.under, user)
|
nodedef.on_ignite(pointed_thing.under, user)
|
||||||
elseif minetest.get_item_group(node_under, "flammable") >= 1
|
elseif minetest.get_item_group(node_under, "flammable") >= 1
|
||||||
and minetest.get_node(pointed_thing.above).name == "air" then
|
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"})
|
minetest.set_node(pointed_thing.above, {name = "fire:basic_flame"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user