1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-18 03:21:47 +02:00

Colors and server protect

This commit is contained in:
SimonFlapse 2019-03-02 15:59:18 +01:00
parent fea462cd93
commit 74e8e58746

View File

@ -2,12 +2,15 @@ local Event = require 'utils.event'
local Game = require 'utils.game'
local function console_chat(event)
if not event.player_index or event.player_index == nil then
return
end
local player = Game.get_player_by_index(event.player_index)
local player_force = player.force
for _, force in pairs(game.forces) do
if (string.find(force.name, 'quadrant')) ~= nil then
if force.name ~= player_force.name then
force.print(player.name .. ' ' .. player.tag .. ': ' .. event.message)
force.print(player.name .. ' ' .. player.tag .. ': ' .. event.message, player.chat_color)
end
end
end