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:
parent
fea462cd93
commit
74e8e58746
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user