Skip to content

Commit

Permalink
allow right-clicking doors and other items
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneWolfHT committed Feb 27, 2020
2 parents 96a9d8a + 82a0ca5 commit db26ef6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@ if minetest.registered_items["fire:basic_flame"] and lavastuff.enable_tool_fire
local name = user:get_player_name()

if pointed.type == "node" then
local node_under = minetest.get_node(pointed.under).name
local node = minetest.get_node(pointed.under)
local node_under = node.name
local def = minetest.registered_nodes[node_under]

if def.on_rightclick then
return def.on_rightclick(pointed.under, node, user, itemstack, pointed)
end

if minetest.is_protected(pointed.under, name) then return end

if def.on_ignite then
Expand Down

0 comments on commit db26ef6

Please sign in to comment.