Merge branch 'develop' of https://github.com/sp-tarkov/server-csharp into develop
This commit is contained in:
@@ -3,6 +3,7 @@ namespace SPTarkov.Reflection.Patching;
|
||||
/// <summary>
|
||||
/// Cache of active patches for mod developers to use for compatibility reasons
|
||||
/// </summary>
|
||||
[Obsolete("Patches will be injectable through IEnumerable<IRuntimePatch> in SPT 4.1, making this redundant")]
|
||||
public static class ModPatchCache
|
||||
{
|
||||
private static readonly List<AbstractPatch> _activePatches = [];
|
||||
@@ -22,6 +23,7 @@ public static class ModPatchCache
|
||||
/// <remarks>
|
||||
/// This should never be called before PreSptLoad is completed, otherwise could be empty.
|
||||
/// </remarks>
|
||||
[Obsolete("Patches will be injectable through IEnumerable<IRuntimePatch> in SPT 4.1, making this redundant")]
|
||||
public static IReadOnlyList<AbstractPatch> GetActivePatches()
|
||||
{
|
||||
// We're not exposing _activePatches so it cant be altered outside of this class. Do NOT implement this as a property.
|
||||
@@ -38,6 +40,7 @@ public static class ModPatchCache
|
||||
/// <remarks>
|
||||
/// This should never be called before PreSptLoad is completed, otherwise could be empty.
|
||||
/// </remarks>
|
||||
[Obsolete("Patches will be injectable through IEnumerable<IRuntimePatch> in SPT 4.1, making this redundant")]
|
||||
public static List<string> GetActivePatchedMethodNames()
|
||||
{
|
||||
var result = new List<string>();
|
||||
|
||||
@@ -13980,21 +13980,21 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"summon": {
|
||||
"default": [
|
||||
{
|
||||
"summon": {
|
||||
"default": [
|
||||
{
|
||||
"AlwaysEnemies": [],
|
||||
"AlwaysFriends": [],
|
||||
"AlwaysFriends": [],
|
||||
"BearPlayerBehaviour": "AlwaysFriends",
|
||||
"BotRole": "peacefullZryachiyEvent",
|
||||
"ChancedEnemies": [],
|
||||
"SavageEnemyChance": 0,
|
||||
"BearEnemyChance": 0,
|
||||
"UsecEnemyChance": 0,
|
||||
"BearEnemyChance": 0,
|
||||
"UsecEnemyChance": 0,
|
||||
"SavagePlayerBehaviour": "AlwaysFriends",
|
||||
"UsecPlayerBehaviour": "AlwaysFriends"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,10 @@
|
||||
///
|
||||
/// This should not be used at all when having direct access to DI.
|
||||
/// </summary>
|
||||
[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)
|
||||
|
||||
@@ -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<string, Func<SptProfile, SptProfile>> onBeforeSaveCallbacks = new();
|
||||
|
||||
protected readonly ConcurrentDictionary<MongoId, SptProfile> profiles = new();
|
||||
@@ -42,6 +43,7 @@ public class SaveServer(
|
||||
/// </summary>
|
||||
/// <param name="id"> ID for the save callback </param>
|
||||
/// <param name="callback"> Callback to execute prior to running SaveServer.saveProfile() </param>
|
||||
[Obsolete("This will be removed in the next version of SPT")]
|
||||
public void AddBeforeSaveCallback(string id, Func<SptProfile, SptProfile> callback)
|
||||
{
|
||||
onBeforeSaveCallbacks[id] = callback;
|
||||
@@ -51,6 +53,7 @@ public class SaveServer(
|
||||
/// Remove a callback from being executed prior to saving profile in SaveServer.saveProfile()
|
||||
/// </summary>
|
||||
/// <param name="id"> ID of Callback to remove </param>
|
||||
[Obsolete("This will be removed in the next version of SPT")]
|
||||
public void RemoveBeforeSaveCallback(string id)
|
||||
{
|
||||
onBeforeSaveCallbacks.Remove(id);
|
||||
|
||||
Reference in New Issue
Block a user