diff --git a/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGenerator.cs index aee80cc5..be5d6bf3 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGenerator.cs @@ -193,10 +193,7 @@ public class RepeatableQuestGenerator( var targetPool = questTypePool.Pool.Elimination; targetsConfig = targetsConfig.Filter(x => targetPool.Targets.ContainsKey(x.Key)); - if ( - targetsConfig.Count == 0 - || targetsConfig.All(x => x.Data?.IsBoss ?? false) - ) + if (targetsConfig.Count == 0 || targetsConfig.All(x => x.Data?.IsBoss ?? false)) { // There are no more targets left for elimination; delete it as a possible quest type // also if only bosses are left we need to leave otherwise it's a guaranteed boss elimination @@ -329,8 +326,7 @@ public class RepeatableQuestGenerator( !eliminationConfig.DistLocationBlacklist.Contains(x.Id) ); // if the boss spawns on nom-blacklisted locations and the current location is allowed we can generate a distance kill requirement - isDistanceRequirementAllowed = - isDistanceRequirementAllowed && allowedSpawns.Any(); + isDistanceRequirementAllowed = isDistanceRequirementAllowed && allowedSpawns.Any(); } if ( @@ -500,10 +496,7 @@ public class RepeatableQuestGenerator( ); } - return _randomUtil.RandInt( - eliminationConfig.MinKills, - eliminationConfig.MaxKills + 1 - ); + return _randomUtil.RandInt(eliminationConfig.MinKills, eliminationConfig.MaxKills + 1); } protected double DifficultyWeighing( @@ -706,10 +699,7 @@ public class RepeatableQuestGenerator( } // Store the indexes of items we are asking player to supply - var distinctItemsToRetrieveCount = _randomUtil.GetInt( - 1, - completionConfig.UniqueItemCount - ); + var distinctItemsToRetrieveCount = _randomUtil.GetInt(1, completionConfig.UniqueItemCount); var chosenRequirementItemsTpls = new List(); var usedItemIndexes = new HashSet(); for (var i = 0; i < distinctItemsToRetrieveCount; i++) diff --git a/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestRewardGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestRewardGenerator.cs index e81bf60b..7eeb8468 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestRewardGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestRewardGenerator.cs @@ -130,9 +130,9 @@ public class RepeatableQuestRewardGenerator( } if ( - traderWhitelistDetails.RewardCanBeWeapon && - _randomUtil.GetChance100(traderWhitelistDetails.WeaponRewardChancePercent) - ) + traderWhitelistDetails.RewardCanBeWeapon + && _randomUtil.GetChance100(traderWhitelistDetails.WeaponRewardChancePercent) + ) { var chosenWeapon = GetRandomWeaponPresetWithinBudget( itemRewardBudget.Value, diff --git a/Libraries/SPTarkov.Server.Core/Models/Spt/Config/QuestConfig.cs b/Libraries/SPTarkov.Server.Core/Models/Spt/Config/QuestConfig.cs index d0509e94..4f0f8615 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Spt/Config/QuestConfig.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Spt/Config/QuestConfig.cs @@ -613,7 +613,9 @@ public record EliminationConfig : BaseQuestConfig /// If a weapon category requirement is chosen, pick from these categories /// [JsonPropertyName("weaponCategoryRequirements")] - public required List>> WeaponCategoryRequirements { get; set; } + public required List< + ProbabilityObject> + > WeaponCategoryRequirements { get; set; } /// /// If a weapon requirement is chosen, pick from these weapons @@ -639,7 +641,6 @@ public record BossInfo [JsonExtensionData] public Dictionary ExtensionData { get; set; } - /// /// Is this target a boss /// diff --git a/Libraries/SPTarkov.Server.Core/Utils/MathUtil.cs b/Libraries/SPTarkov.Server.Core/Utils/MathUtil.cs index 3a032199..c2b6d7c5 100644 --- a/Libraries/SPTarkov.Server.Core/Utils/MathUtil.cs +++ b/Libraries/SPTarkov.Server.Core/Utils/MathUtil.cs @@ -99,7 +99,8 @@ public class MathUtil /// Support points in x (of same length as y) /// Support points in y (of same length as x) /// Interpolated value at xp, or null if xp is out of bounds - public T? Interp1(T xp, IReadOnlyList x, IReadOnlyList y) where T : INumber + public T? Interp1(T xp, IReadOnlyList x, IReadOnlyList y) + where T : INumber { if (xp > x[^1]) // ^1 is the last index in C# {