Skip to content

Commit

Permalink
Fix for HQlessHumansLose Send to Chat
Browse files Browse the repository at this point in the history
- Swaps OBE FindBroadcastPlayer for newer SendChatMessageToAll method
  • Loading branch information
data-bomb committed Sep 6, 2024
1 parent 96dbf7c commit 31719f6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Si_HQlessHumansLose/Si_HQlessHumansLose.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]

Expand All @@ -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 + "</color> lost their " + rootStructureName, false);
HelperMethods.ReplyToCommand(HelperMethods.GetTeamColor(team) + team.TeamShortName + "</color> 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 + "</color> destroyed " + HelperMethods.GetTeamColor(team) + team.TeamShortName + "</color>'s " + rootStructureName, false);
HelperMethods.ReplyToCommand(HelperMethods.GetTeamColor(player) + player.PlayerName + "</color> destroyed " + HelperMethods.GetTeamColor(team) + team.TeamShortName + "</color>'s " + rootStructureName);
}

static String GetRootCriticalPrefix(Team team)
Expand Down

0 comments on commit 31719f6

Please sign in to comment.