diff --git a/init.lua b/init.lua index af1113b..e5a5181 100644 --- a/init.lua +++ b/init.lua @@ -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 = {} diff --git a/mod.conf b/mod.conf index bd0f1b7..954899c 100644 --- a/mod.conf +++ b/mod.conf @@ -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 \ No newline at end of file