diff --git a/rules.lua b/rules.lua index 61c1381..30a517d 100644 --- a/rules.lua +++ b/rules.lua @@ -37,16 +37,18 @@ function check_position(pos) end local ret = _check_position_uncached(pos) - print(ret) -- todo: remove this cache[hash] = ret return ret end function _check_position_uncached(pos) local node = minetest.get_node(pos) - local reg_item = minetest.registered_items[node.name] + if not reg_item then + return "W" + end + if reg_item.groups and reg_item.groups.go_stone then return "S" .. reg_item.go_team end