mirror of
https://github.com/minetest/minetest_game.git
synced 2025-06-29 13:20:25 +02:00
Make can_interact_with_node() check for key group instead of default:key
This commit is contained in:
@ -639,7 +639,7 @@ function default.can_interact_with_node(player, pos)
|
||||
|
||||
-- Is player wielding the right key?
|
||||
local item = player:get_wielded_item()
|
||||
if item:get_name() == "default:key" then
|
||||
if minetest.get_item_group(item:get_name(), "key") == 1 then
|
||||
local key_meta = item:get_meta()
|
||||
|
||||
if key_meta:get_string("secret") == "" then
|
||||
|
Reference in New Issue
Block a user