From ef1189e6dbd2c72c96918d6411dc1db5998635d3 Mon Sep 17 00:00:00 2001 From: VorTechnix <45538536+VorTechnix@users.noreply.github.com> Date: Sun, 13 Oct 2024 14:23:05 -0700 Subject: [PATCH] Update notify.lua --- worldeditadditions_core/utils/notify.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/worldeditadditions_core/utils/notify.lua b/worldeditadditions_core/utils/notify.lua index 4634930..c44cfac 100644 --- a/worldeditadditions_core/utils/notify.lua +++ b/worldeditadditions_core/utils/notify.lua @@ -26,7 +26,7 @@ validate.all = function(name, message, colour) validate.colour(colour) end -local send = function(name, message, colour, message_coloured) +local send = function(name, ntype, message, colour, message_coloured) -- Do validation if not validate.all(name, message, colour) then return false @@ -37,8 +37,8 @@ local send = function(name, message, colour, message_coloured) end -- Create the notification local ret = table.concat({ - "[--",set_colour(colour, "WEA"),"--]",message - }, " ") + "[--",set_colour(colour, "WEA :: " .. ntype), + "--]",message }, " ") -- Send the notification minetest.chat_send_player(name, ret) return true @@ -69,9 +69,9 @@ end -- @param colour (optional): The colour of the notification. -- @param message_coloured (optional): Whether the message should be coloured. -- @return : True if all parameters are valid, false otherwise. -function Notify.custom(name, message, colour, message_coloured) +function Notify.custom(name, ntype, message, colour, message_coloured) if not colour then colour = "#FFFFFF" end - return send(name, message, colour, message_coloured) + return send(name, ntype, message, colour, message_coloured) end --- Register predefined notification types. @@ -89,7 +89,7 @@ do } for k, v in pairs(type_colours) do Notify[k] = function(name, message) - return send(name, message, v[1], v[2]) + return send(name, k, message, v[1], v[2]) end end end