mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-24 03:47:58 +02:00
Post join message when switching forces to discord
When in tournament no messages are sent related to team management.
This commit is contained in:
parent
ac91ef02b4
commit
d074ef7189
@ -1,4 +1,5 @@
|
|||||||
local Public = {}
|
local Public = {}
|
||||||
|
local Server = require 'utils.server'
|
||||||
|
|
||||||
local forces = {
|
local forces = {
|
||||||
{name = "north", color = {r = 0, g = 0, b = 200}},
|
{name = "north", color = {r = 0, g = 0, b = 200}},
|
||||||
@ -81,6 +82,7 @@ local function switch_force(player_name, force_name)
|
|||||||
player.force = game.forces[force_name]
|
player.force = game.forces[force_name]
|
||||||
|
|
||||||
game.print(player_name .. " has been switched into team " .. force_name .. ".", {r=0.98, g=0.66, b=0.22})
|
game.print(player_name .. " has been switched into team " .. force_name .. ".", {r=0.98, g=0.66, b=0.22})
|
||||||
|
Server.to_discord_bold(player_name .. " has joined team " .. force_name .. "!")
|
||||||
|
|
||||||
leave_corpse(player)
|
leave_corpse(player)
|
||||||
|
|
||||||
@ -366,4 +368,4 @@ function Public.init()
|
|||||||
global.tm_custom_name = {}
|
global.tm_custom_name = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
return Public
|
return Public
|
||||||
|
Loading…
x
Reference in New Issue
Block a user