From 2e0ecd95a6398e61f6b670cd9bc3ea61bc749810 Mon Sep 17 00:00:00 2001 From: XtraCube <72575280+XtraCube@users.noreply.github.com> Date: Fri, 28 Feb 2025 10:17:39 -0500 Subject: [PATCH] fix things i forgot to commit --- MiraAPI.Example/GameOver/NeutralKillerGameOver.cs | 4 ++-- MiraAPI/Networking/CustomGameOverRpc.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MiraAPI.Example/GameOver/NeutralKillerGameOver.cs b/MiraAPI.Example/GameOver/NeutralKillerGameOver.cs index f513e8d..351d593 100644 --- a/MiraAPI.Example/GameOver/NeutralKillerGameOver.cs +++ b/MiraAPI.Example/GameOver/NeutralKillerGameOver.cs @@ -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) diff --git a/MiraAPI/Networking/CustomGameOverRpc.cs b/MiraAPI/Networking/CustomGameOverRpc.cs index 978b992..34dbe6a 100644 --- a/MiraAPI/Networking/CustomGameOverRpc.cs +++ b/MiraAPI/Networking/CustomGameOverRpc.cs @@ -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.Info($"Game over condition not met for {gameOver.GetType().Name}"); return;