mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-10 00:43:27 +02:00
Merge pull request #111 from AwesomePatrol/post-join-team-on-discord
Send "join team" messages to discord
This commit is contained in:
commit
d31e27c0c9
@ -1,4 +1,5 @@
|
|||||||
local Public = {}
|
local Public = {}
|
||||||
|
local Server = require 'utils.server'
|
||||||
|
|
||||||
local bb_config = require "maps.biter_battles_v2.config"
|
local bb_config = require "maps.biter_battles_v2.config"
|
||||||
local event = require 'utils.event'
|
local event = require 'utils.event'
|
||||||
@ -309,7 +310,9 @@ function join_team(player, force_name, forced_join)
|
|||||||
if not forced_join then
|
if not forced_join then
|
||||||
local c = player.force.name
|
local c = player.force.name
|
||||||
if global.tm_custom_name[player.force.name] then c = global.tm_custom_name[player.force.name] end
|
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 = table.concat({player.name, " has joined team ", c, "!"})
|
||||||
|
game.print(message, {r = 0.98, g = 0.66, b = 0.22})
|
||||||
|
Server.to_discord_bold(message)
|
||||||
end
|
end
|
||||||
local i = player.get_inventory(defines.inventory.character_main)
|
local i = player.get_inventory(defines.inventory.character_main)
|
||||||
i.clear()
|
i.clear()
|
||||||
|
Loading…
Reference in New Issue
Block a user