mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-29 20:16:38 +09:00
Added Damage Popups
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
-- also displays a ping above users who are named in the message
|
||||
local Game = require 'utils.game'
|
||||
local Event = require 'utils.event'
|
||||
local config = require 'config.popup_messages'
|
||||
|
||||
local send_text = Game.print_player_floating_text -- (player_index, text, color)
|
||||
|
||||
@@ -13,7 +14,11 @@ Event.add(defines.events.on_console_chat,function(event)
|
||||
if not event.message then return end
|
||||
|
||||
-- Sends the message as text above them
|
||||
send_text(player.index,{'chat-popup.message',player.name,event.message},player.chat_color)
|
||||
if config.show_player_messages then
|
||||
send_text(player.index,{'chat-popup.message',player.name,event.message},player.chat_color)
|
||||
end
|
||||
|
||||
if not config.show_player_mentions then return end
|
||||
|
||||
-- Makes lower and removes white space from the message
|
||||
local search_string = event.message:lower():gsub("%s+", "")
|
||||
|
||||
Reference in New Issue
Block a user