diff --git a/Core/Models/Spt/Bots/BotGenerationDetails.cs b/Core/Models/Spt/Bots/BotGenerationDetails.cs new file mode 100644 index 00000000..c758c83c --- /dev/null +++ b/Core/Models/Spt/Bots/BotGenerationDetails.cs @@ -0,0 +1,76 @@ +using System.Text.Json.Serialization; +using Core.Models.Common; + +namespace Core.Models.Spt.Bots; + +public class BotGenerationDetails +{ + /// + /// Should the bot be generated as a PMC + /// + [JsonPropertyName("isPmc")] + public bool IsPmc { get; set; } + + /// + /// assault/pmcBot etc + /// + [JsonPropertyName("role")] + public string Role { get; set; } + + /// + /// Side of bot + /// + [JsonPropertyName("side")] + public string Side { get; set; } + + /// + /// Active players current level + /// + [JsonPropertyName("playerLevel")] + public int? PlayerLevel { get; set; } + + [JsonPropertyName("playerName")] + public string? PlayerName { get; set; } + + /// + /// Level specific overrides for PMC level + /// + [JsonPropertyName("locationSpecificPmcLevelOverride")] + public MinMax? LocationSpecificPmcLevelOverride { get; set; } + + /// + /// Delta of highest level of bot e.g. 50 means 50 levels above player + /// + [JsonPropertyName("botRelativeLevelDeltaMax")] + public int BotRelativeLevelDeltaMax { get; set; } + + /// + /// Delta of lowest level of bot e.g. 50 means 50 levels below player + /// + [JsonPropertyName("botRelativeLevelDeltaMin")] + public int BotRelativeLevelDeltaMin { get; set; } + + /// + /// How many to create and store + /// + [JsonPropertyName("botCountToGenerate")] + public int BotCountToGenerate { get; set; } + + /// + /// Desired difficulty of the bot + /// + [JsonPropertyName("botDifficulty")] + public string BotDifficulty { get; set; } + + /// + /// Will the generated bot be a player scav + /// + [JsonPropertyName("isPlayerScav")] + public bool IsPlayerScav { get; set; } + + [JsonPropertyName("eventRole")] + public string? EventRole { get; set; } + + [JsonPropertyName("allPmcsHaveSameNameAsPlayer")] + public bool? AllPmcsHaveSameNameAsPlayer { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Bots/BotLootCache.cs b/Core/Models/Spt/Bots/BotLootCache.cs new file mode 100644 index 00000000..7eb83d39 --- /dev/null +++ b/Core/Models/Spt/Bots/BotLootCache.cs @@ -0,0 +1,62 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Spt.Bots; + +public class BotLootCache +{ + [JsonPropertyName("backpackLoot")] + public Dictionary BackpackLoot { get; set; } + + [JsonPropertyName("pocketLoot")] + public Dictionary PocketLoot { get; set; } + + [JsonPropertyName("vestLoot")] + public Dictionary VestLoot { get; set; } + + [JsonPropertyName("secureLoot")] + public Dictionary SecureLoot { get; set; } + + [JsonPropertyName("combinedPoolLoot")] + public Dictionary CombinedPoolLoot { get; set; } + + [JsonPropertyName("specialItems")] + public Dictionary SpecialItems { get; set; } + + [JsonPropertyName("healingItems")] + public Dictionary HealingItems { get; set; } + + [JsonPropertyName("drugItems")] + public Dictionary DrugItems { get; set; } + + [JsonPropertyName("foodItems")] + public Dictionary FoodItems { get; set; } + + [JsonPropertyName("drinkItems")] + public Dictionary DrinkItems { get; set; } + + [JsonPropertyName("currencyItems")] + public Dictionary CurrencyItems { get; set; } + + [JsonPropertyName("stimItems")] + public Dictionary StimItems { get; set; } + + [JsonPropertyName("grenadeItems")] + public Dictionary GrenadeItems { get; set; } +} + +public static class LootCacheType +{ + public const string Special = "Special"; + public const string Backpack = "Backpack"; + public const string Pocket = "Pocket"; + public const string Vest = "Vest"; + public const string Secure = "SecuredContainer"; + public const string Combined = "Combined"; + public const string HealingItems = "HealingItems"; + public const string DrugItems = "DrugItems"; + public const string StimItems = "StimItems"; + public const string GrenadeItems = "GrenadeItems"; + public const string FoodItems = "FoodItems"; + public const string DrinkItems = "DrinkItems"; + public const string CurrencyItems = "CurrencyItems"; +} \ No newline at end of file diff --git a/Core/Models/Spt/Bots/ChooseRandomCompatibleModResult.cs b/Core/Models/Spt/Bots/ChooseRandomCompatibleModResult.cs new file mode 100644 index 00000000..eb84769c --- /dev/null +++ b/Core/Models/Spt/Bots/ChooseRandomCompatibleModResult.cs @@ -0,0 +1,21 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Spt.Bots; + +public class ChooseRandomCompatibleModResult +{ + [JsonPropertyName("incompatible")] + public bool Incompatible { get; set; } + + [JsonPropertyName("found")] + public bool? Found { get; set; } + + [JsonPropertyName("chosenTpl")] + public string? ChosenTemplate { get; set; } + + [JsonPropertyName("reason")] + public string Reason { get; set; } + + [JsonPropertyName("slotBlocked")] + public bool? SlotBlocked { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Bots/FilterPlateModsForSlotByLevelResult.cs b/Core/Models/Spt/Bots/FilterPlateModsForSlotByLevelResult.cs new file mode 100644 index 00000000..4e8ac73d --- /dev/null +++ b/Core/Models/Spt/Bots/FilterPlateModsForSlotByLevelResult.cs @@ -0,0 +1,21 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Spt.Bots; + +public class FilterPlateModsForSlotByLevelResult +{ + [JsonPropertyName("result")] + public Result Result { get; set; } + + [JsonPropertyName("plateModTpls")] + public List PlateModTemplates { get; set; } +} + +public enum Result +{ + UNKNOWN_FAILURE = -1, + SUCCESS = 1, + NO_DEFAULT_FILTER = 2, + NOT_PLATE_HOLDING_SLOT = 3, + LACKS_PLATE_WEIGHTS = 4, +} \ No newline at end of file diff --git a/Core/Models/Spt/Bots/GenerateEquipmentProperties.cs b/Core/Models/Spt/Bots/GenerateEquipmentProperties.cs new file mode 100644 index 00000000..e07f0549 --- /dev/null +++ b/Core/Models/Spt/Bots/GenerateEquipmentProperties.cs @@ -0,0 +1,56 @@ +using System.Text.Json.Serialization; +using Core.Models.Eft.Common.Tables; +using Core.Models.Spt.Config; + +namespace Core.Models.Spt.Bots; + +public class GenerateEquipmentProperties +{ + /// + /// Root Slot being generated + /// + [JsonPropertyName("rootEquipmentSlot")] + public string RootEquipmentSlot { get; set; } + + /// + /// Equipment pool for root slot being generated + /// + [JsonPropertyName("rootEquipmentPool")] + public Dictionary RootEquipmentPool { get; set; } + + [JsonPropertyName("modPool")] + public Mods ModPool { get; set; } + + /// + /// Dictionary of mod items and their chance to spawn for this bot type + /// + [JsonPropertyName("spawnChances")] + public Chances SpawnChances { get; set; } + + /// + /// Bot-specific properties + /// + [JsonPropertyName("botData")] + public BotData BotData { get; set; } + + [JsonPropertyName("inventory")] + public PmcInventory Inventory { get; set; } + + [JsonPropertyName("botEquipmentConfig")] + public EquipmentFilters BotEquipmentConfig { get; set; } + + /// + /// Settings from bot.json to adjust how item is generated + /// + [JsonPropertyName("randomisationDetails")] + public RandomisationDetails RandomisationDetails { get; set; } + + /// + /// OPTIONAL - Do not generate mods for tpls in this array + /// + [JsonPropertyName("generateModsBlacklist")] + public List GenerateModsBlacklist { get; set; } + + [JsonPropertyName("generatingPlayerLevel")] + public int GeneratingPlayerLevel { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Bots/GenerateWeaponRequest.cs b/Core/Models/Spt/Bots/GenerateWeaponRequest.cs new file mode 100644 index 00000000..b0e14e0f --- /dev/null +++ b/Core/Models/Spt/Bots/GenerateWeaponRequest.cs @@ -0,0 +1,74 @@ +using System.Text.Json.Serialization; +using Core.Models.Eft.Common.Tables; + +namespace Core.Models.Spt.Bots; + +public class GenerateWeaponRequest +{ + /** Weapon to add mods to / result that is returned */ + [JsonPropertyName("weapon")] + public List Weapon { get; set; } + + /** Pool of compatible mods to attach to weapon */ + [JsonPropertyName("modPool")] + public Mods ModPool { get; set; } + + /** ParentId of weapon */ + [JsonPropertyName("weaponId")] + public string WeaponId { get; set; } + + /** Weapon which mods will be generated on */ + [JsonPropertyName("parentTemplate")] + public TemplateItem ParentTemplate { get; set; } + + /** Chance values mod will be added */ + [JsonPropertyName("modSpawnChances")] + public ModsChances ModSpawnChances { get; set; } + + /** Ammo tpl to use when generating magazines/cartridges */ + [JsonPropertyName("ammoTpl")] + public string AmmoTpl { get; set; } + + /** Bot-specific properties */ + [JsonPropertyName("botData")] + public BotData BotData { get; set; } + + /** limits placed on certain mod types per gun */ + [JsonPropertyName("modLimits")] + public BotModLimits ModLimits { get; set; } + + /** Info related to the weapon being generated */ + [JsonPropertyName("weaponStats")] + public WeaponStats WeaponStats { get; set; } + + /** Array of item tpls the weapon does not support */ + [JsonPropertyName("conflictingItemTpls")] + public HashSet ConflictingItemTpls { get; set; } +} + +public class BotData +{ + /** Role of bot weapon is generated for */ + [JsonPropertyName("role")] + public string Role { get; set; } + + /** Level of the bot weapon is being generated for */ + [JsonPropertyName("level")] + public int Level { get; set; } + + /** role of bot when accessing bot.json equipment config settings */ + [JsonPropertyName("equipmentRole")] + public string EquipmentRole { get; set; } +} + +public class WeaponStats +{ + [JsonPropertyName("hasOptic")] + public bool? HasOptic { get; set; } + + [JsonPropertyName("hasFrontIronSight")] + public bool? HasFrontIronSight { get; set; } + + [JsonPropertyName("hasRearIronSight")] + public bool? HasRearIronSight { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Bots/GenerateWeaponResult.cs b/Core/Models/Spt/Bots/GenerateWeaponResult.cs new file mode 100644 index 00000000..a1603cc8 --- /dev/null +++ b/Core/Models/Spt/Bots/GenerateWeaponResult.cs @@ -0,0 +1,22 @@ +using System.Text.Json.Serialization; +using Core.Models.Eft.Common.Tables; + +namespace Core.Models.Spt.Bots; + +public class GenerateWeaponResult +{ + [JsonPropertyName("weapon")] + public List Weapon { get; set; } + + [JsonPropertyName("chosenAmmoTpl")] + public string ChosenAmmoTemplate { get; set; } + + [JsonPropertyName("chosenUbglAmmoTpl")] + public string ChosenUbglAmmoTemplate { get; set; } + + [JsonPropertyName("weaponMods")] + public Mods WeaponMods { get; set; } + + [JsonPropertyName("weaponTemplate")] + public TemplateItem WeaponTemplate { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Bots/ItemSpawnLimitSettings.cs b/Core/Models/Spt/Bots/ItemSpawnLimitSettings.cs new file mode 100644 index 00000000..1d46b19c --- /dev/null +++ b/Core/Models/Spt/Bots/ItemSpawnLimitSettings.cs @@ -0,0 +1,12 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Spt.Bots; + +public class ItemSpawnLimitSettings +{ + [JsonPropertyName("currentLimits")] + public Dictionary CurrentLimits { get; set; } + + [JsonPropertyName("globalLimits")] + public Dictionary GlobalLimits { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Bots/ModToSpawnRequest.cs b/Core/Models/Spt/Bots/ModToSpawnRequest.cs new file mode 100644 index 00000000..6db35e39 --- /dev/null +++ b/Core/Models/Spt/Bots/ModToSpawnRequest.cs @@ -0,0 +1,80 @@ +using System.Text.Json.Serialization; +using Core.Models.Eft.Common.Tables; +using Core.Models.Spt.Config; + +namespace Core.Models.Spt.Bots; + +public class ModToSpawnRequest +{ + /// + /// Slot mod will fit into + /// + [JsonPropertyName("modSlot")] + public string ModSlot { get; set; } + + /// + /// Will generate a randomised mod pool if true + /// + [JsonPropertyName("isRandomisableSlot")] + public bool IsRandomisableSlot { get; set; } + + [JsonPropertyName("randomisationSettings")] + public RandomisationDetails RandomisationSettings { get; set; } + + /// + /// Parent slot the item will be a part of + /// + [JsonPropertyName("botWeaponSightWhitelist")] + public Dictionary> BotWeaponSightWhitelist { get; set; } + + /// + /// Blacklist to prevent mods from being picked + /// + [JsonPropertyName("botEquipBlacklist")] + public EquipmentFilterDetails BotEquipBlacklist { get; set; } + + /// + /// Pool of items to pick from + /// + [JsonPropertyName("itemModPool")] + public Dictionary> ItemModPool { get; set; } + + /// + /// List with only weapon tpl in it, ready for mods to be added + /// + [JsonPropertyName("weapon")] + public List Weapon { get; set; } + + /// + /// Ammo tpl to use if slot requires a cartridge to be added (e.g. mod_magazine) + /// + [JsonPropertyName("ammoTpl")] + public string AmmoTpl { get; set; } + + /// + /// Parent item the mod will go into + /// + [JsonPropertyName("parentTemplate")] + public TemplateItem ParentTemplate { get; set; } + + /// + /// Should mod be spawned/skipped/use default + /// + [JsonPropertyName("modSpawnResult")] + public ModSpawn ModSpawnResult { get; set; } + + /// + /// Weapon stats for weapon being generated + /// + [JsonPropertyName("weaponStats")] + public WeaponStats WeaponStats { get; set; } + + /// + /// List of item tpls the weapon does not support + /// + [JsonPropertyName("conflictingItemTpls")] + public HashSet ConflictingItemTpls { get; set; } + + [JsonPropertyName("botData")] + public BotData BotData { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Services/InsuranceEquipmentPkg.cs b/Core/Models/Spt/Services/InsuranceEquipmentPkg.cs new file mode 100644 index 00000000..305e4894 --- /dev/null +++ b/Core/Models/Spt/Services/InsuranceEquipmentPkg.cs @@ -0,0 +1,20 @@ +using System.Text.Json.Serialization; +using Core.Models.Eft.Common; +using Core.Models.Eft.Common.Tables; + +namespace Core.Models.Spt.Services; + +public class InsuranceEquipmentPkg +{ + [JsonPropertyName("sessionID")] + public string SessionId { get; set; } + + [JsonPropertyName("pmcData")] + public PmcData PmcData { get; set; } + + [JsonPropertyName("itemToReturnToPlayer")] + public Item ItemToReturnToPlayer { get; set; } + + [JsonPropertyName("traderId")] + public string TraderId { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Services/LootItem.cs b/Core/Models/Spt/Services/LootItem.cs new file mode 100644 index 00000000..1133bbf2 --- /dev/null +++ b/Core/Models/Spt/Services/LootItem.cs @@ -0,0 +1,18 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Spt.Services; + +public class LootItem +{ + [JsonPropertyName("id")] + public string? Id { get; set; } + + [JsonPropertyName("tpl")] + public string Tpl { get; set; } + + [JsonPropertyName("isPreset")] + public bool IsPreset { get; set; } + + [JsonPropertyName("stackCount")] + public int StackCount { get; set; } +} \ No newline at end of file diff --git a/Core/Models/Spt/Weather/GetLocalWeatherResponseData.cs b/Core/Models/Spt/Weather/GetLocalWeatherResponseData.cs new file mode 100644 index 00000000..e9aca3e8 --- /dev/null +++ b/Core/Models/Spt/Weather/GetLocalWeatherResponseData.cs @@ -0,0 +1,12 @@ +using System.Text.Json.Serialization; + +namespace Core.Models.Spt.Weather; + +public class GetLocalWeatherResponseData +{ + [JsonPropertyName("season")] + public int Season { get; set; } + + [JsonPropertyName("weather")] + public List Weather { get; set; } +} \ No newline at end of file