From 65bc8b7960e8b70f65c9352aab093f9aa91ecdc8 Mon Sep 17 00:00:00 2001 From: Volodymir Ohorodnytskyi <102746941+Legendaxe@users.noreply.github.com> Date: Sun, 26 Nov 2023 13:33:15 +0200 Subject: [PATCH] fix: role to ping for new round to config (#769) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Что этот PR делает Переносим роль которую должен пинговать сервер в конце раунда в конфиг ## Почему это хорошо для игры ## Изображения изменений ## Тестирование ## Changelog :cl: fix: Теперь каждый сервер будет пинговать своих ждунов /:cl: --- code/game/gamemodes/game_mode.dm | 2 +- config/example/config.toml | 2 ++ modular_ss220/_misc/_misc.dme | 1 + modular_ss220/_misc/code/discord_configuration.dm | 6 ++++++ 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 modular_ss220/_misc/code/discord_configuration.dm diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 353d80a06976..78d0d4c264b3 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -178,7 +178,7 @@ if(escaped_on_pod_5) SSblackbox.record_feedback("nested tally", "round_end_stats", escaped_on_pod_5, list("escapees", "on_pod_5")) - GLOB.discord_manager.send2discord_simple(DISCORD_WEBHOOK_PRIMARY, "A round of [name] has ended - [surviving_total] survivors, [ghosts] ghosts.
<@&1100491296658956410>") // SS220 Addition + GLOB.discord_manager.send2discord_simple(DISCORD_WEBHOOK_PRIMARY, "A round of [name] has ended - [surviving_total] survivors, [ghosts] ghosts. <@&[GLOB.configuration.discord.new_round_waiting_role]>") // SS220 Addition if(SSredis.connected) // Send our presence to required channels var/list/presence_data = list() diff --git a/config/example/config.toml b/config/example/config.toml index 6a33946ea878..822e722defb5 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -197,6 +197,8 @@ mentor_role_id = "" forward_all_ahelps = true +new_round_waiting_role_id = "" + ################################################################ diff --git a/modular_ss220/_misc/_misc.dme b/modular_ss220/_misc/_misc.dme index 6a4ef495a6e9..9edaf00619f2 100644 --- a/modular_ss220/_misc/_misc.dme +++ b/modular_ss220/_misc/_misc.dme @@ -3,3 +3,4 @@ #include "code/global_procs.dm" #include "code/ss220_general_config.dm" #include "code/icons.dm" +#include "code/discord_configuration.dm" diff --git a/modular_ss220/_misc/code/discord_configuration.dm b/modular_ss220/_misc/code/discord_configuration.dm new file mode 100644 index 000000000000..e234f072229c --- /dev/null +++ b/modular_ss220/_misc/code/discord_configuration.dm @@ -0,0 +1,6 @@ +/datum/configuration_section/discord_configuration + /// Admin role to ping if no admins are online. Disables if empty string + var/new_round_waiting_role = "" + +/datum/configuration_section/discord_configuration/load_data(list/data) + CONFIG_LOAD_STR(new_round_waiting_role, data["new_round_waiting_role_id"])