From 4eecb485c631592625dbb23c30ee54f835ff34a6 Mon Sep 17 00:00:00 2001 From: Archangel Date: Wed, 5 Nov 2025 14:41:28 +0100 Subject: [PATCH] Mark various removed implementations as obsolete --- Libraries/SPTarkov.Server.Core/DI/ServiceLocator.cs | 2 ++ Libraries/SPTarkov.Server.Core/Servers/SaveServer.cs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Libraries/SPTarkov.Server.Core/DI/ServiceLocator.cs b/Libraries/SPTarkov.Server.Core/DI/ServiceLocator.cs index a2265fa9..1bc77c17 100644 --- a/Libraries/SPTarkov.Server.Core/DI/ServiceLocator.cs +++ b/Libraries/SPTarkov.Server.Core/DI/ServiceLocator.cs @@ -6,8 +6,10 @@ /// /// This should not be used at all when having direct access to DI. /// +[Obsolete("This will be removed in the next version of SPT in favor of DI injecting patches")] public static class ServiceLocator { + [Obsolete("This will be removed in the next version of SPT in favor of DI injecting patches")] public static IServiceProvider ServiceProvider { get; private set; } internal static void SetServiceProvider(IServiceProvider provider) diff --git a/Libraries/SPTarkov.Server.Core/Servers/SaveServer.cs b/Libraries/SPTarkov.Server.Core/Servers/SaveServer.cs index 4f504f2a..e18b18c9 100644 --- a/Libraries/SPTarkov.Server.Core/Servers/SaveServer.cs +++ b/Libraries/SPTarkov.Server.Core/Servers/SaveServer.cs @@ -31,6 +31,7 @@ public class SaveServer( protected const string profileFilepath = "user/profiles/"; // onLoad = require("../bindings/SaveLoad"); + [Obsolete("This will be removed in the next version of SPT")] protected readonly Dictionary> onBeforeSaveCallbacks = new(); protected readonly ConcurrentDictionary profiles = new(); @@ -42,6 +43,7 @@ public class SaveServer( /// /// ID for the save callback /// Callback to execute prior to running SaveServer.saveProfile() + [Obsolete("This will be removed in the next version of SPT")] public void AddBeforeSaveCallback(string id, Func callback) { onBeforeSaveCallbacks[id] = callback; @@ -51,6 +53,7 @@ public class SaveServer( /// Remove a callback from being executed prior to saving profile in SaveServer.saveProfile() /// /// ID of Callback to remove + [Obsolete("This will be removed in the next version of SPT")] public void RemoveBeforeSaveCallback(string id) { onBeforeSaveCallbacks.Remove(id);