fix things i forgot to commit

This commit is contained in:
XtraCube committed 2025-02-28 10:17:39 -05:00
1 parent 669d5765e6
commit 2e0ecd95a6
2 files changed
+3 -3

No files matched your search

@@ -7,9 +7,9 @@ namespace MiraAPI.Example.GameOver;
public class NeutralKillerGameOver : CustomGameOver
{
public override bool VerifyCondition(PlayerControl playerControl)
public override bool VerifyCondition(PlayerControl playerControl, NetworkedPlayerInfo[] winners)
{
return playerControl.Data.Role is NeutralKillerRole;
return winners is [{ Role: NeutralKillerRole }];
}
public override void AfterEndGameSetup(EndGameManager endGameManager)
+1 -1
View File
@@ -48,7 +48,7 @@ public class CustomGameOverRpc(MiraApiPlugin plugin, uint id) : PlayerCustomRpc<
{
if (GameOverManager.TryGetGameOver(data.Reason, out var gameOver))
{
if (!gameOver.VerifyCondition(innerNetObject))
if (!gameOver.VerifyCondition(innerNetObject, [.. data.Winners]))
{
Logger<MiraApiPlugin>.Info($"Game over condition not met for {gameOver.GetType().Name}");
return;