Create new Example mods project and moved override example into it

This commit is contained in:
Chomp
2025-01-12 12:17:41 +00:00
parent 7ad447f0b9
commit e206e7c86c
5 changed files with 25 additions and 6 deletions
+14
View File
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Core\Core.csproj" />
</ItemGroup>
</Project>
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Core\Core.csproj" />
</ItemGroup>
</Project>
@@ -0,0 +1,26 @@
using Core.Annotations;
using Core.Models.Utils;
using Core.Servers;
using Core.Services;
using Core.Utils;
namespace ExampleMods.Mods.Override;
[Injectable(InjectableTypeOverride = typeof(Watermark))]
public class WatermarkOverride : Watermark
{
public WatermarkOverride(
ILogger logger,
ConfigServer configServer,
LocalisationService localisationService,
WatermarkLocale watermarkLocale
) : base(logger, configServer, localisationService, watermarkLocale)
{
}
public override void Initialize()
{
Console.WriteLine("This is a watermark mod override!");
base.Initialize();
}
}
+2
View File
@@ -0,0 +1,2 @@
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");