using System.Text.Json.Serialization; using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Spt.Config; namespace Core.Generators; public class LocationLootGenerator { private LocationConfig _locationConfig; private SeasonalEventConfig _seasonalEventConfig; public LocationLootGenerator() { } /// Create a list of container objects with randomised loot /// /// Map base to generate containers for /// Static ammo distribution /// List of container objects public List GenerateStaticContainers(LocationBase locationBase, Dictionary> staticAmmoDist) { throw new NotImplementedException(); } /// /// Get containers with a non-100% chance to spawn OR are NOT on the container type randomistion blacklist /// /// /// StaticContainerData array protected List GetRandomisableContainersOnMap(List staticContainers) { throw new NotImplementedException(); } /// /// Get containers with 100% spawn rate or have a type on the randomistion ignore list /// /// /// IStaticContainerData array protected List GetGuaranteedContainers(List staticContainersOnMap) { throw new NotImplementedException(); } /// /// Choose a number of containers based on their probabilty value to fulfil the desired count in containerData.chosenCount /// /// Name of the group the containers are being collected for /// Containers and probability values for a groupId /// List of chosen container Ids protected List GetContainersByProbabilty(string groupId, ContainerGroupCount containerData) { throw new NotImplementedException(); } /// /// Get a mapping of each groupid and the containers in that group + count of containers to spawn on map /// /// Container group values /// dictionary keyed by groupId protected Dictionary GetGroupIdToContainerMappings( object staticContainerGroupData, // TODO: Type fuckery staticContainerGroupData was IStaticContainer | Record List staticContainersOnMap) { throw new NotImplementedException(); } /// /// Choose loot to put into a static container based on weighting /// Handle forced items + seasonal item removal when not in season /// /// The container itself we will add loot to /// Loot we need to force into the container /// staticLoot.json /// staticAmmo.json /// Name of the map to generate static loot for /// StaticContainerData protected StaticContainerData AddLootToContainer(StaticContainerData staticContainer, List staticForced, Dictionary staticLootDist, Dictionary> staticAmmoDist, string locationName ) { throw new NotImplementedException(); } /// /// Get a 2D grid of a container's item slots /// /// Tpl id of the container /// List> protected List> GetContainerMapping(string containerTpl) { throw new NotImplementedException(); } /// /// Look up a containers itemcountDistribution data and choose an item count based on the found weights /// /// Container to get item count for /// staticLoot.json /// Map name (to get per-map multiplier for from config) /// item count protected int GetWeightedCountOfContainerItems(string containerTypeId, Dictionary staticLootDist, string locationName) { throw new NotImplementedException(); } /// /// Get all possible loot items that can be placed into a container /// Do not add seasonal items if found + current date is inside seasonal event /// /// Container to get possible loot for /// staticLoot.json /// ProbabilityObjectArray of item tpls + probabilty protected object GetPossibleLootItemsForContainer(string containerTypeId, Dictionary staticLootDist) // TODO: Type Fuckery, return type was ProbabilityObjectArray { throw new NotImplementedException(); } protected double GetLooseLootMultiplerForLocation(string location) { throw new NotImplementedException(); } protected double GetStaticLootMultiplierForLocation(string location) { throw new NotImplementedException(); } /// /// Create array of loose + forced loot using probability system /// /// /// /// Location to generate loot for /// Array of spawn points with loot in them public List GenerateDynamicLoot(LooseLoot dynamicLootDist, Dictionary> staticAmmoDist, string locationName) { throw new NotImplementedException(); } /// /// Add forced spawn point loot into loot parameter list /// /// List to add forced loot spawn locations to /// Forced loot locations that must be added /// Name of map currently having force loot created for protected void addForcedLoot(List lootLocationTemplates, List forcedSpawnPoints, string locationName, Dictionary> staticAmmoDist) { throw new NotImplementedException(); } // TODO: rewrite, BIG yikes protected ContainerItem CreateStaticLootItem(string chosenTemplate, Dictionary> staticAmmoDistribution, string? parentIdentifier = null) { throw new NotImplementedException(); } } public class ContainerGroupCount { [JsonPropertyName("containerIdsWithProbability")] public Dictionary ContainerIdsWithProbability { get; set; } [JsonPropertyName("chosenCount")] public int ChosenCount { get; set; } } public class ContainerItem { [JsonPropertyName("items")] public List Items { get; set; } [JsonPropertyName("width")] public int Width { get; set; } [JsonPropertyName("height")] public int Height { get; set; } }