1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-22 03:38:48 +02:00

Post join team messages to discord

This commit is contained in:
Aleksander Mistewicz 2020-01-04 21:24:19 +01:00
parent fa79933880
commit b3b44bcdce

View File

@ -1,4 +1,5 @@
local Public = {}
local Server = require 'utils.server'
local bb_config = require "maps.biter_battles_v2.config"
local event = require 'utils.event'
@ -309,7 +310,9 @@ function join_team(player, force_name, forced_join)
if not forced_join then
local c = player.force.name
if global.tm_custom_name[player.force.name] then c = global.tm_custom_name[player.force.name] end
game.print(player.name .. " has joined team " .. c .. "!", {r = 0.98, g = 0.66, b = 0.22})
local message = player.name .. " has joined team " .. c .. "!"
game.print(message, {r = 0.98, g = 0.66, b = 0.22})
Server.to_discord(message)
end
local i = player.get_inventory(defines.inventory.character_main)
i.clear()