Remove legacy modloader code
This commit is contained in:
@@ -1,26 +0,0 @@
|
|||||||
using SPTarkov.DI.Annotations;
|
|
||||||
using SPTarkov.Server.Core.DI;
|
|
||||||
using SPTarkov.Server.Core.Models.External;
|
|
||||||
using SPTarkov.Server.Core.Models.Utils;
|
|
||||||
using SPTarkov.Server.Core.Utils;
|
|
||||||
|
|
||||||
namespace SPTarkov.Server.Core.Loaders;
|
|
||||||
|
|
||||||
[Obsolete("This mod loader is obsolete and will be removed in 4.1.0. See documentation in IPostDBLoadModAsync for more information.")]
|
|
||||||
[Injectable(TypePriority = OnLoadOrder.PostDBModLoader)]
|
|
||||||
public class PostDBModLoader(ISptLogger<PostDBModLoader> logger, IEnumerable<IPostDBLoadModAsync> postDbLoadMods) : IOnLoad
|
|
||||||
{
|
|
||||||
public async Task OnLoad()
|
|
||||||
{
|
|
||||||
if (ProgramStatics.MODS())
|
|
||||||
{
|
|
||||||
logger.Info("Loading PostDBMods...");
|
|
||||||
foreach (var postDbLoadMod in postDbLoadMods)
|
|
||||||
{
|
|
||||||
await postDbLoadMod.PostDBLoadAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
logger.Info("Finished loading PostDBMods...");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
using SPTarkov.DI.Annotations;
|
|
||||||
using SPTarkov.Server.Core.DI;
|
|
||||||
using SPTarkov.Server.Core.Models.External;
|
|
||||||
using SPTarkov.Server.Core.Models.Utils;
|
|
||||||
using SPTarkov.Server.Core.Utils;
|
|
||||||
|
|
||||||
namespace SPTarkov.Server.Core.Loaders;
|
|
||||||
|
|
||||||
[Obsolete("This mod loader is obsolete and will be removed in 4.1.0. See documentation in IPostSptLoadModAsync for more information.")]
|
|
||||||
[Injectable(TypePriority = OnLoadOrder.PostSptModLoader)]
|
|
||||||
public class PostSptModLoader(ISptLogger<PostSptModLoader> logger, IEnumerable<IPostSptLoadModAsync> postSptLoadMods) : IOnLoad
|
|
||||||
{
|
|
||||||
public async Task OnLoad()
|
|
||||||
{
|
|
||||||
if (ProgramStatics.MODS())
|
|
||||||
{
|
|
||||||
logger.Info("Loading PostSptMods...");
|
|
||||||
foreach (var postSptLoadMod in postSptLoadMods)
|
|
||||||
{
|
|
||||||
await postSptLoadMod.PostSptLoadAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
logger.Info("Finished loading PostSptMods...");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
namespace SPTarkov.Server.Core.Models.External;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// This interface used to be used in TS to load mods after the database finished loading.
|
|
||||||
/// This class is now deprecated and should not be used, see code example below for replacement.
|
|
||||||
/// </summary>
|
|
||||||
/// <code>
|
|
||||||
/// [Injectable(TypePriority = OnLoadOrder.Database + 1)]
|
|
||||||
/// public class MyMod : IOnLoad
|
|
||||||
/// {
|
|
||||||
/// // ... implementation
|
|
||||||
/// }
|
|
||||||
/// </code>
|
|
||||||
/// <remarks>
|
|
||||||
/// <b>DEPRECATED, see code example above for replacement!</b>
|
|
||||||
/// </remarks>
|
|
||||||
[Obsolete(
|
|
||||||
"This interface is obsolete and will be removed in 4.1.0, please use IOnLoad instead with the desired Injectable(TypePriority). See class documentation for examples."
|
|
||||||
)]
|
|
||||||
public interface IPostDBLoadModAsync
|
|
||||||
{
|
|
||||||
Task PostDBLoadAsync();
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
namespace SPTarkov.Server.Core.Models.External;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// This interface used to be used in TS to load mods after SPT finished loading.
|
|
||||||
/// This class is now deprecated and should not be used, see code example below for replacement.
|
|
||||||
/// </summary>
|
|
||||||
/// <code>
|
|
||||||
/// [Injectable(TypePriority = OnLoadOrder.RagfairCallbacks + 1)]
|
|
||||||
/// public class MyMod : IOnLoad
|
|
||||||
/// {
|
|
||||||
/// // ... implementation
|
|
||||||
/// }
|
|
||||||
/// </code>
|
|
||||||
/// <remarks>
|
|
||||||
/// <b>DEPRECATED, see code example above for replacement!</b>
|
|
||||||
/// </remarks>
|
|
||||||
[Obsolete(
|
|
||||||
"This interface is obsolete and will be removed in 4.1.0, please use IOnLoad instead with the desired Injectable(TypePriority). See class documentation for examples."
|
|
||||||
)]
|
|
||||||
public interface IPostSptLoadModAsync
|
|
||||||
{
|
|
||||||
Task PostSptLoadAsync();
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user