mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-01 03:20:03 -04:00
Shorter group check
This commit is contained in:
parent
2e84c0b1d3
commit
deb82c88df
1 changed files with 1 additions and 2 deletions
|
@ -585,8 +585,7 @@ function default.can_interact_with_node(player, pos)
|
|||
|
||||
-- Is player wielding the right key?
|
||||
local item = player:get_wielded_item()
|
||||
local def = minetest.registered_items[item:get_name()]
|
||||
if def and def.groups and def.groups.key == 1 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
|
||||
|
|
Loading…
Add table
Reference in a new issue