-
-
Notifications
You must be signed in to change notification settings - Fork 112
Narc shares guess access with Crewmates instead of Impostors #1572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev_2.3.0
Are you sure you want to change the base?
Narc shares guess access with Crewmates instead of Impostors #1572
Conversation
Modules/GuessManager.cs
Outdated
@@ -119,17 +119,17 @@ public static bool GuesserMsg(PlayerControl pc, string msg, bool isUI = false) | |||
pc.ShowInfoMessage(isUI, GetString("GuessDead")); | |||
return true; | |||
} | |||
if (!pc.Is(CustomRoles.NiceGuesser)) | |||
if (!pc.Is(CustomRoles.NiceGuesser) && !(pc.Is(CustomRoles.EvilGuesser) && pc.Is(CustomRoles.Narc))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if someone is evil guessser and not narc (which would also make them not be nice guesser), this would trigger because
!(F) && !(T && F)
T && !(F)
T && T
T
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
umm
@@ -243,7 +243,7 @@ public static bool GuesserMsg(PlayerControl pc, string msg, bool isUI = false) | |||
|
|||
if (!role.IsEnable() && !role.RoleExist(true) && Options.CanOnlyGuessEnabled.GetBool()) | |||
{ | |||
pc.ShowInfoMessage(isUI, string.Format(GetString("GuessRoleNotEnabled"), role.ToString())); | |||
pc.ShowInfoMessage(isUI, string.Format(GetString("GuessRoleNotEnabled"), GetString(role.ToString()))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this needed?
Modules/GuessManager.cs
Outdated
{ | ||
if (pc.GetCustomRole().IsCrewmate() && !Options.CrewmatesCanGuess.GetBool() && !pc.Is(CustomRoles.Guesser) && !pc.Is(CustomRoles.Judge)) | ||
if ((pc.Is(Custom_Team.Crewmate) || pc.Is(CustomRoles.Narc)) && !Options.CrewmatesCanGuess.GetBool() && !pc.Is(CustomRoles.Guesser) && !pc.Is(CustomRoles.Judge)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but this wont be triggered by non-narc evil guesser
nvm narc councillor will trigger this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds support for the Narc role sharing Crewmate guessing permissions instead of Impostors.
- Introduces a new
NarcEGCanGuessCrew
option and updates UI hiding logic inEvilGuesser
. - Extends
GuessManager
checks to includeNarc
in Crewmate/Impostor guess permission branches. - Adds a localization entry for the new option.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
Roles/Impostor/EvilGuesser.cs | Adds NarcEGCanGuessCrew option and updates tab/UI logic for Narc. |
Resources/Lang/en_US.json | Adds localization string for NarcEGCanGuessCrew . |
Modules/GuessManager.cs | Updates guess permission checks and meeting UI button logic to handle Narc. |
Comments suppressed due to low confidence (1)
Modules/GuessManager.cs:652
- This condition is unreachable because a player cannot simultaneously have the EvilGuesser and Narc roles. You’ll need to adjust the logic to target the intended role combination.
else if ((PlayerControl.LocalPlayer.GetCustomRole() is CustomRoles.EvilGuesser && PlayerControl.LocalPlayer.Is(CustomRoles.Narc)) && !Options.CrewmatesCanGuess.GetBool())
Resources/Lang/en_US.json
Outdated
@@ -1577,6 +1577,7 @@ | |||
"NarcHasCrewVision": "Narc Has <color=#8cffff>Crewmate</color> Vision", | |||
"MadmateCanBeNarc": "<color=#ff1919>Madmate</color> Roles Can Be Narc", | |||
"ImpsCanKillEachOther": "<color=#ff1919>Impostors</color> Can Kill Each Other", | |||
"NarcEGCanGuessCrew": "<color=#1e90ff>Narc</color> Evil Guesser Can Guess <color=#8cffff>Crewmate</color> Roles</color>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an extra closing tag at the end of this string. Remove the unmatched .
"NarcEGCanGuessCrew": "<color=#1e90ff>Narc</color> Evil Guesser Can Guess <color=#8cffff>Crewmate</color> Roles</color>", | |
"NarcEGCanGuessCrew": "<color=#1e90ff>Narc</color> Evil Guesser Can Guess <color=#8cffff>Crewmate</color> Roles", |
Copilot uses AI. Check for mistakes.
Modules/GuessManager.cs
Outdated
{ | ||
if (pc.GetCustomRole().IsCrewmate() && !Options.CrewmatesCanGuess.GetBool() && !pc.Is(CustomRoles.Guesser) && !pc.Is(CustomRoles.Judge)) | ||
if ((pc.Is(Custom_Team.Crewmate) || pc.Is(CustomRoles.Narc)) && !Options.CrewmatesCanGuess.GetBool()) | ||
{ // Don't ask me why this also checks Evil Guesser and Councillor. They can be Narc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] This informal comment is unclear and doesn’t explain the rationale. Consider removing it or replacing it with a concise explanation of why those roles need to be included.
{ // Don't ask me why this also checks Evil Guesser and Councillor. They can be Narc | |
{ // The roles "Evil Guesser" and "Councillor" are checked here because they can also be associated with the "Narc" role in certain game scenarios. |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a option to choose to share guesses with imp or crews
No description provided.