diff --git a/Libraries/SPTarkov.Server.Core/Controllers/InsuranceController.cs b/Libraries/SPTarkov.Server.Core/Controllers/InsuranceController.cs index ef4e0bbc..83b03cca 100644 --- a/Libraries/SPTarkov.Server.Core/Controllers/InsuranceController.cs +++ b/Libraries/SPTarkov.Server.Core/Controllers/InsuranceController.cs @@ -664,11 +664,7 @@ public class InsuranceController( insurance.SystemData?.Location, labsId, StringComparison.OrdinalIgnoreCase - ) - && !( - databaseService.GetLocation(labsId)?.Base?.Insurance.GetValueOrDefault(false) - ?? false - ); + ) && !(databaseService.GetLocation(labsId)?.Base?.Insurance ?? false); } /// @@ -686,11 +682,7 @@ public class InsuranceController( insurance.SystemData?.Location, labyrinthId, StringComparison.OrdinalIgnoreCase - ) - && !( - databaseService.GetLocation(labyrinthId)?.Base?.Insurance.GetValueOrDefault(false) - ?? false - ); + ) && !(databaseService.GetLocation(labyrinthId)?.Base?.Insurance ?? false); } /// diff --git a/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGeneration/ExplorationQuestGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGeneration/ExplorationQuestGenerator.cs index 8beb2e67..4b6dc3ee 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGeneration/ExplorationQuestGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGeneration/ExplorationQuestGenerator.cs @@ -313,8 +313,7 @@ public class ExplorationQuestGenerator( // Exclude exits with a requirement to leave (e.g. car extracts) var possibleExits = exitPool .Where(exit => - exit.PassageRequirement is not null - || repeatableConfig.QuestConfig.Exploration.SpecificExits.PassageRequirementWhitelist.Contains( + repeatableConfig.QuestConfig.Exploration.SpecificExits.PassageRequirementWhitelist.Contains( "PassageRequirement" ) ) diff --git a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Location.cs b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Location.cs index cbb4221f..a0fbd2cc 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Location.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Location.cs @@ -13,7 +13,7 @@ public record Location /// Map meta-data /// [JsonPropertyName("base")] - public LocationBase? Base { get; set; } + public LocationBase Base { get; set; } /// /// Loose loot positions and item weights diff --git a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/LocationBase.cs b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/LocationBase.cs index 33ab7400..16588647 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/LocationBase.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/LocationBase.cs @@ -72,7 +72,7 @@ public record LocationBase public int? BotImpossible { get; set; } [JsonPropertyName("BotLocationModifier")] - public BotLocationModifier? BotLocationModifier { get; set; } + public BotLocationModifier BotLocationModifier { get; set; } [JsonPropertyName("BotMarksman")] public int? BotMarksman { get; set; } @@ -81,7 +81,7 @@ public record LocationBase /// Maximum Number of bots that are currently alive/loading/delayed /// [JsonPropertyName("BotMax")] - public int? BotMax { get; set; } + public int BotMax { get; set; } /// /// Is not used in 33420 TODO: still needed? @@ -138,7 +138,7 @@ public record LocationBase /// How soon bots will be allowed to spawn /// [JsonPropertyName("BotStart")] - public int? BotStart { get; set; } + public int BotStart { get; set; } /// /// After this long bots will no longer spawn @@ -159,7 +159,7 @@ public record LocationBase public string? DisabledScavExits { get; set; } [JsonPropertyName("Enabled")] - public bool? Enabled { get; set; } + public bool Enabled { get; set; } [JsonPropertyName("EnableCoop")] public bool? EnableCoop { get; set; } @@ -186,10 +186,10 @@ public record LocationBase public double? IconY { get; set; } [JsonPropertyName("Id")] - public string? Id { get; set; } + public required string Id { get; set; } [JsonPropertyName("Insurance")] - public bool? Insurance { get; set; } + public bool Insurance { get; set; } [JsonPropertyName("IsSecret")] public bool? IsSecret { get; set; } @@ -219,7 +219,7 @@ public record LocationBase public double? MinDistToFreePoint { get; set; } [JsonPropertyName("MinMaxBots")] - public List? MinMaxBots { get; set; } + public List MinMaxBots { get; set; } [JsonPropertyName("MinPlayers")] public int? MinPlayers { get; set; } @@ -243,7 +243,7 @@ public record LocationBase public bool? OldSpawn { get; set; } [JsonPropertyName("OpenZones")] - public string? OpenZones { get; set; } + public string OpenZones { get; set; } [JsonPropertyName("Preview")] public Preview? Preview { get; set; } @@ -288,7 +288,7 @@ public record LocationBase public Dictionary? Areas { get; set; } [JsonPropertyName("UnixDateTime")] - public long? UnixDateTime { get; set; } + public long UnixDateTime { get; set; } [JsonPropertyName("_Id")] public MongoId IdField { get; set; } @@ -299,7 +299,7 @@ public record LocationBase [JsonPropertyName("EscapeTimeLimit")] public double? EscapeTimeLimit { get; set; } - // BSG fucked up another property name + [Obsolete("BSG fucked up another property name")] [JsonPropertyName("escape_time_limit")] public int Escape_Time_Limit_Do_Not_Use { @@ -338,7 +338,7 @@ public record LocationBase public bool? OneTimeSpawn { get; set; } [JsonPropertyName("exits")] - public List? Exits { get; set; } + public List Exits { get; set; } [JsonPropertyName("filter_ex")] public List? FilterEx { get; set; } @@ -945,7 +945,7 @@ public record Exit [JsonPropertyName("PassageRequirement")] [JsonConverter(typeof(JsonStringEnumConverter))] - public RequirementState? PassageRequirement { get; set; } + public RequirementState PassageRequirement { get; set; } [JsonPropertyName("PlayersCount")] public int? PlayersCount { get; set; } diff --git a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/Achievement.cs b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/Achievement.cs index 3c2877af..57f0256b 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/Achievement.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/Achievement.cs @@ -69,5 +69,5 @@ public record AchievementQuestConditionTypes public List? Success { get; set; } [JsonPropertyName("fail")] - public List? Fail { get; set; } + public List Fail { get; set; } } diff --git a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/CustomisationStorage.cs b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/CustomisationStorage.cs index c7a484b9..51ea2635 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/CustomisationStorage.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/CustomisationStorage.cs @@ -13,10 +13,10 @@ public record CustomisationStorage public MongoId Id { get; set; } [JsonPropertyName("source")] - public string? Source { get; set; } + public string Source { get; set; } [JsonPropertyName("type")] - public string? Type { get; set; } + public string Type { get; set; } } public record CustomisationType diff --git a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/CustomizationItem.cs b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/CustomizationItem.cs index 00206868..bcc04e89 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/CustomizationItem.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/CustomizationItem.cs @@ -9,22 +9,22 @@ public record CustomizationItem public Dictionary? ExtensionData { get; set; } [JsonPropertyName("_id")] - public string? Id { get; set; } + public string Id { get; set; } [JsonPropertyName("_name")] - public string? Name { get; set; } + public string Name { get; set; } [JsonPropertyName("_parent")] - public string? Parent { get; set; } + public string Parent { get; set; } [JsonPropertyName("_type")] - public string? Type { get; set; } + public string Type { get; set; } [JsonPropertyName("_props")] - public CustomizationProps? Properties { get; set; } + public CustomizationProps Properties { get; set; } [JsonPropertyName("_proto")] - public string? Proto { get; set; } + public string Proto { get; set; } } public class CustomizationProps @@ -66,28 +66,28 @@ public class CustomizationProps public MongoId? Body { get; set; } [JsonPropertyName("ProfileVersions")] - public List? ProfileVersions { get; set; } + public List ProfileVersions { get; set; } [JsonPropertyName("Side")] - public List? Side { get; set; } + public List Side { get; set; } [JsonPropertyName("Name")] - public string? Name { get; set; } + public string Name { get; set; } [JsonPropertyName("ShortName")] - public string? ShortName { get; set; } + public string ShortName { get; set; } [JsonPropertyName("Description")] - public string? Description { get; set; } + public string Description { get; set; } [JsonPropertyName("DisableForMannequin")] - public bool? DisableForMannequin { get; set; } + public bool DisableForMannequin { get; set; } [JsonPropertyName("IsNotRandom")] public bool? IsNotRandom { get; set; } [JsonPropertyName("AvailableAsDefault")] - public bool? AvailableAsDefault { get; set; } + public bool AvailableAsDefault { get; set; } [JsonPropertyName("EnvironmentUIType")] public string? EnvironmentUIType { get; set; } @@ -96,13 +96,13 @@ public class CustomizationProps public string? Interaction { get; set; } [JsonPropertyName("UsecTemplateId")] - public string? UsecTemplateId { get; set; } + public MongoId? UsecTemplateId { get; set; } [JsonPropertyName("BearTemplateId")] - public string? BearTemplateId { get; set; } + public MongoId? BearTemplateId { get; set; } [JsonPropertyName("AssetPath")] - public Prefab? AssetPath { get; set; } + public Prefab AssetPath { get; set; } [JsonPropertyName("HideGarbage")] public bool? HideGarbage { get; set; } diff --git a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/HandbookBase.cs b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/HandbookBase.cs index 9df57aea..c44df73b 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/HandbookBase.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/HandbookBase.cs @@ -9,10 +9,10 @@ public record HandbookBase public Dictionary? ExtensionData { get; set; } [JsonPropertyName("Categories")] - public List? Categories { get; set; } + public List Categories { get; set; } [JsonPropertyName("Items")] - public List? Items { get; set; } + public List Items { get; set; } } public record HandbookCategory @@ -29,13 +29,13 @@ public record HandbookCategory [JsonPropertyName("Icon")] [JsonIgnore(Condition = JsonIgnoreCondition.Never)] - public string? Icon { get; set; } + public string Icon { get; set; } [JsonPropertyName("Color")] - public string? Color { get; set; } + public string Color { get; set; } [JsonPropertyName("Order")] - public string? Order { get; set; } + public string Order { get; set; } } public record HandbookItem diff --git a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/LocationServices.cs b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/LocationServices.cs index 7d77c549..828678a6 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/LocationServices.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/LocationServices.cs @@ -11,10 +11,10 @@ public record LocationServices public Dictionary? ExtensionData { get; set; } [JsonPropertyName("TraderServerSettings")] - public TraderServerSettings? TraderServerSettings { get; set; } + public TraderServerSettings TraderServerSettings { get; set; } [JsonPropertyName("BTRServerSettings")] - public BtrServerSettings? BtrServerSettings { get; set; } + public BtrServerSettings BtrServerSettings { get; set; } } public record TraderServerSettings @@ -23,7 +23,7 @@ public record TraderServerSettings public Dictionary? ExtensionData { get; set; } [JsonPropertyName("TraderServices")] - public TraderServices? TraderServices { get; set; } + public TraderServices TraderServices { get; set; } } public record TraderServices @@ -32,25 +32,25 @@ public record TraderServices public Dictionary? ExtensionData { get; set; } [JsonPropertyName("ExUsecLoyalty")] - public TraderService? ExUsecLoyalty { get; set; } + public TraderService ExUsecLoyalty { get; set; } [JsonPropertyName("ZryachiyAid")] - public TraderService? ZryachiyAid { get; set; } + public TraderService ZryachiyAid { get; set; } [JsonPropertyName("CultistsAid")] - public TraderService? CultistsAid { get; set; } + public TraderService CultistsAid { get; set; } [JsonPropertyName("PlayerTaxi")] - public TraderService? PlayerTaxi { get; set; } + public TraderService PlayerTaxi { get; set; } [JsonPropertyName("BtrItemsDelivery")] - public TraderService? BtrItemsDelivery { get; set; } + public TraderService BtrItemsDelivery { get; set; } [JsonPropertyName("BtrBotCover")] - public TraderService? BtrBotCover { get; set; } + public TraderService BtrBotCover { get; set; } [JsonPropertyName("TransitItemsDelivery")] - public TraderService? TransitItemsDelivery { get; set; } + public TraderService TransitItemsDelivery { get; set; } } public record TraderService @@ -59,21 +59,21 @@ public record TraderService public Dictionary? ExtensionData { get; set; } [JsonPropertyName("TraderId")] - public string? TraderId { get; set; } + public string TraderId { get; set; } [JsonPropertyName("TraderServiceType")] - public TraderServiceType? TraderServiceType { get; set; } + public TraderServiceType TraderServiceType { get; set; } [JsonPropertyName("Requirements")] - public ServiceRequirements? Requirements { get; set; } + public ServiceRequirements Requirements { get; set; } [JsonPropertyName("ServiceItemCost")] [JsonConverter(typeof(ArrayToObjectFactoryConverter))] [JsonIgnore(Condition = JsonIgnoreCondition.Never)] - public Dictionary? ServiceItemCost { get; set; } + public Dictionary ServiceItemCost { get; set; } [JsonPropertyName("UniqueItems")] - public List? UniqueItems { get; set; } + public List UniqueItems { get; set; } } public record ServiceRequirements @@ -83,12 +83,12 @@ public record ServiceRequirements [JsonPropertyName("CompletedQuests")] [JsonIgnore(Condition = JsonIgnoreCondition.Never)] - public List? CompletedQuests { get; set; } + public List CompletedQuests { get; set; } [JsonPropertyName("Standings")] [JsonConverter(typeof(ArrayToObjectFactoryConverter))] [JsonIgnore(Condition = JsonIgnoreCondition.Never)] - public Dictionary? Standings { get; set; } + public Dictionary Standings { get; set; } } public record CompletedQuest @@ -97,7 +97,7 @@ public record CompletedQuest public Dictionary? ExtensionData { get; set; } [JsonPropertyName("QuestId")] - public string? QuestId { get; set; } + public string QuestId { get; set; } } public record StandingRequirement @@ -106,7 +106,7 @@ public record StandingRequirement public Dictionary? ExtensionData { get; set; } [JsonPropertyName("Value")] - public double? Value { get; set; } + public double Value { get; set; } } public record ServiceItemCostDetails @@ -115,7 +115,7 @@ public record ServiceItemCostDetails public Dictionary? ExtensionData { get; set; } [JsonPropertyName("Count")] - public int? Count { get; set; } + public int Count { get; set; } } public record BtrServerSettings @@ -124,49 +124,49 @@ public record BtrServerSettings public Dictionary? ExtensionData { get; set; } [JsonPropertyName("ChanceSpawn")] - public double? ChanceSpawn { get; set; } + public double ChanceSpawn { get; set; } [JsonPropertyName("SpawnPeriod")] - public XYZ? SpawnPeriod { get; set; } + public XYZ SpawnPeriod { get; set; } [JsonPropertyName("MoveSpeed")] - public float? MoveSpeed { get; set; } + public float MoveSpeed { get; set; } [JsonPropertyName("ReadyToDepartureTime")] - public float? ReadyToDepartureTime { get; set; } + public float ReadyToDepartureTime { get; set; } [JsonPropertyName("CheckTurnDistanceTime")] - public float? CheckTurnDistanceTime { get; set; } + public float CheckTurnDistanceTime { get; set; } [JsonPropertyName("TurnCheckSensitivity")] - public float? TurnCheckSensitivity { get; set; } + public float TurnCheckSensitivity { get; set; } [JsonPropertyName("DecreaseSpeedOnTurnLimit")] - public double? DecreaseSpeedOnTurnLimit { get; set; } + public double DecreaseSpeedOnTurnLimit { get; set; } [JsonPropertyName("EndSplineDecelerationDistance")] - public double? EndSplineDecelerationDistance { get; set; } + public double EndSplineDecelerationDistance { get; set; } [JsonPropertyName("AccelerationSpeed")] - public double? AccelerationSpeed { get; set; } + public double AccelerationSpeed { get; set; } [JsonPropertyName("DecelerationSpeed")] - public double? DecelerationSpeed { get; set; } + public double DecelerationSpeed { get; set; } [JsonPropertyName("PauseDurationRange")] - public XYZ? PauseDurationRange { get; set; } + public XYZ PauseDurationRange { get; set; } [JsonPropertyName("BodySwingReturnSpeed")] - public float? BodySwingReturnSpeed { get; set; } + public float BodySwingReturnSpeed { get; set; } [JsonPropertyName("BodySwingDamping")] - public float? BodySwingDamping { get; set; } + public float BodySwingDamping { get; set; } [JsonPropertyName("BodySwingIntensity")] - public float? BodySwingIntensity { get; set; } + public float BodySwingIntensity { get; set; } [JsonPropertyName("ServerMapBTRSettings")] - public Dictionary? ServerMapBTRSettings { get; set; } + public Dictionary ServerMapBTRSettings { get; set; } } public record ServerMapBtrsettings @@ -175,47 +175,47 @@ public record ServerMapBtrsettings public Dictionary? ExtensionData { get; set; } [JsonPropertyName("MapID")] - public string? MapID { get; set; } + public string MapID { get; set; } [JsonPropertyName("ChanceSpawn")] - public double? ChanceSpawn { get; set; } + public double ChanceSpawn { get; set; } [JsonPropertyName("SpawnPeriod")] - public XYZ? SpawnPeriod { get; set; } + public XYZ SpawnPeriod { get; set; } [JsonPropertyName("MoveSpeed")] - public float? MoveSpeed { get; set; } + public float MoveSpeed { get; set; } [JsonPropertyName("ReadyToDepartureTime")] - public float? ReadyToDepartureTime { get; set; } + public float ReadyToDepartureTime { get; set; } [JsonPropertyName("CheckTurnDistanceTime")] - public float? CheckTurnDistanceTime { get; set; } + public float CheckTurnDistanceTime { get; set; } [JsonPropertyName("TurnCheckSensitivity")] - public float? TurnCheckSensitivity { get; set; } + public float TurnCheckSensitivity { get; set; } [JsonPropertyName("DecreaseSpeedOnTurnLimit")] - public float? DecreaseSpeedOnTurnLimit { get; set; } + public float DecreaseSpeedOnTurnLimit { get; set; } [JsonPropertyName("EndSplineDecelerationDistance")] - public float? EndSplineDecelerationDistance { get; set; } + public float EndSplineDecelerationDistance { get; set; } [JsonPropertyName("AccelerationSpeed")] - public float? AccelerationSpeed { get; set; } + public float AccelerationSpeed { get; set; } [JsonPropertyName("DecelerationSpeed")] - public float? DecelerationSpeed { get; set; } + public float DecelerationSpeed { get; set; } [JsonPropertyName("PauseDurationRange")] - public XYZ? PauseDurationRange { get; set; } + public XYZ PauseDurationRange { get; set; } [JsonPropertyName("BodySwingReturnSpeed")] - public float? BodySwingReturnSpeed { get; set; } + public float BodySwingReturnSpeed { get; set; } [JsonPropertyName("BodySwingDamping")] - public float? BodySwingDamping { get; set; } + public float BodySwingDamping { get; set; } [JsonPropertyName("BodySwingIntensity")] - public float? BodySwingIntensity { get; set; } + public float BodySwingIntensity { get; set; } } diff --git a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/Match.cs b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/Match.cs index b39c4d60..a222270a 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/Match.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/Match.cs @@ -8,7 +8,7 @@ public record Match public Dictionary? ExtensionData { get; set; } [JsonPropertyName("metrics")] - public Metrics? Metrics { get; set; } + public Metrics Metrics { get; set; } } public record Metrics @@ -17,20 +17,20 @@ public record Metrics public Dictionary? ExtensionData { get; set; } [JsonPropertyName("Keys")] - public List? Keys { get; set; } + public List Keys { get; set; } [JsonPropertyName("NetProcessingBins")] - public List? NetProcessingBins { get; set; } + public List NetProcessingBins { get; set; } [JsonPropertyName("RenderBins")] - public List? RenderBins { get; set; } + public List RenderBins { get; set; } [JsonPropertyName("GameUpdateBins")] - public List? GameUpdateBins { get; set; } + public List GameUpdateBins { get; set; } [JsonPropertyName("MemoryMeasureInterval")] - public int? MemoryMeasureInterval { get; set; } + public int MemoryMeasureInterval { get; set; } [JsonPropertyName("PauseReasons")] - public List? PauseReasons { get; set; } + public List PauseReasons { get; set; } } diff --git a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/Prestige.cs b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/Prestige.cs index 48d83393..3cd4ed8b 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/Prestige.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/Prestige.cs @@ -1,4 +1,5 @@ using System.Text.Json.Serialization; +using SPTarkov.Server.Core.Models.Common; namespace SPTarkov.Server.Core.Models.Eft.Common.Tables; @@ -8,7 +9,7 @@ public record Prestige public Dictionary? ExtensionData { get; set; } [JsonPropertyName("elements")] - public List? Elements { get; set; } + public List Elements { get; set; } } public record PrestigeElement @@ -17,22 +18,22 @@ public record PrestigeElement public Dictionary? ExtensionData { get; set; } [JsonPropertyName("id")] - public string? Id { get; set; } + public string Id { get; set; } [JsonPropertyName("conditions")] - public List? Conditions { get; set; } + public List Conditions { get; set; } [JsonPropertyName("rewards")] - public List? Rewards { get; set; } + public List Rewards { get; set; } [JsonPropertyName("transferConfigs")] - public TransferConfigs? TransferConfigs { get; set; } + public TransferConfigs TransferConfigs { get; set; } [JsonPropertyName("image")] - public string? Image { get; set; } + public string Image { get; set; } [JsonPropertyName("bigImage")] - public string? BigImage { get; set; } + public string BigImage { get; set; } } public record TransferConfigs @@ -41,13 +42,13 @@ public record TransferConfigs public Dictionary? ExtensionData { get; set; } [JsonPropertyName("stashConfig")] - public StashPrestigeConfig? StashConfig { get; set; } + public StashPrestigeConfig StashConfig { get; set; } [JsonPropertyName("skillConfig")] - public PrestigeSkillConfig? SkillConfig { get; set; } + public PrestigeSkillConfig SkillConfig { get; set; } [JsonPropertyName("masteringConfig")] - public PrestigeMasteringConfig? MasteringConfig { get; set; } + public PrestigeMasteringConfig MasteringConfig { get; set; } } public record StashPrestigeConfig @@ -71,10 +72,10 @@ public record StashPrestigeFilters public Dictionary? ExtensionData { get; set; } [JsonPropertyName("includedItems")] - public List? IncludedItems { get; set; } + public List IncludedItems { get; set; } [JsonPropertyName("excludedItems")] - public List? ExcludedItems { get; set; } + public List ExcludedItems { get; set; } } public record PrestigeSkillConfig @@ -83,7 +84,7 @@ public record PrestigeSkillConfig public Dictionary? ExtensionData { get; set; } [JsonPropertyName("transferMultiplier")] - public double? TransferMultiplier { get; set; } + public double TransferMultiplier { get; set; } } public record PrestigeMasteringConfig @@ -92,5 +93,5 @@ public record PrestigeMasteringConfig public Dictionary? ExtensionData { get; set; } [JsonPropertyName("transferMultiplier")] - public double? TransferMultiplier { get; set; } + public double TransferMultiplier { get; set; } } diff --git a/Libraries/SPTarkov.Server.Core/Models/Eft/Profile/SptProfile.cs b/Libraries/SPTarkov.Server.Core/Models/Eft/Profile/SptProfile.cs index f369e9fc..e5a11bd6 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Eft/Profile/SptProfile.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Eft/Profile/SptProfile.cs @@ -162,14 +162,14 @@ public record WeaponBuild : UserBuild public record EquipmentBuild : UserBuild { [JsonPropertyName("Root")] - public string? Root { get; set; } + public MongoId Root { get; set; } [JsonPropertyName("Items")] - public List? Items { get; set; } // Same as PMC inventory items + public List Items { get; set; } // Same as PMC inventory items [JsonPropertyName("BuildType")] [JsonConverter(typeof(JsonStringEnumConverter))] - public EquipmentBuildType? BuildType { get; set; } + public EquipmentBuildType BuildType { get; set; } } public record MagazineBuild : UserBuild @@ -205,7 +205,7 @@ public record MagazineTemplateAmmoItem public record DefaultEquipmentPreset : EquipmentBuild { [JsonPropertyName("type")] - public string? Type { get; set; } + public string Type { get; set; } } public record Dialogue diff --git a/Libraries/SPTarkov.Server.Core/Models/Spt/Server/SettingsBase.cs b/Libraries/SPTarkov.Server.Core/Models/Spt/Server/SettingsBase.cs index 02ace495..2adf2cc5 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Spt/Server/SettingsBase.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Spt/Server/SettingsBase.cs @@ -9,7 +9,7 @@ public record SettingsBase public Dictionary? ExtensionData { get; set; } [JsonPropertyName("config")] - public Config? Configuration { get; set; } + public Config Configuration { get; set; } } public record Config @@ -18,88 +18,88 @@ public record Config public Dictionary? ExtensionData { get; set; } [JsonPropertyName("AFKTimeoutSeconds")] - public int? AFKTimeoutSeconds { get; set; } + public int AFKTimeoutSeconds { get; set; } [JsonPropertyName("AdditionalRandomDelaySeconds")] - public int? AdditionalRandomDelaySeconds { get; set; } + public int AdditionalRandomDelaySeconds { get; set; } [JsonPropertyName("AudioSettings")] - public AudioSettings? AudioSettings { get; set; } + public AudioSettings AudioSettings { get; set; } [JsonPropertyName("ClientSendRateLimit")] - public int? ClientSendRateLimit { get; set; } + public int ClientSendRateLimit { get; set; } [JsonPropertyName("CriticalRetriesCount")] - public int? CriticalRetriesCount { get; set; } + public int CriticalRetriesCount { get; set; } [JsonPropertyName("DefaultRetriesCount")] - public int? DefaultRetriesCount { get; set; } + public int DefaultRetriesCount { get; set; } [JsonPropertyName("FirstCycleDelaySeconds")] - public int? FirstCycleDelaySeconds { get; set; } + public int FirstCycleDelaySeconds { get; set; } [JsonPropertyName("FramerateLimit")] - public FramerateLimit? FramerateLimit { get; set; } + public FramerateLimit FramerateLimit { get; set; } [JsonPropertyName("GroupStatusInterval")] - public int? GroupStatusInterval { get; set; } + public int GroupStatusInterval { get; set; } [JsonPropertyName("GroupStatusButtonInterval")] - public int? GroupStatusButtonInterval { get; set; } + public int GroupStatusButtonInterval { get; set; } [JsonPropertyName("KeepAliveInterval")] - public int? KeepAliveInterval { get; set; } + public int KeepAliveInterval { get; set; } [JsonPropertyName("LobbyKeepAliveInterval")] - public int? LobbyKeepAliveInterval { get; set; } + public int LobbyKeepAliveInterval { get; set; } [JsonPropertyName("Mark502and504AsNonImportant")] - public bool? Mark502and504AsNonImportant { get; set; } + public bool Mark502and504AsNonImportant { get; set; } [JsonPropertyName("MemoryManagementSettings")] - public MemoryManagementSettings? MemoryManagementSettings { get; set; } + public MemoryManagementSettings MemoryManagementSettings { get; set; } [JsonPropertyName("NVidiaHighlights")] - public bool? NVidiaHighlights { get; set; } + public bool NVidiaHighlights { get; set; } [JsonPropertyName("NextCycleDelaySeconds")] - public int? NextCycleDelaySeconds { get; set; } + public int NextCycleDelaySeconds { get; set; } [JsonPropertyName("PingServerResultSendInterval")] - public int? PingServerResultSendInterval { get; set; } + public int PingServerResultSendInterval { get; set; } [JsonPropertyName("PingServersInterval")] - public int? PingServersInterval { get; set; } + public int PingServersInterval { get; set; } [JsonPropertyName("ReleaseProfiler")] - public ReleaseProfiler? ReleaseProfiler { get; set; } + public ReleaseProfiler ReleaseProfiler { get; set; } [JsonPropertyName("RequestConfirmationTimeouts")] - public List? RequestConfirmationTimeouts { get; set; } + public List RequestConfirmationTimeouts { get; set; } [JsonPropertyName("RequestsMadeThroughLobby")] - public List? RequestsMadeThroughLobby { get; set; } + public List RequestsMadeThroughLobby { get; set; } [JsonPropertyName("SecondCycleDelaySeconds")] - public int? SecondCycleDelaySeconds { get; set; } + public int SecondCycleDelaySeconds { get; set; } [JsonPropertyName("ShouldEstablishLobbyConnection")] - public bool? ShouldEstablishLobbyConnection { get; set; } + public bool ShouldEstablishLobbyConnection { get; set; } [JsonPropertyName("TurnOffLogging")] - public bool? TurnOffLogging { get; set; } + public bool TurnOffLogging { get; set; } [JsonPropertyName("WeaponOverlapDistanceCulling")] - public int? WeaponOverlapDistanceCulling { get; set; } + public int WeaponOverlapDistanceCulling { get; set; } [JsonPropertyName("WebDiagnosticsEnabled")] - public bool? WebDiagnosticsEnabled { get; set; } + public bool WebDiagnosticsEnabled { get; set; } [JsonPropertyName("NetworkStateView")] - public NetworkStateView? NetworkStateView { get; set; } + public NetworkStateView NetworkStateView { get; set; } [JsonPropertyName("WsReconnectionDelays")] - public List? WsReconnectionDelays { get; set; } + public List WsReconnectionDelays { get; set; } } public record AudioSettings @@ -108,22 +108,22 @@ public record AudioSettings public Dictionary? ExtensionData { get; set; } [JsonPropertyName("AudioGroupPresets")] - public List? AudioGroupPresets { get; set; } + public List AudioGroupPresets { get; set; } [JsonPropertyName("EnvironmentSettings")] - public EnvironmentSettings? EnvironmentSettings { get; set; } + public EnvironmentSettings EnvironmentSettings { get; set; } [JsonPropertyName("HeadphonesSettings")] public HeadphoneSettings HeadphonesSettings { get; set; } [JsonPropertyName("MetaXRAudioPluginSettings")] - public MetaXRAudioPluginSettings? MetaXRAudioPluginSettings { get; set; } + public MetaXRAudioPluginSettings MetaXRAudioPluginSettings { get; set; } [JsonPropertyName("PlayerSettings")] - public PlayerSettings? PlayerSettings { get; set; } + public PlayerSettings PlayerSettings { get; set; } [JsonPropertyName("RadioBroadcastSettings")] - public RadioBroadcastSettings? RadioBroadcastSettings { get; set; } + public RadioBroadcastSettings RadioBroadcastSettings { get; set; } } public record FramerateLimit @@ -132,13 +132,13 @@ public record FramerateLimit public Dictionary? ExtensionData { get; set; } [JsonPropertyName("MaxFramerateGameLimit")] - public int? MaxFramerateGameLimit { get; set; } + public int MaxFramerateGameLimit { get; set; } [JsonPropertyName("MaxFramerateLobbyLimit")] - public int? MaxFramerateLobbyLimit { get; set; } + public int MaxFramerateLobbyLimit { get; set; } [JsonPropertyName("MinFramerateLimit")] - public int? MinFramerateLimit { get; set; } + public int MinFramerateLimit { get; set; } } public record MemoryManagementSettings @@ -147,22 +147,22 @@ public record MemoryManagementSettings public Dictionary? ExtensionData { get; set; } [JsonPropertyName("AggressiveGC")] - public bool? AggressiveGC { get; set; } + public bool AggressiveGC { get; set; } [JsonPropertyName("GigabytesRequiredToDisableGCDuringRaid")] - public int? GigabytesRequiredToDisableGCDuringRaid { get; set; } + public int GigabytesRequiredToDisableGCDuringRaid { get; set; } [JsonPropertyName("HeapPreAllocationEnabled")] - public bool? HeapPreAllocationEnabled { get; set; } + public bool HeapPreAllocationEnabled { get; set; } [JsonPropertyName("HeapPreAllocationMB")] - public int? HeapPreAllocationMB { get; set; } + public int HeapPreAllocationMB { get; set; } [JsonPropertyName("OverrideRamCleanerSettings")] - public bool? OverrideRamCleanerSettings { get; set; } + public bool OverrideRamCleanerSettings { get; set; } [JsonPropertyName("RamCleanerEnabled")] - public bool? RamCleanerEnabled { get; set; } + public bool RamCleanerEnabled { get; set; } } public record ReleaseProfiler @@ -171,13 +171,13 @@ public record ReleaseProfiler public Dictionary? ExtensionData { get; set; } [JsonPropertyName("Enabled")] - public bool? Enabled { get; set; } + public bool Enabled { get; set; } [JsonPropertyName("MaxRecords")] - public int? MaxRecords { get; set; } + public int MaxRecords { get; set; } [JsonPropertyName("RecordTriggerValue")] - public int? RecordTriggerValue { get; set; } + public int RecordTriggerValue { get; set; } } public record NetworkStateView @@ -186,10 +186,10 @@ public record NetworkStateView public Dictionary? ExtensionData { get; set; } [JsonPropertyName("LossThreshold")] - public int? LossThreshold { get; set; } + public int LossThreshold { get; set; } [JsonPropertyName("RttThreshold")] - public int? RttThreshold { get; set; } + public int RttThreshold { get; set; } } public record AudioGroupPreset diff --git a/Libraries/SPTarkov.Server.Core/Models/Spt/Templates/Templates.cs b/Libraries/SPTarkov.Server.Core/Models/Spt/Templates/Templates.cs index 1f53143b..d7227c23 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Spt/Templates/Templates.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Spt/Templates/Templates.cs @@ -11,62 +11,62 @@ public record Templates public Dictionary? ExtensionData { get; set; } [JsonPropertyName("character")] - public List? Character { get; set; } + public List Character { get; set; } [JsonPropertyName("customisationStorage")] - public List? CustomisationStorage { get; set; } + public List CustomisationStorage { get; set; } [JsonPropertyName("items")] - public Dictionary? Items { get; set; } + public Dictionary Items { get; set; } [JsonPropertyName("prestige")] public Prestige? Prestige { get; set; } [JsonPropertyName("quests")] - public Dictionary? Quests { get; set; } + public Dictionary Quests { get; set; } [JsonPropertyName("repeatableQuests")] - public RepeatableQuestDatabase? RepeatableQuests { get; set; } + public RepeatableQuestDatabase RepeatableQuests { get; set; } [JsonPropertyName("handbook")] - public HandbookBase? Handbook { get; set; } + public HandbookBase Handbook { get; set; } [JsonPropertyName("customization")] - public Dictionary? Customization { get; set; } + public Dictionary Customization { get; set; } /// /// The profile templates listed in the launcher on profile creation, split by account type (e.g. Standard) then side (e.g. bear/usec) /// [JsonPropertyName("profiles")] - public Dictionary? Profiles { get; set; } + public Dictionary Profiles { get; set; } /// /// Flea prices of items - gathered from online flea market dump /// [JsonPropertyName("prices")] - public Dictionary? Prices { get; set; } + public Dictionary Prices { get; set; } /// /// Default equipment loadouts that show on main inventory screen /// [JsonPropertyName("defaultEquipmentPresets")] - public List? DefaultEquipmentPresets { get; set; } + public List DefaultEquipmentPresets { get; set; } /// /// Achievements /// [JsonPropertyName("achievements")] - public List? Achievements { get; set; } + public List Achievements { get; set; } /// /// Achievements /// [JsonPropertyName("customAchievements")] - public List? CustomAchievements { get; set; } + public List CustomAchievements { get; set; } /// /// Location services data /// [JsonPropertyName("locationServices")] - public LocationServices? LocationServices { get; set; } + public LocationServices LocationServices { get; set; } } diff --git a/Libraries/SPTarkov.Server.Core/Services/PostDbLoadService.cs b/Libraries/SPTarkov.Server.Core/Services/PostDbLoadService.cs index 83b5b383..822663a3 100644 --- a/Libraries/SPTarkov.Server.Core/Services/PostDbLoadService.cs +++ b/Libraries/SPTarkov.Server.Core/Services/PostDbLoadService.cs @@ -569,7 +569,7 @@ public class PostDbLoadService( map.Base.BotMax = cap; // make values no larger than 30 secs - map.Base.BotStart = Math.Min(map.Base.BotStart.Value, 30); + map.Base.BotStart = Math.Min(map.Base.BotStart, 30); } }