diff --git a/src/EvoSC.Common/Interfaces/Services/IAuditService.cs b/src/EvoSC.Common/Interfaces/Services/IAuditService.cs
index e6748cb19..c65c54e7d 100644
--- a/src/EvoSC.Common/Interfaces/Services/IAuditService.cs
+++ b/src/EvoSC.Common/Interfaces/Services/IAuditService.cs
@@ -16,7 +16,7 @@ public interface IAuditService
/// A comment or description of the event.
/// Any properties or values associated with the event.
///
- internal Task LogAsync(string eventName, AuditEventStatus status, IPlayer actor, string comment,
+ internal Task LogAsync(string eventName, AuditEventStatus status, IPlayer? actor, string comment,
dynamic? properties);
///
diff --git a/src/EvoSC.Common/Interfaces/Services/IMatchSettingsService.cs b/src/EvoSC.Common/Interfaces/Services/IMatchSettingsService.cs
index a2232ca0e..9ad29a471 100644
--- a/src/EvoSC.Common/Interfaces/Services/IMatchSettingsService.cs
+++ b/src/EvoSC.Common/Interfaces/Services/IMatchSettingsService.cs
@@ -1,5 +1,6 @@
using EvoSC.Common.Interfaces.Models;
using EvoSC.Common.Interfaces.Util;
+using EvoSC.Common.Util.MatchSettings;
using EvoSC.Common.Util.MatchSettings.Builders;
using GbxRemoteNet.Exceptions;
@@ -90,4 +91,16 @@ public interface IMatchSettingsService
/// Thrown if the match settings file was not found.
///
public Task DeleteMatchSettingsAsync(string name);
+
+ ///
+ /// Get the name of the current mode script.
+ ///
+ ///
+ public Task GetCurrentScriptNameAsync();
+
+ ///
+ /// Get the mode of the current match settings.
+ ///
+ ///
+ public Task GetCurrentModeAsync();
}
diff --git a/src/EvoSC.Common/Services/AuditService.cs b/src/EvoSC.Common/Services/AuditService.cs
index ac049568b..385bfc352 100644
--- a/src/EvoSC.Common/Services/AuditService.cs
+++ b/src/EvoSC.Common/Services/AuditService.cs
@@ -6,6 +6,7 @@
using EvoSC.Common.Interfaces.Services;
using EvoSC.Common.Interfaces.Util.Auditing;
using EvoSC.Common.Models.Audit;
+using EvoSC.Common.Util;
using EvoSC.Common.Util.Auditing;
using EvoSC.Common.Util.EnumIdentifier;
using Microsoft.Extensions.Logging;
@@ -37,7 +38,7 @@ private void LogLogger(DbAuditRecord auditRecord)
);
}
- async Task IAuditService.LogAsync(string eventName, AuditEventStatus status, IPlayer actor, string comment,
+ async Task IAuditService.LogAsync(string eventName, AuditEventStatus status, IPlayer? actor, string comment,
dynamic? properties)
{
var serializedData = properties != null ? JsonSerializer.Serialize(properties) : null;
@@ -45,9 +46,9 @@ async Task IAuditService.LogAsync(string eventName, AuditEventStatus status, IPl
var auditRecord = new DbAuditRecord
{
Status = status,
- Actor = new DbPlayer(actor),
+ Actor = actor == null ? null : new DbPlayer(actor),
CreatedAt = DateTime.UtcNow,
- ActorId = actor.Id,
+ ActorId = actor?.Id ?? 0,
EventName = eventName,
Comment = comment,
Properties = serializedData
diff --git a/src/EvoSC.Common/Services/MatchSettingsService.cs b/src/EvoSC.Common/Services/MatchSettingsService.cs
index 083a0c001..d82751dbf 100644
--- a/src/EvoSC.Common/Services/MatchSettingsService.cs
+++ b/src/EvoSC.Common/Services/MatchSettingsService.cs
@@ -6,6 +6,7 @@
using EvoSC.Common.Interfaces.Util;
using EvoSC.Common.Models.Maps;
using EvoSC.Common.Util;
+using EvoSC.Common.Util.EnumIdentifier;
using EvoSC.Common.Util.MatchSettings;
using EvoSC.Common.Util.MatchSettings.Builders;
using GbxRemoteNet.Exceptions;
@@ -108,7 +109,19 @@ public async Task DeleteMatchSettingsAsync(string name)
var filePath = await GetFilePathAsync(name);
File.Delete(filePath);
}
-
+
+ public async Task GetCurrentScriptNameAsync()
+ {
+ var scriptInfo = await server.Remote.GetModeScriptInfoAsync();
+ return scriptInfo.Name;
+ }
+
+ public async Task GetCurrentModeAsync()
+ {
+ var scriptName = await GetCurrentScriptNameAsync();
+ return scriptName.ToEnumValue() ?? DefaultModeScriptName.Unknown;
+ }
+
private async Task GetFilePathAsync(string name)
{
var mapsDir = await server.GetMapsDirectoryAsync();
diff --git a/src/EvoSC.Common/Util/MatchSettings/DefaultModeScriptName.cs b/src/EvoSC.Common/Util/MatchSettings/DefaultModeScriptName.cs
index 7891a4eca..7d13d4e3a 100644
--- a/src/EvoSC.Common/Util/MatchSettings/DefaultModeScriptName.cs
+++ b/src/EvoSC.Common/Util/MatchSettings/DefaultModeScriptName.cs
@@ -24,9 +24,11 @@ public enum DefaultModeScriptName
Laps,
[Identifier(Name = "Trackmania/TM_Knockout_Online.Script.txt", NoPrefix = true)]
+ [Alias(Name = "ko")]
Knockout,
[Identifier(Name = "Trackmania/TM_TMWTTeams_Online.Script.txt", NoPrefix = true)]
+ [Alias(Name = "tmwt")]
TmwtTeams,
///
diff --git a/src/EvoSC.Manialinks/Templates/Containers/Window.mt b/src/EvoSC.Manialinks/Templates/Containers/Window.mt
index 0bc290415..ff084a35e 100644
--- a/src/EvoSC.Manialinks/Templates/Containers/Window.mt
+++ b/src/EvoSC.Manialinks/Templates/Containers/Window.mt
@@ -109,6 +109,7 @@ The window is designed to only be used once per Manialink.
y="-1.6"
data="{{ id }}"
size="small"
+ if="canClose"
/>
@@ -121,69 +122,6 @@ The window is designed to only be used once per Manialink.
>
-
-
-
diff --git a/src/EvoSC.Testing/EvoSC.Testing.csproj b/src/EvoSC.Testing/EvoSC.Testing.csproj
index 5adcb0a29..1c027c09c 100644
--- a/src/EvoSC.Testing/EvoSC.Testing.csproj
+++ b/src/EvoSC.Testing/EvoSC.Testing.csproj
@@ -7,6 +7,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
all
diff --git a/src/EvoSC/InternalModules.cs b/src/EvoSC/InternalModules.cs
index b083ebf6c..58bbe4458 100644
--- a/src/EvoSC/InternalModules.cs
+++ b/src/EvoSC/InternalModules.cs
@@ -31,9 +31,9 @@ namespace EvoSC;
public static class InternalModules
{
public static readonly Type[] Modules =
- {
+ [
+ //typeof(ExampleModule),
typeof(PlayerModule),
- typeof(ExampleModule),
typeof(MapsModule),
typeof(WorldRecordModule),
typeof(PlayerRecordsModule),
@@ -56,7 +56,7 @@ public static class InternalModules
typeof(LocalRecordsModule),
typeof(ForceTeamModule),
typeof(TeamSettingsModule)
- };
+ ];
///
/// Run any migrations from all the modules.
diff --git a/src/Modules/ExampleModule/ExampleController.cs b/src/Modules/ExampleModule/ExampleController.cs
index 33167c2d7..d420a19d4 100644
--- a/src/Modules/ExampleModule/ExampleController.cs
+++ b/src/Modules/ExampleModule/ExampleController.cs
@@ -77,13 +77,9 @@ public async Task RateMap(int rating)
[ChatCommand("test", "Some testing.")]
public async Task TestCommand()
{
- var mapList = await _server.Remote.GetMapListAsync(-1, 0);
-
- var maps = new List();
- foreach (var map in mapList)
- {
- maps.Add(await _mapService.GetMapByUidAsync(map.UId));
- }
+ var mode = await _matchSettings.GetCurrentModeAsync();
+
+ Console.WriteLine(mode);
}
[ChatCommand("rejoin", "Simulates the player joining the server.")]
diff --git a/src/Modules/LocalRecordsModule/Controllers/WidgetUpdateController.cs b/src/Modules/LocalRecordsModule/Controllers/WidgetUpdateController.cs
index 0eb819641..c9fe8ab0a 100644
--- a/src/Modules/LocalRecordsModule/Controllers/WidgetUpdateController.cs
+++ b/src/Modules/LocalRecordsModule/Controllers/WidgetUpdateController.cs
@@ -25,5 +25,13 @@ public async Task OnPlayerConnectAsync(object sender, PlayerConnectGbxEventArgs
public Task OnBeginMapAsync(object sender, MapGbxEventArgs args) => localRecords.ShowWidgetToAllAsync();
[Subscribe(PlayerRecordsEvent.PbRecord)]
- public Task OnPbAsync(object sender, PbRecordUpdateEventArgs args) => localRecords.UpdatePbAsync(args.Record);
+ public Task OnPbAsync(object sender, PbRecordUpdateEventArgs args)
+ {
+ if (args.Status == RecordUpdateStatus.NotUpdated)
+ {
+ return Task.CompletedTask;
+ }
+
+ return localRecords.UpdatePbAsync(args.Record);
+ }
}
diff --git a/src/Modules/LocalRecordsModule/Database/Repository/LocalRecordRepository.cs b/src/Modules/LocalRecordsModule/Database/Repository/LocalRecordRepository.cs
index f408a3c93..83dc9be9b 100644
--- a/src/Modules/LocalRecordsModule/Database/Repository/LocalRecordRepository.cs
+++ b/src/Modules/LocalRecordsModule/Database/Repository/LocalRecordRepository.cs
@@ -176,7 +176,7 @@ await NewLoadAll()
public async Task GetRecordOfPlayerInMapAsync(IPlayer player, IMap map) =>
await NewLoadAll()
- .FirstOrDefaultAsync(r => r.DbRecord.DbPlayer.Id == player.Id);
+ .FirstOrDefaultAsync(r => r.DbRecord.DbPlayer.Id == player.Id && r.DbMap.Id == map.Id);
public async Task DeleteRecordAsync(IPlayer player, IMap map)
{
diff --git a/src/Modules/LocalRecordsModule/Services/LocalRecordsService.cs b/src/Modules/LocalRecordsModule/Services/LocalRecordsService.cs
index 99cb5d163..dbf28ac3f 100644
--- a/src/Modules/LocalRecordsModule/Services/LocalRecordsService.cs
+++ b/src/Modules/LocalRecordsModule/Services/LocalRecordsService.cs
@@ -120,7 +120,7 @@ await server.InfoMessageAsync(new TextFormatter()
.ToString());
await ShowWidgetToAllAsync();
}
- else if (record.Score == oldRecord.Record.Score)
+ else if (record.Score == localRecord.Record.Score)
{
await server.InfoMessageAsync(new TextFormatter()
.AddText(record.Player.NickName)
diff --git a/src/Modules/OpenPlanetModule/Config/IOpenPlanetControlSettings.cs b/src/Modules/OpenPlanetModule/Config/IOpenPlanetControlSettings.cs
index 0acc58cfd..033dfbe5d 100644
--- a/src/Modules/OpenPlanetModule/Config/IOpenPlanetControlSettings.cs
+++ b/src/Modules/OpenPlanetModule/Config/IOpenPlanetControlSettings.cs
@@ -2,6 +2,7 @@
using Config.Net;
using EvoSC.Modules.Attributes;
using EvoSC.Modules.Official.OpenPlanetModule.Models;
+using LinqToDB.Common;
namespace EvoSC.Modules.Official.OpenPlanetModule.Config;
@@ -29,6 +30,12 @@ public interface IOpenPlanetControlSettings
[Option(DefaultValue = true), Description("Allow the use of openplanet. If false, no signature mode is allowed.")]
public bool AllowOpenplanet { get; set; }
- [Option(DefaultValue = "1.25.45"), Description("The minimum required OpenPlanet version to play on this server.")]
+ [Option(DefaultValue = "1.26.25"), Description("The minimum required OpenPlanet version to play on this server.")]
public Version MinimumRequiredVersion { get; set; }
+
+ [Option(DefaultValue = true), Description("Enable auditing of all checks.")]
+ public bool AuditAllChecks { get; set; }
+
+ [Option(DefaultValue = true), Description("Enable auditing of players that got jailed.")]
+ public bool AuditJails { get; set; }
}
diff --git a/src/Modules/OpenPlanetModule/Controllers/OpenPlanetControlManialinkController.cs b/src/Modules/OpenPlanetModule/Controllers/OpenPlanetControlManialinkController.cs
index 58853a442..ea5044a9d 100644
--- a/src/Modules/OpenPlanetModule/Controllers/OpenPlanetControlManialinkController.cs
+++ b/src/Modules/OpenPlanetModule/Controllers/OpenPlanetControlManialinkController.cs
@@ -3,6 +3,8 @@
using EvoSC.Common.Util;
using EvoSC.Manialinks;
using EvoSC.Manialinks.Attributes;
+using EvoSC.Modules.Official.OpenPlanetModule.Config;
+using EvoSC.Modules.Official.OpenPlanetModule.Events;
using EvoSC.Modules.Official.OpenPlanetModule.Interfaces;
using EvoSC.Modules.Official.OpenPlanetModule.Interfaces.Models;
@@ -11,7 +13,7 @@ namespace EvoSC.Modules.Official.OpenPlanetModule.Controllers;
[Controller]
[ManialinkRoute(Route = "OpenPlanetActions")]
public class OpenPlanetControlManialinkController(IOpenPlanetControlService opControl, IServerClient server,
- IOpenPlanetTrackerService trackerService)
+ IOpenPlanetTrackerService trackerService, IOpenPlanetScheduler scheduler)
: ManialinkController
{
public async Task CheckAsync(IOpenPlanetInfo openPlanetInfo)
@@ -20,5 +22,13 @@ public async Task CheckAsync(IOpenPlanetInfo openPlanetInfo)
trackerService.AddOrUpdatePlayer(Context.Player, openPlanetInfo);
}
- public Task DisconnectAsync() => server.Remote.KickAsync(Context.Player.GetLogin());
+ public async Task DisconnectAsync()
+ {
+ await server.Remote.KickAsync(Context.Player.GetLogin());
+
+ if (scheduler.PlayerIsScheduledForKick(Context.Player))
+ {
+ scheduler.UnScheduleKickPlayer(Context.Player);
+ }
+ }
}
diff --git a/src/Modules/OpenPlanetModule/Events/OpAuditEvents.cs b/src/Modules/OpenPlanetModule/Events/OpAuditEvents.cs
new file mode 100644
index 000000000..f99321028
--- /dev/null
+++ b/src/Modules/OpenPlanetModule/Events/OpAuditEvents.cs
@@ -0,0 +1,12 @@
+using EvoSC.Common.Util.EnumIdentifier;
+
+namespace EvoSC.Modules.Official.OpenPlanetModule.Events;
+
+public enum OpAuditEvents
+{
+ [Identifier(Name = "OpenPlanet:SignatureModeCheck")]
+ SignatureModeCheck,
+
+ [Identifier(Name = "OpenPlanet:PlayerJailed")]
+ PlayerJailed
+}
diff --git a/src/Modules/OpenPlanetModule/Services/OpenPlanetControlService.cs b/src/Modules/OpenPlanetModule/Services/OpenPlanetControlService.cs
index 9e6afbf95..3169c3a44 100644
--- a/src/Modules/OpenPlanetModule/Services/OpenPlanetControlService.cs
+++ b/src/Modules/OpenPlanetModule/Services/OpenPlanetControlService.cs
@@ -7,6 +7,7 @@
using EvoSC.Common.Util;
using EvoSC.Manialinks.Interfaces;
using EvoSC.Modules.Official.OpenPlanetModule.Config;
+using EvoSC.Modules.Official.OpenPlanetModule.Events;
using EvoSC.Modules.Official.OpenPlanetModule.Interfaces;
using EvoSC.Modules.Official.OpenPlanetModule.Interfaces.Models;
using EvoSC.Modules.Official.OpenPlanetModule.Models;
@@ -18,7 +19,7 @@ namespace EvoSC.Modules.Official.OpenPlanetModule.Services;
public class OpenPlanetControlService(ILogger logger, IPermissionManager permissions,
IOpenPlanetControlSettings opcSettings, IManialinkManager manialinks, IServerClient server,
IOpenPlanetScheduler scheduler,
- Locale locale)
+ Locale locale, IAuditService auditService)
: IOpenPlanetControlService
{
private readonly dynamic _locale = locale;
@@ -27,6 +28,15 @@ public async Task VerifySignatureModeAsync(IPlayer player, IOpenPlanetInfo playe
{
logger.LogDebug("Verifying OpenPlanet for Player {Player}", player.AccountId);
+ if (opcSettings.AuditAllChecks)
+ {
+ await auditService.NewEvent(OpAuditEvents.SignatureModeCheck)
+ .HavingProperties(new { Player = player, OpenPlanetData = playerOpInfo })
+ .Comment("OpenPlanet state checked for player.")
+ .Info()
+ .LogAsync();
+ }
+
if (!playerOpInfo.IsOpenPlanet)
{
await ReleasePlayerAsync(player);
@@ -74,6 +84,14 @@ public async Task VerifySignatureModeAsync(IPlayer player, IOpenPlanetInfo playe
private async Task JailPlayerAsync(IPlayer player, OpJailReason reason)
{
+ if (opcSettings.AuditJails)
+ {
+ await auditService.NewEvent(OpAuditEvents.PlayerJailed)
+ .HavingProperties(new { Player = player, Reason = reason })
+ .Success()
+ .LogAsync("Player jailed.");
+ }
+
if (scheduler.PlayerIsScheduledForKick(player))
{
return;
diff --git a/src/Modules/OpenPlanetModule/Templates/DetectOP.mt b/src/Modules/OpenPlanetModule/Templates/DetectOP.mt
index 572043386..0881914fb 100644
--- a/src/Modules/OpenPlanetModule/Templates/DetectOP.mt
+++ b/src/Modules/OpenPlanetModule/Templates/DetectOP.mt
@@ -31,8 +31,11 @@
*** OnLoop ***
***
- if (lastTime + {{ config.CheckInterval }} <= Now && lastToolInfo != System.ExtraTool_Info) {
- CheckOpenPlanet();
+ if (lastTime + {{ config.CheckInterval }} <= Now) {
+ if (lastToolInfo != System.ExtraTool_Info) {
+ CheckOpenPlanet();
+ }
+
lastTime = Now;
lastToolInfo = System.ExtraTool_Info;
}
diff --git a/src/Modules/OpenPlanetModule/Templates/WarningWindow.mt b/src/Modules/OpenPlanetModule/Templates/WarningWindow.mt
index 927d7dbfb..348036115 100644
--- a/src/Modules/OpenPlanetModule/Templates/WarningWindow.mt
+++ b/src/Modules/OpenPlanetModule/Templates/WarningWindow.mt
@@ -54,7 +54,7 @@
-
+
diff --git a/src/Modules/OpenPlanetModule/info.toml b/src/Modules/OpenPlanetModule/info.toml
index 1d7a52187..4cc54cfc0 100644
--- a/src/Modules/OpenPlanetModule/info.toml
+++ b/src/Modules/OpenPlanetModule/info.toml
@@ -6,6 +6,6 @@ title = "OpenPlanet Module"
# A short description of what the module is and does
summary = "A module for handling OpenPlanet features such as restricting signature modes and BetterChat support."
# The current version of this module, using SEMVER
-version = "1.0.0"
+version = "1.1.0"
# The name of the author that created this module
author = "Evo"
diff --git a/tests/EvoSC.CLI.Tests/EvoSC.CLI.Tests.csproj b/tests/EvoSC.CLI.Tests/EvoSC.CLI.Tests.csproj
index d428c99d4..93ed25614 100644
--- a/tests/EvoSC.CLI.Tests/EvoSC.CLI.Tests.csproj
+++ b/tests/EvoSC.CLI.Tests/EvoSC.CLI.Tests.csproj
@@ -8,6 +8,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
all
diff --git a/tests/EvoSC.Commands.Tests/EvoSC.Commands.Tests.csproj b/tests/EvoSC.Commands.Tests/EvoSC.Commands.Tests.csproj
index 6b942a975..834bc8e2f 100644
--- a/tests/EvoSC.Commands.Tests/EvoSC.Commands.Tests.csproj
+++ b/tests/EvoSC.Commands.Tests/EvoSC.Commands.Tests.csproj
@@ -8,6 +8,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
all
diff --git a/tests/EvoSC.Common.Tests/EvoSC.Common.Tests.csproj b/tests/EvoSC.Common.Tests/EvoSC.Common.Tests.csproj
index a298b4ccc..094c9e9cd 100644
--- a/tests/EvoSC.Common.Tests/EvoSC.Common.Tests.csproj
+++ b/tests/EvoSC.Common.Tests/EvoSC.Common.Tests.csproj
@@ -8,6 +8,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/tests/EvoSC.Manialinks.Tests/EvoSC.Manialinks.Tests.csproj b/tests/EvoSC.Manialinks.Tests/EvoSC.Manialinks.Tests.csproj
index 4a5f4eb6e..d4937fcf6 100644
--- a/tests/EvoSC.Manialinks.Tests/EvoSC.Manialinks.Tests.csproj
+++ b/tests/EvoSC.Manialinks.Tests/EvoSC.Manialinks.Tests.csproj
@@ -9,6 +9,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
all
diff --git a/tests/EvoSC.Testing.Tests/EvoSC.Testing.Tests.csproj b/tests/EvoSC.Testing.Tests/EvoSC.Testing.Tests.csproj
index 8ceacb16d..bdcacb609 100644
--- a/tests/EvoSC.Testing.Tests/EvoSC.Testing.Tests.csproj
+++ b/tests/EvoSC.Testing.Tests/EvoSC.Testing.Tests.csproj
@@ -10,6 +10,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
all
diff --git a/tests/EvoSC.Tests/EvoSC.Tests.csproj b/tests/EvoSC.Tests/EvoSC.Tests.csproj
index 907dd812e..339a04718 100644
--- a/tests/EvoSC.Tests/EvoSC.Tests.csproj
+++ b/tests/EvoSC.Tests/EvoSC.Tests.csproj
@@ -8,6 +8,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/tests/Modules/ASayModule.Tests/ASayModule.Tests.csproj b/tests/Modules/ASayModule.Tests/ASayModule.Tests.csproj
index ed5b14ac3..5d98e32c5 100644
--- a/tests/Modules/ASayModule.Tests/ASayModule.Tests.csproj
+++ b/tests/Modules/ASayModule.Tests/ASayModule.Tests.csproj
@@ -11,6 +11,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/tests/Modules/CurrentMapModule.Tests/CurrentMapModule.Tests.csproj b/tests/Modules/CurrentMapModule.Tests/CurrentMapModule.Tests.csproj
index 78e1dfc16..edccfe6de 100644
--- a/tests/Modules/CurrentMapModule.Tests/CurrentMapModule.Tests.csproj
+++ b/tests/Modules/CurrentMapModule.Tests/CurrentMapModule.Tests.csproj
@@ -9,6 +9,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/tests/Modules/FastestCp.Tests/FastestCp.Tests.csproj b/tests/Modules/FastestCp.Tests/FastestCp.Tests.csproj
index 78c648182..13a687d91 100644
--- a/tests/Modules/FastestCp.Tests/FastestCp.Tests.csproj
+++ b/tests/Modules/FastestCp.Tests/FastestCp.Tests.csproj
@@ -9,6 +9,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/tests/Modules/ForceTeamModule.Tests/ForceTeamModule.Tests.csproj b/tests/Modules/ForceTeamModule.Tests/ForceTeamModule.Tests.csproj
index b40aeb54e..fee4a00ac 100644
--- a/tests/Modules/ForceTeamModule.Tests/ForceTeamModule.Tests.csproj
+++ b/tests/Modules/ForceTeamModule.Tests/ForceTeamModule.Tests.csproj
@@ -10,6 +10,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/tests/Modules/LocalRecordsModule.Tests/LocalRecordsModule.Tests.csproj b/tests/Modules/LocalRecordsModule.Tests/LocalRecordsModule.Tests.csproj
index ae41820e7..1b3c000fd 100644
--- a/tests/Modules/LocalRecordsModule.Tests/LocalRecordsModule.Tests.csproj
+++ b/tests/Modules/LocalRecordsModule.Tests/LocalRecordsModule.Tests.csproj
@@ -10,6 +10,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/tests/Modules/MapListModule.Tests/MapListModule.Tests.csproj b/tests/Modules/MapListModule.Tests/MapListModule.Tests.csproj
index 478b4ee96..219f19bb8 100644
--- a/tests/Modules/MapListModule.Tests/MapListModule.Tests.csproj
+++ b/tests/Modules/MapListModule.Tests/MapListModule.Tests.csproj
@@ -11,6 +11,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/tests/Modules/MapQueueModuleTests/MapQueueModuleTests.csproj b/tests/Modules/MapQueueModuleTests/MapQueueModuleTests.csproj
index a1b6670c6..35c9bb338 100644
--- a/tests/Modules/MapQueueModuleTests/MapQueueModuleTests.csproj
+++ b/tests/Modules/MapQueueModuleTests/MapQueueModuleTests.csproj
@@ -11,6 +11,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/tests/Modules/MapsModule.Tests/MapsModule.Tests.csproj b/tests/Modules/MapsModule.Tests/MapsModule.Tests.csproj
index a8d287d31..b4ed050ea 100644
--- a/tests/Modules/MapsModule.Tests/MapsModule.Tests.csproj
+++ b/tests/Modules/MapsModule.Tests/MapsModule.Tests.csproj
@@ -11,6 +11,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
all
diff --git a/tests/Modules/MatchManagerModule.Tests/MatchManagerModule.Tests.csproj b/tests/Modules/MatchManagerModule.Tests/MatchManagerModule.Tests.csproj
index 85a98614d..fa2b62f95 100644
--- a/tests/Modules/MatchManagerModule.Tests/MatchManagerModule.Tests.csproj
+++ b/tests/Modules/MatchManagerModule.Tests/MatchManagerModule.Tests.csproj
@@ -10,6 +10,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/tests/Modules/MatchReadyModule.Tests/MatchReadyModule.Tests.csproj b/tests/Modules/MatchReadyModule.Tests/MatchReadyModule.Tests.csproj
index 4f029621e..2af8e0a9d 100644
--- a/tests/Modules/MatchReadyModule.Tests/MatchReadyModule.Tests.csproj
+++ b/tests/Modules/MatchReadyModule.Tests/MatchReadyModule.Tests.csproj
@@ -9,6 +9,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/tests/Modules/MatchTrackerModule.Tests/MatchTrackerModule.Tests.csproj b/tests/Modules/MatchTrackerModule.Tests/MatchTrackerModule.Tests.csproj
index 60a5aa63c..1f75d4947 100644
--- a/tests/Modules/MatchTrackerModule.Tests/MatchTrackerModule.Tests.csproj
+++ b/tests/Modules/MatchTrackerModule.Tests/MatchTrackerModule.Tests.csproj
@@ -11,6 +11,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/tests/Modules/MotdModule.Tests/MotdModule.Tests.csproj b/tests/Modules/MotdModule.Tests/MotdModule.Tests.csproj
index 078a6fa64..37982b1de 100644
--- a/tests/Modules/MotdModule.Tests/MotdModule.Tests.csproj
+++ b/tests/Modules/MotdModule.Tests/MotdModule.Tests.csproj
@@ -10,6 +10,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/tests/Modules/NextMapModule.Tests/NextMapModule.Tests.csproj b/tests/Modules/NextMapModule.Tests/NextMapModule.Tests.csproj
index 8a0cf66e8..2910f0a84 100644
--- a/tests/Modules/NextMapModule.Tests/NextMapModule.Tests.csproj
+++ b/tests/Modules/NextMapModule.Tests/NextMapModule.Tests.csproj
@@ -11,6 +11,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
all
diff --git a/tests/Modules/OpenPlanetModule.Tests/Controllers/OpenPlanetControlManialinkControllerTests.cs b/tests/Modules/OpenPlanetModule.Tests/Controllers/OpenPlanetControlManialinkControllerTests.cs
index b5a7eab1c..43539d215 100644
--- a/tests/Modules/OpenPlanetModule.Tests/Controllers/OpenPlanetControlManialinkControllerTests.cs
+++ b/tests/Modules/OpenPlanetModule.Tests/Controllers/OpenPlanetControlManialinkControllerTests.cs
@@ -20,12 +20,13 @@ public class OpenPlanetControlManialinkControllerTests : ManialinkControllerTest
private readonly Mock _controlService = new();
private readonly (Mock Server, Mock Client) _server = Mocking.NewServerClientMock();
private readonly Mock _trackerService = new();
+ private readonly Mock _scheduler = new();
public OpenPlanetControlManialinkControllerTests()
{
_player.Setup(p => p.AccountId).Returns(PlayerAccountId);
- InitMock(_player.Object, _actionContext.Object, _controlService, _server.Item1, _trackerService);
+ InitMock(_player.Object, _actionContext.Object, _controlService, _server.Item1, _trackerService, _scheduler);
}
[Fact]
diff --git a/tests/Modules/OpenPlanetModule.Tests/OpenPlanetModule.Tests.csproj b/tests/Modules/OpenPlanetModule.Tests/OpenPlanetModule.Tests.csproj
index b72b7e922..6c8e06020 100644
--- a/tests/Modules/OpenPlanetModule.Tests/OpenPlanetModule.Tests.csproj
+++ b/tests/Modules/OpenPlanetModule.Tests/OpenPlanetModule.Tests.csproj
@@ -11,6 +11,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/tests/Modules/OpenPlanetModule.Tests/Services/OpenPlanetControlServiceTests.cs b/tests/Modules/OpenPlanetModule.Tests/Services/OpenPlanetControlServiceTests.cs
index fe48fa0e3..35ee47a69 100644
--- a/tests/Modules/OpenPlanetModule.Tests/Services/OpenPlanetControlServiceTests.cs
+++ b/tests/Modules/OpenPlanetModule.Tests/Services/OpenPlanetControlServiceTests.cs
@@ -30,6 +30,7 @@ public class OpenPlanetControlServiceTests
Mock Manialinks,
(Mock Client, Mock Remote) Server,
Mock Scheduler,
+ Mock AuditService,
ControllerContextMock Context
) NewServiceMock()
{
@@ -40,6 +41,7 @@ ControllerContextMock Context
var manialinks = new Mock();
var server = Mocking.NewServerClientMock();
var scheduler = new Mock();
+ var auditService = new Mock();
var actionContext = new Mock();
var context =
@@ -48,7 +50,7 @@ ControllerContextMock Context
var locale = Mocking.NewLocaleMock(contextService.Object);
var controlService = new OpenPlanetControlService(logger.Object, permissions.Object, settings.Object,
- manialinks.Object, server.Client.Object, scheduler.Object, locale);
+ manialinks.Object, server.Client.Object, scheduler.Object, locale, auditService.Object);
player.Setup(m => m.AccountId).Returns(PlayerAccountId);
@@ -61,6 +63,7 @@ ControllerContextMock Context
manialinks,
server,
scheduler,
+ auditService,
context
);
}
diff --git a/tests/Modules/Player.Tests/Player.Tests.csproj b/tests/Modules/Player.Tests/Player.Tests.csproj
index bc28570ad..c41b1ca79 100644
--- a/tests/Modules/Player.Tests/Player.Tests.csproj
+++ b/tests/Modules/Player.Tests/Player.Tests.csproj
@@ -11,6 +11,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
all
diff --git a/tests/Modules/SetName.Tests/SetName.Tests.csproj b/tests/Modules/SetName.Tests/SetName.Tests.csproj
index 471e9dbe9..8b960749d 100644
--- a/tests/Modules/SetName.Tests/SetName.Tests.csproj
+++ b/tests/Modules/SetName.Tests/SetName.Tests.csproj
@@ -11,6 +11,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
all
diff --git a/tests/Modules/TeamSettingsModule.Tests/TeamSettingsModule.Tests.csproj b/tests/Modules/TeamSettingsModule.Tests/TeamSettingsModule.Tests.csproj
index 71c7eb6fb..5a3aa91d9 100644
--- a/tests/Modules/TeamSettingsModule.Tests/TeamSettingsModule.Tests.csproj
+++ b/tests/Modules/TeamSettingsModule.Tests/TeamSettingsModule.Tests.csproj
@@ -11,6 +11,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+