mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-07 06:06:10 -04:00
light gunpowder with flint and steel
This commit is contained in:
parent
7cba7af894
commit
7668a9e4f7
1 changed files with 8 additions and 1 deletions
|
@ -77,7 +77,14 @@ minetest.register_tool("fire:flint_and_steel", {
|
|||
local player_name = user:get_player_name()
|
||||
local pt = pointed_thing
|
||||
|
||||
if pt.type == "node" and minetest.get_node(pt.above).name == "air" then
|
||||
if pt.type == "node" and minetest.get_node(pt.under).name == "tnt:gunpowder" then
|
||||
if not minetest.is_protected(pt.under, player_name) then
|
||||
minetest.set_node(pt.under, {name="tnt:gunpowder_burning"})
|
||||
minetest.get_node_timer(pt.under):start(1)
|
||||
else
|
||||
minetest.chat_send_player(player_name, "This area is protected")
|
||||
end
|
||||
elseif pt.type == "node" and minetest.get_node(pt.above).name == "air" then
|
||||
if not minetest.is_protected(pt.above, player_name) then
|
||||
minetest.set_node(pt.above, {name="fire:basic_flame"})
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue