Add achievement notifications

main
Bram van den Heuvel 2024-03-06 17:17:36 +01:00
parent 6ee151759b
commit 928c971193
2 changed files with 8 additions and 0 deletions

View File

@ -64,6 +64,13 @@ minetest.register_on_dieplayer(function(ObjectRef, reason)
end
end)
-- Send achievements
if awards then
awards.register_on_unlock(function(name, def)
matrix.send(http_api, name .. "has made the achievement [" .. def.title .. "]")
end)
end
-- Start Matrix sync
local names = {}

View File

@ -1,2 +1,3 @@
name = mt_matrix
description = This mod creates a bridge between a Matrix room and the in-game Minetest chat.
optional_depends=awards