mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 04:21:41 +09:00
Fixed Existing Lua Check Errors
This commit is contained in:
@@ -8,7 +8,7 @@ local config = require 'config.popup_messages' --- @dep config.popup_messages
|
||||
|
||||
local send_text = Game.print_player_floating_text -- (player_index, text, color)
|
||||
|
||||
Event.add(defines.events.on_console_chat,function(event)
|
||||
Event.add(defines.events.on_console_chat, function(event)
|
||||
if not event.player_index or event.player_index < 1 then return end
|
||||
local player = Game.get_player_by_index(event.player_index)
|
||||
|
||||
@@ -18,7 +18,7 @@ Event.add(defines.events.on_console_chat,function(event)
|
||||
|
||||
-- Sends the message as text above them
|
||||
if config.show_player_messages then
|
||||
send_text(player.index,{'chat-popup.message',player.name,event.message},player.chat_color)
|
||||
send_text(player.index, {'chat-popup.message', player.name, event.message}, player.chat_color)
|
||||
end
|
||||
|
||||
if not config.show_player_mentions then return end
|
||||
@@ -27,10 +27,10 @@ Event.add(defines.events.on_console_chat,function(event)
|
||||
local search_string = event.message:lower():gsub("%s+", "")
|
||||
|
||||
-- Loops over online players to see if they name is included
|
||||
for _,mentioned_player in pairs(game.connected_players) do
|
||||
for _, mentioned_player in pairs(game.connected_players) do
|
||||
if mentioned_player.index ~= player.index then
|
||||
if search_string:match(mentioned_player.name:lower(), 1, true) then
|
||||
send_text(mentioned_player.index,{'chat-popup.ping',player.name},player.chat_color)
|
||||
send_text(mentioned_player.index, {'chat-popup.ping', player.name}, player.chat_color)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user