forked from mtcontrib/homedecor_modpack
honor node protection when setting a fire
This commit is contained in:
parent
c9133337a2
commit
ec7a2e7c74
@ -249,6 +249,8 @@ 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,
|
minetest.set_node(pointed_thing.above,
|
||||||
{name="fake_fire:smokeless_fire"})
|
{name="fake_fire:smokeless_fire"})
|
||||||
@ -266,6 +268,8 @@ 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,
|
minetest.set_node(pointed_thing.above,
|
||||||
{name="fake_fire:smokeless_ice_fire"})
|
{name="fake_fire:smokeless_ice_fire"})
|
||||||
|
Loading…
Reference in New Issue
Block a user