Merge pull request #539 from CJ-SPT/test-mod

Intoduce test mod and restructure test suites into their own solution folder
This commit is contained in:
Cj
2025-08-09 15:26:06 -04:00
committed by GitHub
parent dd67098734
commit c16c988fda
25 changed files with 92 additions and 22 deletions
View File
+32
View File
@@ -0,0 +1,32 @@
using SPTarkov.DI.Annotations;
using SPTarkov.Server.Core.DI;
using SPTarkov.Server.Core.Models.Spt.Mod;
using SPTarkov.Server.Core.Models.Utils;
namespace TestMod;
public record TestModMetadata : AbstractModMetadata
{
public override string ModGuid { get; init; } = "com.sp-tarkov.test-mod";
public override string Name { get; init; } = "test-mod";
public override string Author { get; init; } = "SPTarkov";
public override List<string>? Contributors { get; set; }
public override string Version { get; init; } = "1.0.0";
public override string SptVersion { get; init; } = "4.0.0";
public override List<string>? LoadBefore { get; set; }
public override List<string>? LoadAfter { get; set; }
public override List<string>? Incompatibilities { get; set; }
public override Dictionary<string, string>? ModDependencies { get; set; }
public override string? Url { get; set; }
public override bool? IsBundleMod { get; set; }
public override string? License { get; init; } = "MIT";
}
[Injectable(TypePriority = OnLoadOrder.PostDBModLoader + 1)]
public class TestMod(ISptLogger<TestMod> logger) : IOnLoad
{
public Task OnLoad()
{
return Task.CompletedTask;
}
}
+25
View File
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Build.props" />
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Libraries\SPTarkov.Common\SPTarkov.Common.csproj" />
<ProjectReference Include="..\..\Libraries\SPTarkov.DI\SPTarkov.DI.csproj" />
<ProjectReference Include="..\..\Libraries\SPTarkov.Reflection\SPTarkov.Reflection.csproj" />
<ProjectReference Include="..\..\Libraries\SPTarkov.Server.Assets\SPTarkov.Server.Assets.csproj" />
<ProjectReference Include="..\..\Libraries\SPTarkov.Server.Core\SPTarkov.Server.Core.csproj" />
</ItemGroup>
<Target Name="CopyToServer" AfterTargets="PostBuildEvent">
<ItemGroup>
<OutputDLL Include="$(ProjectDir)$(OutDir)$(TargetName).dll" />
<Resources Include="$(ProjectDir)Resources\**\*.*" />
</ItemGroup>
<!-- Copies the output dll -->
<Copy SourceFiles="@(OutputDLL);" DestinationFolder="$(SolutionDir)\SPTarkov.Server\bin\$(Configuration)\net9.0\user\mods\TestMod" />
<Copy
SourceFiles="@(Resources);"
DestinationFolder="$(SolutionDir)\SPTarkov.Server\bin\$(Configuration)\net9.0\user\mods\TestMod\Resources\%(RecursiveDir)"
/>
</Target>
</Project>