Auto execute Ready Check (#447)

* Update en_US.json

* Update RPC.cs

* Update GameOptionsMenuPatch.cs

* Update Main.cs

* Update GameOptionsMenuPatch.cs

* Update EACList.txt

* Update OptionShower.cs

* Update OptionHolder.cs

* Update PlayerJoinAndLeftPatch.cs

* Update en_US.json

* Update Main.cs

* Update ChatCommandPatch.cs

* Update en_US.json

* Update README.md

* Update en_US.json

* Update en_US.json

* Update OptionHolder.cs

* Update Main.cs

* Update GameOptionsMenuPatch.cs
This commit is contained in:
PEPPERcula authored and GitHub committed 2025-12-25 13:12:45 +01:00
1 parent 4a520be228
commit 73fc6cd7ef
9 files changed
+55 -27

No files matched your search

+14 -3
View File
@@ -842,7 +842,9 @@ public static class Options
public static OptionItem AutoMPollCommandCooldown;
public static OptionItem AutoDraftStartCommandAfterJoin;
public static OptionItem AutoDraftStartCommandCooldown;
public static OptionItem AutoReadyCheckCommandAfterJoin;
public static OptionItem AutoReadyCheckCommandCooldown;
public static OptionItem DumpLogAfterGameEnd;
private static readonly string[] SuffixModes =
@@ -1676,6 +1678,12 @@ public static class Options
AutoDraftStartCommandCooldown = new IntegerOptionItem(19427, "AutoDraftStartCommandCooldown", new(10, 600, 5), 150, TabGroup.SystemSettings)
.SetParent(AutoDraftStartCommandAfterJoin)
.SetValueFormat(OptionFormat.Seconds);
AutoReadyCheckCommandAfterJoin = new BooleanOptionItem(19433, "AutoReadyCheckCommandAfterJoin", false, TabGroup.SystemSettings);
AutoReadyCheckCommandCooldown = new IntegerOptionItem(19434, "AutoReadyCheckCommandCooldown", new(10, 600, 5), 325, TabGroup.SystemSettings)
.SetParent(AutoReadyCheckCommandAfterJoin)
.SetValueFormat(OptionFormat.Seconds);
EnterKeyToStartGame = new BooleanOptionItem(19432, "EnterKeyToStartGame", false, TabGroup.SystemSettings);
@@ -2828,16 +2836,19 @@ public static class Options
});
HideGuesserCommands = new BooleanOptionItem(19717, "GuesserTryHideMsg", true, TabGroup.TaskSettings)
.SetParent(GuesserMode)
.SetColor(Color.green);
.SetColor(Color.green)
.SetParent(GuesserMode);
GuesserDoesntDieOnMisguess = new BooleanOptionItem(19718, "GuesserDoesntDieOnMisguess", false, TabGroup.TaskSettings)
.SetColor(Color.yellow)
.SetGameMode(CustomGameMode.Standard);
CanGuessDuringDiscussionTime = new BooleanOptionItem(19799, "CanGuessDuringDiscussionTime", true, TabGroup.TaskSettings)
.SetColor(Color.yellow)
.SetGameMode(CustomGameMode.Standard);
MisguessDeathReason = new BooleanOptionItem(44444, "MisguessDeathReason", false, TabGroup.TaskSettings)
.SetColor(Color.yellow)
.SetGameMode(CustomGameMode.Standard);
LoadingPercentage = 92;
+1 -1
View File
@@ -87,7 +87,7 @@ public static class OptionShower
}
Pages.Add("");
sb.Append($"<color={Utils.GetRoleColorCode(CustomRoles.GM)}>{Utils.GetRoleName(CustomRoles.GM)}:</color> {(Main.GM.Value ? GetString("RoleRate") : GetString("RoleOff"))}\n\n");
sb.Append($"<color={Utils.GetRoleColorCode(CustomRoles.GM)}>{Utils.GetRoleName(CustomRoles.GM)}</color>: {(Main.GM.Value ? GetString("RoleRate") : GetString("RoleOff"))}\n\n");
var index = 0;
-3
View File
@@ -679,9 +679,6 @@ internal static class RPCHandlerPatch
if (!command.CanUseCommand(player)) break;
command.Action(player, commandKey, text, text.Split(' '));
// const BindingFlags flags = BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public;
// typeof(ChatCommands).GetMethod(methodName, flags)?.Invoke(null, [player, text, text.Split(' ')]);
Logger.Info($"Invoke Command: {command.Action.Method.Name} ({player?.Data?.PlayerName}, {text})", "RequestCommandProcessing");
break;
}
+1 -1
View File
@@ -194,7 +194,7 @@ internal static class ChatCommands
["Command.DraftStart"] = new(["draftstart", "ds", "драфтстарт", "启用草稿", "todosescolhem-iniciar"], "", GetString("CommandDescription.DraftStart"), Command.UsageLevels.HostOrModerator, Command.UsageTimes.InLobby, DraftStartCommand, true, false),
["Command.DraftDescription"] = new(["dd", "draftdesc", "draftdescription", "драфтописание", "драфтопис", "草稿描述", "todosescolhem-descricao"], "{index}", GetString("CommandDescription.DraftDescription"), Command.UsageLevels.Everyone, Command.UsageTimes.InLobby, DraftDescriptionCommand, false, false, [GetString("CommandArgs.DraftDescription.Index")]),
["Command.Draft"] = new(["draft", "драфт", "选择草稿", "todosescolhem-escolher"], "{number}", GetString("CommandDescription.Draft"), Command.UsageLevels.Everyone, Command.UsageTimes.InLobby, DraftCommand, false, false, [GetString("CommandArgs.Draft.Number")]),
["Command.ReadyCheck"] = new(["rc", "readycheck", "проверитьготовность", "准备检测", "verificação-de-prontidão"], "", GetString("CommandDescription.ReadyCheck"), Command.UsageLevels.HostOrAdmin, Command.UsageTimes.InLobby, ReadyCheckCommand, true, false),
["Command.ReadyCheck"] = new(["rc", "readycheck", "проверитьготовность", "准备检测", "verificação-de-prontidão"], "", GetString("CommandDescription.ReadyCheck"), Command.UsageLevels.HostOrModerator, Command.UsageTimes.InLobby, ReadyCheckCommand, true, false),
["Command.Ready"] = new(["ready", "готов", "准备", "pronto"], "", GetString("CommandDescription.Ready"), Command.UsageLevels.Everyone, Command.UsageTimes.InLobby, ReadyCommand, true, false),
["Command.EnableAllRoles"] = new(["enableallroles", "вклвсероли", "启用所有职业", "habilitar-todas-as-funções"], "", GetString("CommandDescription.EnableAllRoles"), Command.UsageLevels.Host, Command.UsageTimes.InLobby, EnableAllRolesCommand, true, false),
["Command.Achievements"] = new(["achievements", "достижения", "成就", "conquistas"], "", GetString("CommandDescription.Achievements"), Command.UsageLevels.Modded, Command.UsageTimes.Always, AchievementsCommand, true, false),
+3 -3
View File
@@ -812,7 +812,7 @@ public static class StringOptionPatch
if (instance == null) return string.Empty;
Team team = instance.Team;
if ((int)team is 1 or 2 or 4) return $" <size=2>{GetColoredShortTeamName(team)}</size>";
if ((int)team is 1 or 2 or 4 or 8) return $" <size=2>{GetColoredShortTeamName(team)}</size>";
Team[] teams = (int)team switch
{
@@ -949,7 +949,6 @@ public static class GameSettingMenuPatch
private static readonly Vector3 ButtonPositionRight = new(-2.4f, -0.55f, 0f);
private static readonly Vector3 ButtonSize = new(0.45f, 0.35f, 1f);
// private static readonly Vector3 ButtonSize = new(0.45f, 0.6f, 1f);
private static GameOptionsMenu TemplateGameOptionsMenu;
private static PassiveButton TemplateGameSettingsButton;
@@ -1503,4 +1502,5 @@ public static class RpcSyncSettingsPatch
{
OptionItem.SyncAllOptions();
}
}
}
+21 -1
View File
@@ -183,6 +183,25 @@ internal static class OnGameJoinedPatch
if (Options.AutoDraftStartCommandAfterJoin.GetBool())
ChatCommands.DraftStartCommand(PlayerControl.LocalPlayer, "Command.DraftStart", "/draftstart", ["/draftstart"]);
}
if (Options.AutoReadyCheckCommandAfterJoin.GetBool())
{
Main.Instance.StartCoroutine(CoRoutine());
IEnumerator CoRoutine()
{
float timer = Options.AutoReadyCheckCommandCooldown.GetInt();
while (timer > 0)
{
if (!GameStates.IsLobby) yield break;
timer -= Time.deltaTime;
yield return null;
}
if (Options.AutoReadyCheckCommandAfterJoin.GetBool())
ChatCommands.ReadyCheckCommand(PlayerControl.LocalPlayer, "Command.ReadyCheck", "/readycheck", ["/readycheck"]);
}
}
if (Options.AutoGMRotationEnabled)
@@ -895,4 +914,5 @@ internal static class NetworkedPlayerInfoInitPatch
}
}
}
}
}
+2 -4
View File
@@ -243,7 +243,7 @@ You can also report bugs and suggest features in the #bug-reports and #suggestio
| /afkexempt | :x: | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: |
| /os | :x: | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: |
| /unmute | :x: | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: |
| /readycheck | :x: | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: |
| /readycheck | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| /end | :x: | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: |
| Lobby tag | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
@@ -364,7 +364,7 @@ Click this badge to view our translation project:
| /draftstart<br>/ds | Start drafting, where players may choose their roles for the next game | – | :red_circle: Host, Moderators, And Admins | :green_square: In Lobby | :x: |
| /dd<br>/draftdesc<br>/draftdescription | View the description of one of the roles you got in the draft. | &#x1F538; **index** – The number in the drafting message of the role to view the description of<br> | :purple_circle: Everyone | :green_square: In Lobby | :x: |
| /draft | Choose a role in the draft | &#x1F538; **number** – The number of the role to choose<br> | :purple_circle: Everyone | :green_square: In Lobby | :x: |
| /rc<br>/readycheck | Start a ready check (check who is AFK) (results displayed after 30s) | – | :white_circle: Host And Admins | :green_square: In Lobby | :x: |
| /rc<br>/readycheck | Start a ready check (check who is AFK) (results displayed after 30s) | – | :red_circle: Host, Moderators, And Admins | :green_square: In Lobby | :x: |
| /ready | Mark yourself as ready | – | :purple_circle: Everyone | :green_square: In Lobby | :x: |
| /enableallroles | Enables all roles and add-ons | – | :yellow_circle: Host | :green_square: In Lobby | :x: |
| /achievements | See which achievements you have unlocked and which you haven't | – | :green_circle: Modded Clients | :purple_square: Always | :x: |
@@ -703,5 +703,3 @@ If you have any questions about this Privacy Policy or how your data is handled,
------------------------------------------------------------------------------------------------------------
By using the Endless Host Roles mod, you agree to the terms outlined in this Privacy Policy.
+3 -3
View File
@@ -90,11 +90,11 @@ woveelixir#4088 | 42044d211 | DMD 3CD | Cheating | Cheater and probably Boomplay
tenpalace#1924 | 6a259fcd9 | Goaty | Cheating |
pinbrittle#1538 | 4955c179f | Moralmaser | Cheating | Cheating and disrupting lobbies
dollfly#4791 | 5ba449454 | Mari | Cheating | Spamming RPCs to crash lobbies
byechic#6270 | 91e0145f1 | (Contains n word) | Harassing a streamer with a slur in the IGN |
waiverfore#0496 | b493df896 | | Cheating in Syl's lobby |
whaleutter#4768 | 9e04dc5d5 | | Cheating in Syl's lobby | No name cheater
whimrecent#6558 | f8452a9d1 | | Cheating | no name cheater
whimrecent#6558 | f8452a9d1 | | Cheating | No name cheater
## Griefers, Toxic, harrasing, morons
setmolar#4374 | | 藏族顶针 | Toxic |
overtfeast#5802 | | 黑影 | Toxic |
@@ -126,4 +126,4 @@ primesnow#4272 | 65b98a6de | HiverXM | Toxic | The n word
tenthrope#3476 | | Oldishwire | Other |
greencorps#9587 | 4a403fe31 | ellsbells | Other |
finlucky#6381 | 433b2e672 | Wuwu | Other |
nattertame#9540 | 0abd54784 | Wuwu | Other | Alt account
nattertame#9540 | 0abd54784 | Wuwu | Other | Alt account
+10 -8
View File
@@ -482,7 +482,7 @@
"EvilTrackerInfo": "Track players by shifting",
"AntiAdminerInfo": "Track device usage",
"ArroganceInfo": "Your cooldown decreases with each kill you make",
"BomberInfo": "Shapeshift to explode",
"BomberInfo": "Vanish to explode",
"TrapsterInfo": "Start a killing chain",
"ScavengerInfo": "Your kills are unreportable",
"EvilGuesserInfo": "Guess roles in meetings to kill",
@@ -680,7 +680,7 @@
"NotAssignedInfo": "Error, report to host!!",
"SunnyboyInfo": "Shine, shine my sunshine!",
"BardInfo": "Poem's grace, murder's trace, a rhythmic dance in a dark embrace.",
"NukerInfo": "Shapeshift to nuke everyone",
"NukerInfo": "Vanish to nuke everyone",
"EngineerEHRInfoLong": "(Crewmates):\\nAs the Engineer, you may access the vents while comms are not sabotaged. Vents are disabled when they are sabotaged.",
"ScientistEHRInfoLong": "(Crewmates):\\nAs the Scientist, you have a portable tablet with the crew's vitals on it. Use this any way you'd like. Catching self-reports, extra intel on body age, etc.",
"ShapeshifterEHRInfoLong": "(Impostors):\\nAs the Shapeshifter, you have a shapeshifting ability that you may use to frame other crewmates. Just be aware that there is an egg while shifting, and the disguise is temporary.",
@@ -933,8 +933,8 @@
"DisablePlayerVotedMessage": "Disable 'X has voted. Y remaining.' Message in Meetings",
"LadderDeath": "Fall From Ladders",
"LadderDeathChance": "Fall To Death Chance",
"GuesserDoesntDieOnMisguess": "<color=#f3e304>Guesser Doesn't Die on Misguess</color>",
"CanGuessDuringDiscussionTime": "<color=#f3e304>Guessers Can Guess During Discussion Time</color>",
"GuesserDoesntDieOnMisguess": "Guesser Doesn't Die on Misguess",
"CanGuessDuringDiscussionTime": "Guessers Can Guess During Discussion Time",
"MisguessDeathReason": "'Misguess' Death Reason",
"YouCanGuessTitle": "<#00ffff>You can Guess!</color>",
"YouCanGuess": "Use the <b>/bt [player id] [role]</b> command to guess someone's role. You can see everyone's IDs next to their name, or type <b>/id</b>.",
@@ -1091,6 +1091,8 @@
"AutoMPollCommandCooldown": "Delay Before Auto Executing /mpoll (After Joining The Lobby)",
"AutoDraftStartCommandAfterJoin": "Auto Execute /draftstart After Joining The Lobby",
"AutoDraftStartCommandCooldown": "Delay Before Auto Executing /draftstart (After Joining The Lobby)",
"AutoReadyCheckCommandAfterJoin": "Auto Execute /readycheck After Joining The Lobby",
"AutoReadyCheckCommandCooldown": "Delay Before Auto Executing /readycheck (After Joining The Lobby)",
"EnterKeyToStartGame": "Begin the starting countdown by pressing the Enter key",
"RemovePetsAtDeadPlayers": "Remove pets from dead players",
"SeeEjectedRolesInMeeting": "See ejected roles in meetings",
@@ -1266,7 +1268,7 @@
"MenuTitle.Guessers": "★ Guesser Mode ★",
"MenuTitle.CTA": "★ Custom Team Assignment ★",
"MenuTitle.AFKDetection": "★ AFK Detection ★",
"ReadyCheckMessage": "The Host/an Admin is checking how many players are ready to start the game.\\nPlease type <b>/ready</b> to let the Host/Admins know you're not AFK.",
"ReadyCheckMessage": "The Host/a Staff is checking how many players are ready to start the game.\\nPlease type <b>/ready</b> to let the Host/Staff know you're not AFK.",
"ReadyCheckTitle": "<#ffff00>★ Ready Check ★</color>",
"EveryoneReadyTitle": "<#00ff00>Everyone is ready!</color>",
"PlayersNotReadyTitle": "<#ffff00><#ffab1b>{0}</color> players are not ready!</color> They are:",
@@ -2353,7 +2355,7 @@
"Message.NoDescription": "No description",
"Message.KickedByDenyName": "<b>{0}</b> was kicked because their name matched <b>{1}</b>",
"Message.BanedByBanList": "<b>{0}</b> was banned because they were banned in the past.",
"Message.BanedByEACList": "<b>{0}</b> has been banned because he is in EAC list of Banned people.",
"Message.BanedByEACList": "<b>{0}</b> has been banned because they're in the EAC list of Banned people.",
"Message.InvalidFriendCode": "<b>{0}</b> has been banned because they have an invalid friend code.",
"Message.DumpfileSaved": "The log file was successfully saved to the desktop, filename: {0}",
"Message.KickedByNoFriendCode": "<b>{0}</b> was kicked because their friend code does not exist.",
@@ -4422,7 +4424,7 @@
"HitmanLowKCD": "Lower Kill Cooldown",
"Sapper": "Sapper",
"SapperInfo": "Blow up Everyone with Timed Bombs!",
"SapperInfoLong": "(Impostors):\\nAs the Sapper, you can not kill with your kill button. Instead, you can pet/vanish to plant time bombs which explode after a specified delay (set by host), killing everyone nearby.\\n\\nNote: If you're in the radius of the explosion, you will die too!",
"SapperInfoLong": "(Impostors):\\nAs the Sapper, you can pet/vanish to plant time bombs which explode after a specified delay (set by host), killing everyone nearby.\\n\\nNote: If you're in the radius of the explosion, you will die too!",
"SapperRadius": "Bomb Explosion Radius",
"SapperCD": "Bomb Place Cooldown",
"SapperDelay": "Bomb Explode Delay",
@@ -10201,7 +10203,7 @@
"ForceEnd": "Aborted",
"EveryoneDied": "Everyone died",
"GameTimerEnded": "Game Time Limit Ended",
"ForceEndText": "The Host/an Admin has aborted the game",
"ForceEndText": "The Host/a Staff has aborted the game",
"BlackScreenFixCompleteNotify": "<#00ff00>Black Screen Fix Code Executed</color>",
"MinMaxModdedImpCountsSettingsChangedAuto": "<#ffff00><b>Modded Min/Max Impostors Automatically Set To </color><#ffffff>{0}</color></b>\\n<size=80%>Because you only changed the vanilla setting, which gets overridden by the modded ones.</size>",
"DiscoChangeInterval": "Disco Change Color Interval",