Small changes and cleanups (#448)
- await StartBackupSystem as it's an awaitable - Update comment in MongoId - Set more id's in HideoutArea to MongoId - Remove unused logging records Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
This commit is contained in:
@@ -17,7 +17,7 @@ public class SaveCallbacks(
|
||||
|
||||
public async Task OnLoad()
|
||||
{
|
||||
_backupService.StartBackupSystem();
|
||||
await _backupService.StartBackupSystem();
|
||||
await _saveServer.LoadAsync();
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ public readonly struct MongoId : IEquatable<MongoId>
|
||||
[CallerLineNumber] int callerLineNumber = 0
|
||||
)
|
||||
{
|
||||
// This is temporary, otherwise item buying is broken as when LINQ searches for string id's it's possible null is passed
|
||||
// Handle null strings, various id's are null either by BSG or by our own doing with LINQ
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
_stringId = null;
|
||||
|
||||
@@ -104,7 +104,7 @@ public record StageImprovement
|
||||
public Dictionary<string, object>? ExtensionData { get; set; }
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public string? Id { get; set; }
|
||||
public MongoId Id { get; set; }
|
||||
|
||||
[JsonPropertyName("bonuses")]
|
||||
public List<StageImprovementBonus>? Bonuses { get; set; }
|
||||
@@ -122,7 +122,7 @@ public record StageImprovementBonus
|
||||
public Dictionary<string, object>? ExtensionData { get; set; }
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public string? Id { get; set; }
|
||||
public MongoId Id { get; set; }
|
||||
|
||||
[JsonPropertyName("passive")]
|
||||
public bool? IsPassive { get; set; }
|
||||
@@ -158,7 +158,7 @@ public record StageImprovementRequirement
|
||||
public bool? IsFunctional { get; set; }
|
||||
|
||||
[JsonPropertyName("templateId")]
|
||||
public string? TemplateId { get; set; }
|
||||
public MongoId TemplateId { get; set; }
|
||||
|
||||
[JsonPropertyName("isSpawnedInSession")]
|
||||
public bool? IsSpawnedInSession { get; set; }
|
||||
@@ -179,7 +179,7 @@ public record StageRequirement
|
||||
public int? RequiredLevel { get; set; }
|
||||
|
||||
[JsonPropertyName("templateId")]
|
||||
public string? TemplateId { get; set; }
|
||||
public MongoId TemplateId { get; set; }
|
||||
|
||||
[JsonPropertyName("count")]
|
||||
public int? Count { get; set; }
|
||||
@@ -191,7 +191,7 @@ public record StageRequirement
|
||||
public bool? IsFunctional { get; set; }
|
||||
|
||||
[JsonPropertyName("traderId")]
|
||||
public string? TraderId { get; set; }
|
||||
public MongoId TraderId { get; set; }
|
||||
|
||||
[JsonPropertyName("isSpawnedInSession")]
|
||||
public bool? IsSpawnedInSession { get; set; }
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
// namespace SPTarkov.Server.Core.Models.Spt.Logging;
|
||||
//
|
||||
// public record LogBackgroundColor
|
||||
// {
|
||||
// public const string DEFAULT = "";
|
||||
// public const string BLACK = "blackBG";
|
||||
// public const string RED = "redBG";
|
||||
// public const string GREEN = "greenBG";
|
||||
// public const string YELLOW = "yellowBG";
|
||||
// public const string BLUE = "blueBG";
|
||||
// public const string MAGENTA = "magentaBG";
|
||||
// public const string CYAN = "cyanBG";
|
||||
// public const string WHITE = "whiteBG";
|
||||
// }
|
||||
|
||||
// TODO: this likely wont be used anymore, so commenting out insteaad of reimplementing
|
||||
@@ -1,16 +0,0 @@
|
||||
// namespace SPTarkov.Server.Core.Models.Spt.Logging;
|
||||
//
|
||||
// public record LogTextColor
|
||||
// {
|
||||
// public const string BLACK = "black";
|
||||
// public const string RED = "red";
|
||||
// public const string GREEN = "green";
|
||||
// public const string YELLOW = "yellow";
|
||||
// public const string BLUE = "blue";
|
||||
// public const string MAGENTA = "Magenta";
|
||||
// public const string CYAN = "cyan";
|
||||
// public const string WHITE = "white";
|
||||
// public const string GRAY = "gray";
|
||||
// }
|
||||
|
||||
// TODO: this likely wont be used anymore, so commenting out insteaad of reimplementing
|
||||
@@ -1,21 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SPTarkov.Server.Core.Models.Spt.Logging;
|
||||
|
||||
public record SptLogger
|
||||
{
|
||||
[JsonExtensionData]
|
||||
public Dictionary<string, object>? ExtensionData { get; set; }
|
||||
|
||||
public object Error { get; set; } // error: (msg: string | Record<string, unknown>) => void;
|
||||
|
||||
public object Warn { get; set; } // warn: (msg: string | Record<string, unknown>) => void;
|
||||
|
||||
public object Succ { get; set; } // succ?: (msg: string | Record<string, unknown>) => void;
|
||||
|
||||
public object Info { get; set; } // info: (msg: string | Record<string, unknown>) => void;
|
||||
|
||||
public object Debug { get; set; } // debug: (msg: string | Record<string, unknown>) => void;
|
||||
}
|
||||
|
||||
// TODO: needs to be reimplemented however we want to do it in this project
|
||||
Reference in New Issue
Block a user