mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-10 00:43:27 +02:00
Post feeding messages to discord
This commit is contained in:
parent
01664d3b7f
commit
521cde4a6b
@ -1,4 +1,5 @@
|
|||||||
local bb_config = require "maps.biter_battles_v2.config"
|
local bb_config = require "maps.biter_battles_v2.config"
|
||||||
|
local Server = require 'utils.server'
|
||||||
|
|
||||||
local tables = require "maps.biter_battles_v2.tables"
|
local tables = require "maps.biter_battles_v2.tables"
|
||||||
local food_values = tables.food_values
|
local food_values = tables.food_values
|
||||||
@ -56,7 +57,9 @@ local function print_feeding_msg(player, food, flask_amount)
|
|||||||
local formatted_amount = table.concat({"[font=heading-1][color=255,255,255]" .. flask_amount .. "[/color][/font]"})
|
local formatted_amount = table.concat({"[font=heading-1][color=255,255,255]" .. flask_amount .. "[/color][/font]"})
|
||||||
|
|
||||||
if flask_amount >= 20 then
|
if flask_amount >= 20 then
|
||||||
game.print(colored_player_name .. " fed " .. formatted_amount .. " flasks of " .. formatted_food .. " to team " .. team_strings[get_enemy_team_of(player.force.name)] .. " biters!", {r = 0.9, g = 0.9, b = 0.9})
|
local msg = table.concat({colored_player_name, " fed ", formatted_amount, " flasks of ", formatted_food, " to team ", team_strings[get_enemy_team_of(player.force.name)], " biters!"})
|
||||||
|
game.print(msg, {r = 0.9, g = 0.9, b = 0.9})
|
||||||
|
Server.to_discord_bold(msg)
|
||||||
else
|
else
|
||||||
local target_team_text = "the enemy"
|
local target_team_text = "the enemy"
|
||||||
if global.training_mode then
|
if global.training_mode then
|
||||||
@ -181,4 +184,4 @@ local function feed_biters(player, food)
|
|||||||
add_stats(player, food, flask_amount ,biter_force_name, evolution_before_feed, threat_before_feed)
|
add_stats(player, food, flask_amount ,biter_force_name, evolution_before_feed, threat_before_feed)
|
||||||
end
|
end
|
||||||
|
|
||||||
return feed_biters
|
return feed_biters
|
||||||
|
Loading…
Reference in New Issue
Block a user