1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-12-23 00:20:17 +01:00

warn user if they're not allowed to set a fire

This commit is contained in:
Vanessa Ezekowitz 2014-07-30 10:15:25 -04:00
parent ec7a2e7c74
commit f3cef98520

View File

@ -249,12 +249,12 @@ minetest.register_tool("fake_fire:flint_and_steel", {
string.find(minetest.get_node(pointed_thing.under).name, "ice") string.find(minetest.get_node(pointed_thing.under).name, "ice")
and and
minetest.get_node(pointed_thing.above).name == "air" minetest.get_node(pointed_thing.above).name == "air"
and not
minetest.is_protected(pointed_thing.above, user:get_player_name())
then then
minetest.set_node(pointed_thing.above, if not minetest.is_protected(pointed_thing.above, user:get_player_name()) then
{name="fake_fire:smokeless_fire"}) minetest.set_node(pointed_thing.above, {name="fake_fire:smokeless_fire"})
else
minetest.chat_send_player(user:get_player_name(), "You can't set a fire in someone else's area!")
end
elseif elseif
pointed_thing.type == "node" pointed_thing.type == "node"
@ -268,11 +268,12 @@ minetest.register_tool("fake_fire:flint_and_steel", {
) )
and and
minetest.get_node(pointed_thing.above).name == "air" minetest.get_node(pointed_thing.above).name == "air"
and not
minetest.is_protected(pointed_thing.above, user:get_player_name())
then then
minetest.set_node(pointed_thing.above, if not minetest.is_protected(pointed_thing.above, user:get_player_name()) then
{name="fake_fire:smokeless_ice_fire"}) minetest.set_node(pointed_thing.above, {name="fake_fire:smokeless_ice_fire"})
else
minetest.chat_send_player(user:get_player_name(), "You can't set a fire in someone else's area!")
end
end -- Line 210, if end -- Line 210, if
end -- Line 207, for/do end -- Line 207, for/do