using System.Text.Json.Serialization;
using SPTarkov.Server.Core.Models.Common;
using SPTarkov.Server.Core.Models.Eft.Common;
using SPTarkov.Server.Core.Models.Enums;
namespace SPTarkov.Server.Core.Models.Spt.Config;
public record PmcConfig : BaseConfig
{
[JsonPropertyName("kind")]
public override string Kind { get; set; } = "spt-pmc";
///
/// What game version should the PMC have
///
[JsonPropertyName("gameVersionWeight")]
public required Dictionary GameVersionWeight { get; set; }
///
/// What account type should the PMC have
///
[JsonPropertyName("accountTypeWeight")]
public required Dictionary AccountTypeWeight { get; set; }
///
/// Global whitelist/blacklist of vest loot for PMCs
///
[JsonPropertyName("vestLoot")]
public required SlotLootSettings VestLoot { get; set; }
///
/// Global whitelist/blacklist of pocket loot for PMCs
///
[JsonPropertyName("pocketLoot")]
public required SlotLootSettings PocketLoot { get; set; }
///
/// Global whitelist/blacklist of backpack loot for PMCs
///
[JsonPropertyName("backpackLoot")]
public required SlotLootSettings BackpackLoot { get; set; }
[JsonPropertyName("globalLootBlacklist")]
public required List GlobalLootBlacklist { get; set; }
///
/// Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value
///
[JsonPropertyName("useDifficultyOverride")]
public required bool UseDifficultyOverride { get; set; }
///
/// Difficulty override e.g. "AsOnline/Hard"
///
[JsonPropertyName("difficulty")]
public required string Difficulty { get; set; }
///
/// Chance out of 100 to have a complete gun in backpack
///
[JsonPropertyName("looseWeaponInBackpackChancePercent")]
public required double LooseWeaponInBackpackChancePercent { get; set; }
///
/// Chance out of 100 to have an enhancement applied to PMC weapon
///
[JsonPropertyName("weaponHasEnhancementChancePercent")]
public required double WeaponHasEnhancementChancePercent { get; set; }
///
/// MinMax count of weapons to have in backpack
///
[JsonPropertyName("looseWeaponInBackpackLootMinMax")]
public required MinMax LooseWeaponInBackpackLootMinMax { get; set; }
///
/// Percentage chance PMC will be USEC
///
[JsonPropertyName("isUsec")]
public required double IsUsec { get; set; }
///
/// Force PMCs to use specific armband Tpls
///
[JsonPropertyName("forceArmband")]
public required ForceArmbandSettings ForceArmband { get; set; }
///
/// WildSpawnType enum value USEC PMCs use
///
[JsonPropertyName("usecType")]
public required string UsecType { get; set; }
///
/// WildSpawnType enum value BEAR PMCs use
///
[JsonPropertyName("bearType")]
public required string BearType { get; set; }
[JsonPropertyName("_pmcType")]
public string? PmcTypeDescription { get; set; }
///
/// What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear
///
[JsonPropertyName("pmcType")]
public required Dictionary>> PmcType { get; set; }
[JsonPropertyName("lootSettings")]
public required PmcLootSettings LootSettings { get; set; }
///
/// How many levels above player level can a PMC be
///
[JsonPropertyName("botRelativeLevelDelta")]
public required MinMax BotRelativeLevelDelta { get; set; }
///
/// Force a number of healing items into PMCs secure container to ensure they can heal
///
[JsonPropertyName("forceHealingItemsIntoSecure")]
public required bool ForceHealingItemsIntoSecure { get; set; }
[JsonPropertyName("hostilitySettings")]
public required Dictionary HostilitySettings { get; set; }
[JsonPropertyName("allPMCsHavePlayerNameWithRandomPrefixChance")]
public required double AllPMCsHavePlayerNameWithRandomPrefixChance { get; set; }
[JsonPropertyName("locationSpecificPmcLevelOverride")]
public required Dictionary> LocationSpecificPmcLevelOverride { get; set; }
///
/// Should secure container loot from usec.json/bear.json be added to pmc bots secure
///
[JsonPropertyName("addSecureContainerLootFromBotConfig")]
public required bool AddSecureContainerLootFromBotConfig { get; set; }
[JsonPropertyName("lootItemLimitsRub")]
public required List LootItemLimitsRub { get; set; }
[JsonPropertyName("removeExistingPmcWaves")]
public required bool RemoveExistingPmcWaves { get; set; }
[JsonPropertyName("dogtags")]
public required Dictionary>> DogtagSettings { get; set; }
[JsonPropertyName("customPmcWaves")]
public required Dictionary> CustomPmcWaves { get; set; }
}
public record ForceArmbandSettings
{
[JsonPropertyName("enabled")]
public bool Enabled { get; set; }
[JsonPropertyName("usec")]
public MongoId Usec { get; set; }
[JsonPropertyName("bear")]
public MongoId Bear { get; set; }
}
public record PmcLootSettings
{
[JsonPropertyName("pocket")]
public LootContainerSettings Pocket { get; set; }
[JsonPropertyName("vest")]
public LootContainerSettings Vest { get; set; }
[JsonPropertyName("backpack")]
public LootContainerSettings Backpack { get; set; }
}
public record LootContainerSettings
{
[JsonPropertyName("totalRubByLevel")]
public List TotalRubByLevel { get; set; }
[JsonPropertyName("locationMultiplier")]
public Dictionary LocationMultiplier { get; set; }
}
public record HostilitySettings
{
///
/// Bot roles that are 100% an enemy
///
[JsonPropertyName("additionalEnemyTypes")]
public List? AdditionalEnemyTypes { get; set; }
///
/// Objects that determine the % chance another bot type is an enemy
///
[JsonPropertyName("chancedEnemies")]
public List? ChancedEnemies { get; set; }
[JsonPropertyName("bearEnemyChance")]
public double? BearEnemyChance { get; set; }
[JsonPropertyName("usecEnemyChance")]
public double? UsecEnemyChance { get; set; }
[JsonPropertyName("savageEnemyChance")]
public double? SavageEnemyChance { get; set; }
///
/// Bot roles that are 100% a friendly
///
[JsonPropertyName("additionalFriendlyTypes")]
public List? AdditionalFriendlyTypes { get; set; }
[JsonPropertyName("savagePlayerBehaviour")]
public string? SavagePlayerBehaviour { get; set; }
}
public record SlotLootSettings
{
///
/// Item Type whitelist
///
[JsonPropertyName("whitelist")]
public HashSet Whitelist { get; set; } = [];
///
/// Item tpl blacklist
///
[JsonPropertyName("blacklist")]
public HashSet Blacklist { get; set; } = [];
}
public record MinMaxLootValue : MinMax
{
[JsonPropertyName("value")]
public double Value { get; set; }
}
public record MinMaxLootItemValue : MinMax
{
[JsonPropertyName("backpack")]
public required MinMax Backpack { get; set; }
[JsonPropertyName("pocket")]
public required MinMax Pocket { get; set; }
[JsonPropertyName("vest")]
public required MinMax Vest { get; set; }
}