Skip to content

Narc(Betrayal Add-on) #1552

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

Open
wants to merge 195 commits into
base: dev_2.3.0
Choose a base branch
from

Conversation

impostor4291
Copy link
Contributor

Based on #1520(may close #1520 after merging this one)
(Phantom basis is still an issue...)

@impostor4291 impostor4291 marked this pull request as ready for review April 8, 2025 16:01
@impostor4291
Copy link
Contributor Author

i think it's ready

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 68 out of 70 changed files in this pull request and generated 1 comment.

Files not reviewed (2)
  • Resources/Lang/en_US.json: Language not supported
  • Resources/roleColor.json: Language not supported
Comments suppressed due to low confidence (2)

Modules/OptionHolder.cs:106

  • Changing 'RatesZeroOne' from private to public exposes internal implementation details; please confirm that this is an intentional design decision.
public enum RatesZeroOne

Patches/PlayerControlPatch.cs:1243

  • [nitpick] The updated condition incorporating 'NarcManager.IsNarcAssigned()' could unintentionally grant kill button access; please verify that this logic correctly restricts access only to appropriate roles.
if ((!player.Is(Custom_Team.Impostor) || NarcManager.IsNarcAssigned()) && player.CanUseKillButton() && !playerData.IsDead)

}

if (!RolesToSelect.Any()) return;
RolesToSelect = RolesToSelect.Shuffle().Shuffle().ToList();
Copy link
Preview

Copilot AI Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The double call to Shuffle() is likely redundant unless additional randomness is explicitly required; consider using a single Shuffle() call for clarity and efficiency.

Suggested change
RolesToSelect = RolesToSelect.Shuffle().Shuffle().ToList();
RolesToSelect = RolesToSelect.Shuffle().ToList();

Copilot uses AI. Check for mistakes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea.i want it to be more random

@impostor4291
Copy link
Contributor Author

Patches/PlayerControlPatch.cs:1243

  • [nitpick] The updated condition incorporating 'NarcManager.IsNarcAssigned()' could unintentionally grant kill button access; please verify that this logic correctly restricts access only to appropriate roles.
if ((!player.Is(Custom_Team.Impostor) || NarcManager.IsNarcAssigned()) && player.CanUseKillButton() && !playerData.IsDead)

if i dont do that ,when narc is in a game(all imp roles will be desync roles),the imps wont be able to kill

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant