mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-04 21:50:28 -04:00
Add sound notification (#86)
* Add sound notification * Change sound Update translations
This commit is contained in:
parent
a79ebd94b8
commit
955f7d123f
13 changed files with 68 additions and 50 deletions
3
api.lua
3
api.lua
|
@ -106,6 +106,9 @@ function mail.send(m)
|
|||
minetest.chat_send_player(name, unified_inventory_alert)
|
||||
end
|
||||
end
|
||||
if mail.get_setting(name, "sound_notifications") == true then
|
||||
minetest.sound_play("mail_notif", {to_player=name})
|
||||
end
|
||||
local receiver_entry = mail.get_storage_entry(name)
|
||||
local receiver_messages = receiver_entry.inbox
|
||||
mail.hud_update(name, receiver_messages)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue