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

Merged
merged 202 commits into from
May 9, 2025
Merged

Conversation

impostor4291
Copy link
Contributor

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

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

@MargaretTheFool MargaretTheFool added the New Role/Add-on New role added label May 9, 2025
@MargaretTheFool MargaretTheFool merged commit 557775a into EnhancedNetwork:dev_2.3.0 May 9, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from Roles to Gamemodes in TOHE 2.3.0 Development May 9, 2025
@MargaretTheFool MargaretTheFool moved this from Gamemodes to Completed in TOHE 2.3.0 Development May 9, 2025
@impostor4291 impostor4291 deleted the narc branch May 11, 2025 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Role/Add-on New role added
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

2 participants