Skip to content

Commit

Permalink
add bots to player counter
Browse files Browse the repository at this point in the history
update to latest css [.NET8]
  • Loading branch information
audiomaster99 authored Apr 27, 2024
1 parent 6039b17 commit d81d2d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions BombsiteAnnouncer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ private void OnTick(CCSPlayerController player)
ctNum = GetCurrentNumPlayers(CsTeam.CounterTerrorist);
ttNum = GetCurrentNumPlayers(CsTeam.Terrorist);

// determine site image
if (player.Team == CsTeam.CounterTerrorist)
{
color = "green";
Expand All @@ -86,8 +85,6 @@ private void OnTick(CCSPlayerController player)
color = "red";
message = Localizer["phrases.defend"];
}
ctNum = GetCurrentNumPlayers(CsTeam.CounterTerrorist);
ttNum = GetCurrentNumPlayers(CsTeam.Terrorist);
HandleCustomizedMessage();
player.PrintToCenterHtml(siteTextString + siteImageString + playerCounterString);
}
Expand Down Expand Up @@ -186,7 +183,7 @@ static bool IsAlive(CCSPlayerController player)
}
public static int GetCurrentNumPlayers(CsTeam? csTeam = null)
{
return Utilities.GetPlayers().Count(player => IsAlive(player) && IsValid(player) && IsConnected(player) && (csTeam == null || player.Team == csTeam));
return Utilities.GetPlayers().Count(player => IsAlive(player) && IsConnected(player) && (csTeam == null || player.Team == csTeam));
}
public void IsRetakesPluginInstalled()
{
Expand Down
6 changes: 3 additions & 3 deletions BombsiteAnnouncer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
<PublishDir>./bin/BombsiteAnnouncer/</PublishDir>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.198">
<PackageReference Include="CounterStrikeSharp.API" Version="*">
<PrivateAssets>none</PrivateAssets>
<ExcludeAssets>runtime</ExcludeAssets>
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<None Update="lang\**\*.*" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
</ItemGroup>
</Project>

0 comments on commit d81d2d8

Please sign in to comment.