From e9af56c7c33b1f85520ec52923a87eac06bbd495 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Wed, 21 Jul 2021 19:03:10 +0200 Subject: [PATCH] Vote type delay, code comments. Added doc comments to server side voting API. There is now a 4 minute delay between creating votes of the same type. Shuffled some code around. Made a StandardVoteType enum instead of string IDs. --- Content.Client/Voting/UI/VoteCallMenu.xaml | 13 ++-- Content.Client/Voting/UI/VoteCallMenu.xaml.cs | 56 +++++++++++++-- Content.Client/Voting/VoteManager.cs | 29 ++++++-- Content.Server/Voting/IVoteHandle.cs | 68 ++++++++++++++++++- .../Voting/Managers/IVoteManager.cs | 54 +++++++++++++-- .../Managers/VoteManager.DefaultVotes.cs | 31 +++++++-- Content.Server/Voting/Managers/VoteManager.cs | 52 +++++++++++--- Content.Server/Voting/VoteCommands.cs | 24 +++---- Content.Shared/CCVar/CCVars.cs | 9 +++ Content.Shared/Voting/MsgVoteCanCall.cs | 34 +++++++++- Content.Shared/Voting/StandardVoteType.cs | 18 +++++ .../Changelog/Parts/standard_vote_delay.yml | 4 ++ .../Locale/en-US/voting/ui/vote-call-menu.ftl | 5 +- 13 files changed, 348 insertions(+), 49 deletions(-) create mode 100644 Content.Shared/Voting/StandardVoteType.cs create mode 100644 Resources/Changelog/Parts/standard_vote_delay.yml diff --git a/Content.Client/Voting/UI/VoteCallMenu.xaml b/Content.Client/Voting/UI/VoteCallMenu.xaml index 5ff1015dbb..a5e1204521 100644 --- a/Content.Client/Voting/UI/VoteCallMenu.xaml +++ b/Content.Client/Voting/UI/VoteCallMenu.xaml @@ -12,11 +12,14 @@ - - - - - + + + + + + + +