mirror of
https://gitlab.com/rubenwardy/awards.git
synced 2024-11-26 09:13:55 +01:00
Interpret group ratings of zero as not in group.
The MT API docs instruct to interpret `nil` and `0` as the same rating.
This commit is contained in:
parent
7e3064ef93
commit
d542042a50
@ -144,8 +144,8 @@ function awards.register_trigger(tname, tdef)
|
|||||||
if tdef.key_is_item and key:sub(1, 6) ~= "group:" then
|
if tdef.key_is_item and key:sub(1, 6) ~= "group:" then
|
||||||
local itemdef = minetest.registered_items[key]
|
local itemdef = minetest.registered_items[key]
|
||||||
if itemdef then
|
if itemdef then
|
||||||
for groupname, _ in pairs(itemdef.groups or {}) do
|
for groupname,rating in pairs(itemdef.groups or {}) do
|
||||||
if tdef.watched_groups[groupname] then
|
if rating ~= 0 and tdef.watched_groups[groupname] then
|
||||||
tdef.notify(player, "group:" .. groupname, n)
|
tdef.notify(player, "group:" .. groupname, n)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user