Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ jobs:
Copy-Item -Path "MapChooserSharp\bin\Release\net8.0\publish\MySqlConnector.dll" -Destination "artifacts-linux-x64-with-dependencies\plugins\MapChooserSharp\MySqlConnector.dll" -Force
Copy-Item -Path "MapChooserSharp\bin\Release\net8.0\publish\Npgsql.dll" -Destination "artifacts-windows-x64-with-dependencies\plugins\MapChooserSharp\Npgsql.dll" -Force
Copy-Item -Path "MapChooserSharp\bin\Release\net8.0\publish\Npgsql.dll" -Destination "artifacts-linux-x64-with-dependencies\plugins\MapChooserSharp\Npgsql.dll" -Force
Copy-Item -Path "MapChooserSharp\bin\Release\net8.0\publish\ZLinq.dll" -Destination "artifacts-windows-x64-with-dependencies\plugins\MapChooserSharp\ZLinq.dll" -Force
Copy-Item -Path "MapChooserSharp\bin\Release\net8.0\publish\ZLinq.dll" -Destination "artifacts-linux-x64-with-dependencies\plugins\MapChooserSharp\ZLinq.dll" -Force

- name: Copy runtime artifacts
run: |
Expand Down
1 change: 1 addition & 0 deletions MapChooserSharp/MapChooserSharp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
using Microsoft.Extensions.Logging;
using TNCSSPluginFoundation;

[assembly: ZLinq.ZLinqDropInAttribute("MapChooserSharp", ZLinq.DropInGenerateTypes.Everything)]
namespace MapChooserSharp;

[MinimumApiVersion(333)]
Expand Down
5 changes: 5 additions & 0 deletions MapChooserSharp/MapChooserSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.116" />
<PackageReference Include="TNCSSPluginFoundation" Version="0.4.1" />
<PackageReference Include="Tomlyn" Version="0.19.0" />
<PackageReference Include="ZLinq" Version="1.5.2" />
<PackageReference Include="ZLinq.DropInGenerator" Version="1.5.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<ProjectReference Include="..\MapChooserSharp.API\MapChooserSharp.API.csproj">
<Private>false</Private>
</ProjectReference>
Expand Down
1 change: 1 addition & 0 deletions MapChooserSharp/Modules/MapConfig/McsMapConfigProvider.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using MapChooserSharp.API.MapConfig;
using MapChooserSharp.Modules.MapConfig.Interfaces;
using ZLinq;

namespace MapChooserSharp.Modules.MapConfig;

Expand Down
1 change: 1 addition & 0 deletions MapChooserSharp/Modules/MapCycle/McsMapCycleCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using Microsoft.Extensions.Logging;
using TNCSSPluginFoundation.Models.Plugin;
using TNCSSPluginFoundation.Utils.Entity;
using ZLinq;

namespace MapChooserSharp.Modules.MapCycle;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using NativeVoteAPI.API;
using TNCSSPluginFoundation.Models.Plugin;
using TNCSSPluginFoundation.Utils.Entity;
using ZLinq;

namespace MapChooserSharp.Modules.MapCycle;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using TNCSSPluginFoundation.Models.Plugin;
using ZLinq;

namespace MapChooserSharp.Modules.MapCycle.Services;

Expand Down Expand Up @@ -135,7 +136,7 @@ private List<string> FindCfgsWithFilter(IMapConfig? mapConfig, McsMapConfigExecu
case McsMapConfigExecutionType.StartWithMach:
if (mcsMapConfigType == McsMapConfigType.Map)
{
cfgs.AddRange(_mapConfigs.Where(m => possibleConfigNames.First().StartsWith(m.Key)).Select(m => m.Value));
cfgs.AddRange(_mapConfigs.Where(m => possibleConfigNames.First().StartsWith(m.Key)).Select(m => m.Value).ToList());
}
else
{
Expand All @@ -146,7 +147,7 @@ private List<string> FindCfgsWithFilter(IMapConfig? mapConfig, McsMapConfigExecu
case McsMapConfigExecutionType.PartialMatch:
if (mcsMapConfigType == McsMapConfigType.Map)
{
cfgs.AddRange(_mapConfigs.Where(m => possibleConfigNames.First().Contains(m.Key)).Select(m => m.Value));
cfgs.AddRange(_mapConfigs.Where(m => possibleConfigNames.First().Contains(m.Key)).Select(m => m.Value).ToList());
}
else
{
Expand Down
1 change: 1 addition & 0 deletions MapChooserSharp/Modules/MapVote/McsMapVoteController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
using Microsoft.Extensions.Logging;
using TNCSSPluginFoundation.Models.Plugin;
using TNCSSPluginFoundation.Utils.Entity;
using ZLinq;
using Timer = CounterStrikeSharp.API.Modules.Timers.Timer;

namespace MapChooserSharp.Modules.MapVote;
Expand Down
1 change: 1 addition & 0 deletions MapChooserSharp/Modules/MapVote/McsMapVoteSoundPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Modules.Utils;
using MapChooserSharp.Modules.PluginConfig.Interfaces;
using ZLinq;

namespace MapChooserSharp.Modules.MapVote;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using MapChooserSharp.Modules.McsDatabase.Repositories.SqlProviders.Interfaces;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using ZLinq;

namespace MapChooserSharp.Modules.McsDatabase.Repositories;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using MapChooserSharp.Modules.McsDatabase.Repositories.SqlProviders.Interfaces;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using ZLinq;

namespace MapChooserSharp.Modules.McsDatabase.Repositories;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using Microsoft.Extensions.DependencyInjection;
using TNCSSPluginFoundation;
using TNCSSPluginFoundation.Interfaces;
using ZLinq;

namespace MapChooserSharp.Modules.McsMenu.NominationMenu.BuiltInHtml;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using MapChooserSharp.Modules.PluginConfig.Interfaces;
using Microsoft.Extensions.DependencyInjection;
using TNCSSPluginFoundation.Models.Plugin;
using ZLinq;

namespace MapChooserSharp.Modules.McsMenu.NominationMenu;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Microsoft.Extensions.DependencyInjection;
using TNCSSPluginFoundation;
using TNCSSPluginFoundation.Interfaces;
using ZLinq;

namespace MapChooserSharp.Modules.McsMenu.VoteMenu.BuiltInHtml;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using MapChooserSharp.Modules.PluginConfig.Interfaces;
using Microsoft.Extensions.DependencyInjection;
using TNCSSPluginFoundation.Models.Plugin;
using ZLinq;

namespace MapChooserSharp.Modules.McsMenu.VoteMenu;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using MapChooserSharp.Modules.Nomination.Interfaces;
using Microsoft.Extensions.DependencyInjection;
using TNCSSPluginFoundation.Models.Plugin;
using ZLinq;

namespace MapChooserSharp.Modules.Nomination;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
using Microsoft.Extensions.Logging;
using TNCSSPluginFoundation.Models.Plugin;
using TNCSSPluginFoundation.Utils.Entity;
using ZLinq;

namespace MapChooserSharp.Modules.Nomination;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using TNCSSPluginFoundation.Models.Plugin;
using Tomlyn;
using Tomlyn.Model;
using ZLinq;

namespace MapChooserSharp.Modules.PluginConfig;

Expand Down
Loading