From 31719f6f843777eef04a5a48c826962cb99f4e33 Mon Sep 17 00:00:00 2001 From: data-bomb Date: Fri, 6 Sep 2024 15:33:08 -0700 Subject: [PATCH] Fix for HQlessHumansLose Send to Chat - Swaps OBE FindBroadcastPlayer for newer SendChatMessageToAll method --- Si_HQlessHumansLose/Si_HQlessHumansLose.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Si_HQlessHumansLose/Si_HQlessHumansLose.cs b/Si_HQlessHumansLose/Si_HQlessHumansLose.cs index 975e355..3a403a6 100644 --- a/Si_HQlessHumansLose/Si_HQlessHumansLose.cs +++ b/Si_HQlessHumansLose/Si_HQlessHumansLose.cs @@ -33,7 +33,7 @@ You should have received a copy of the GNU General Public License using System; using SilicaAdminMod; -[assembly: MelonInfo(typeof(HQlessHumansLose), "HQless Humans Lose", "1.3.9", "databomb", "https://github.com/data-bomb/Silica")] +[assembly: MelonInfo(typeof(HQlessHumansLose), "HQless Humans Lose", "1.3.10", "databomb", "https://github.com/data-bomb/Silica")] [assembly: MelonGame("Bohemia Interactive", "Silica")] [assembly: MelonOptionalDependencies("Admin Mod")] @@ -56,16 +56,14 @@ public override void OnInitializeMelon() public static void TeamLostMessage(Team team) { - Player broadcastPlayer = HelperMethods.FindBroadcastPlayer(); String rootStructureName = GetRootCriticalFullName(team); - broadcastPlayer.SendChatMessage(HelperMethods.chatPrefix + HelperMethods.GetTeamColor(team) + team.TeamShortName + " lost their " + rootStructureName, false); + HelperMethods.ReplyToCommand(HelperMethods.GetTeamColor(team) + team.TeamShortName + " lost their " + rootStructureName); } public static void TeamLostByPlayerMessage(Team team, Player player) { - Player broadcastPlayer = HelperMethods.FindBroadcastPlayer(); String rootStructureName = GetRootCriticalFullName(team); - broadcastPlayer.SendChatMessage(HelperMethods.chatPrefix + HelperMethods.GetTeamColor(player) + player.PlayerName + " destroyed " + HelperMethods.GetTeamColor(team) + team.TeamShortName + "'s " + rootStructureName, false); + HelperMethods.ReplyToCommand(HelperMethods.GetTeamColor(player) + player.PlayerName + " destroyed " + HelperMethods.GetTeamColor(team) + team.TeamShortName + "'s " + rootStructureName); } static String GetRootCriticalPrefix(Team team)