From 24b75d89a501eda4462537c6fbc33c5bcc92c168 Mon Sep 17 00:00:00 2001 From: lzk <124214523+lzk228@users.noreply.github.com> Date: Wed, 23 Jul 2025 16:15:29 +0200 Subject: [PATCH] Show customvote title in chat on finish (#39137) * Show customvote title in chat on finish * update the text --- Content.Server/Voting/VoteCommands.cs | 4 ++-- Resources/Locale/en-US/voting/vote-commands.ftl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Content.Server/Voting/VoteCommands.cs b/Content.Server/Voting/VoteCommands.cs index e526829d27..8688c665a3 100644 --- a/Content.Server/Voting/VoteCommands.cs +++ b/Content.Server/Voting/VoteCommands.cs @@ -114,12 +114,12 @@ namespace Content.Server.Voting { var ties = string.Join(", ", eventArgs.Winners.Select(c => args[(int) c])); _adminLogger.Add(LogType.Vote, LogImpact.Medium, $"Custom vote {options.Title} finished as tie: {ties}"); - _chatManager.DispatchServerAnnouncement(Loc.GetString("cmd-customvote-on-finished-tie", ("ties", ties))); + _chatManager.DispatchServerAnnouncement(Loc.GetString("cmd-customvote-on-finished-tie", ("title", options.Title), ("ties", ties))); } else { _adminLogger.Add(LogType.Vote, LogImpact.Medium, $"Custom vote {options.Title} finished: {args[(int) eventArgs.Winner]}"); - _chatManager.DispatchServerAnnouncement(Loc.GetString("cmd-customvote-on-finished-win", ("winner", args[(int) eventArgs.Winner]))); + _chatManager.DispatchServerAnnouncement(Loc.GetString("cmd-customvote-on-finished-win", ("title", options.Title), ("winner", args[(int) eventArgs.Winner]))); } _voteWebhooks.UpdateWebhookIfConfigured(webhookState, eventArgs); diff --git a/Resources/Locale/en-US/voting/vote-commands.ftl b/Resources/Locale/en-US/voting/vote-commands.ftl index 94320294c8..4ad19e7070 100644 --- a/Resources/Locale/en-US/voting/vote-commands.ftl +++ b/Resources/Locale/en-US/voting/vote-commands.ftl @@ -12,8 +12,8 @@ cmd-createvote-arg-vote-type = cmd-customvote-desc = Creates a custom vote cmd-customvote-help = Usage: customvote <option1> <option2> [option3...] -cmd-customvote-on-finished-tie = Tie between {$ties}! -cmd-customvote-on-finished-win = {$winner} wins! +cmd-customvote-on-finished-tie = The vote '{$title}' has finished: tie between {$ties}! +cmd-customvote-on-finished-win = The vote '{$title}' has finished: {$winner} wins! cmd-customvote-arg-title = <title> cmd-customvote-arg-option-n = <option{ $n }>