diff --git a/Libraries/Core/Generators/BotGenerator.cs b/Libraries/Core/Generators/BotGenerator.cs index a80a76a7..f8085237 100644 --- a/Libraries/Core/Generators/BotGenerator.cs +++ b/Libraries/Core/Generators/BotGenerator.cs @@ -235,7 +235,7 @@ public class BotGenerator( bot.Info.Experience = botLevel.Exp; bot.Info.Level = botLevel.Level; - bot.Info.Settings.Experience = (int) GetExperienceRewardForKillByDifficulty( + bot.Info.Settings.Experience = GetExperienceRewardForKillByDifficulty( botJsonTemplate.BotExperience.Reward, botGenerationDetails.BotDifficulty, botGenerationDetails.Role @@ -318,7 +318,7 @@ public class BotGenerator( /// the killed bots difficulty /// Role of bot (optional, used for error logging) /// Experience for kill - public double GetExperienceRewardForKillByDifficulty(Dictionary> experiences, string botDifficulty, string role) + public int GetExperienceRewardForKillByDifficulty(Dictionary> experiences, string botDifficulty, string role) { if (!experiences.TryGetValue(botDifficulty.ToLower(), out var result)) { @@ -327,10 +327,10 @@ public class BotGenerator( _logger.Debug($"Unable to find experience: {botDifficulty} for {role} bot, falling back to `normal`"); } - return _randomUtil.GetDouble(experiences["normal"].Min, experiences["normal"].Max); + return _randomUtil.GetInt(experiences["normal"].Min, experiences["normal"].Max); } - return _randomUtil.GetDouble(result.Min, result.Max); + return _randomUtil.GetInt(result.Min, result.Max); } /// diff --git a/Libraries/Core/Models/Eft/Common/Tables/BotType.cs b/Libraries/Core/Models/Eft/Common/Tables/BotType.cs index 674031e3..bfd5abb1 100644 --- a/Libraries/Core/Models/Eft/Common/Tables/BotType.cs +++ b/Libraries/Core/Models/Eft/Common/Tables/BotType.cs @@ -456,7 +456,7 @@ public record Experience * key = bot difficulty */ [JsonPropertyName("reward")] - public Dictionary>? Reward + public Dictionary>? Reward { get; set; diff --git a/Libraries/Core/Models/Spt/Config/PmcConfig.cs b/Libraries/Core/Models/Spt/Config/PmcConfig.cs index fe4fb990..8ce974ce 100644 --- a/Libraries/Core/Models/Spt/Config/PmcConfig.cs +++ b/Libraries/Core/Models/Spt/Config/PmcConfig.cs @@ -383,7 +383,7 @@ public record SlotLootSettings } } -public record MinMaxLootValue : MinMax +public record MinMaxLootValue : MinMax { [JsonPropertyName("value")] public double Value