using System.Text.Json.Serialization;
using SptCommon.Annotations;
using Core.Models.Common;
using Core.Models.Eft.Common;
using Core.Models.Eft.Common.Tables;
using Core.Models.Spt.Config;
using Core.Models.Spt.Services;
namespace Core.Generators;
[Injectable]
public class LootGenerator(
)
{
///
/// Generate a list of items based on configuration options parameter
///
/// parameters to adjust how loot is generated
/// An array of loot items
public List- CreateRandomLoot(LootRequest options)
{
throw new NotImplementedException();
}
///
/// Generate An array of items
/// TODO - handle weapon presets/ammo packs
///
/// Dictionary of item tpls with minmax values
/// Array of Item
public List
- CreateForcedLoot(Dictionary forcedLootDict)
{
throw new NotImplementedException();
}
///
/// Get pool of items from item db that fit passed in param criteria
///
/// Prevent these items
/// Only allow these items
/// Should item.json reward item config be used
/// Should boss items be allowed in result
/// results of filtering + blacklist used
protected object GetItemRewardPool(List itemTplBlacklist, List itemTypeWhitelist,
bool useRewardItemBlacklist, // TODO: type fuckery, return type was { itemPool: [string, ITemplateItem][]; blacklist: Set }
bool allowBossItems)
{
throw new NotImplementedException();
}
///
/// Filter armor items by their front plates protection level - top if its a helmet
///
/// Armor preset to check
/// Loot request options - armor level etc
/// True if item has desired armor level
protected bool ArmorOfDesiredProtectionLevel(Preset armor, LootRequest options)
{
throw new NotImplementedException();
}
///
/// Construct item limit record to hold max and current item count for each item type
///
/// limits as defined in config
/// record, key: item tplId, value: current/max item count allowed
protected Dictionary InitItemLimitCounter(Dictionary limits)
{
throw new NotImplementedException();
}
///
/// Find a random item in items.json and add to result array
///
/// items to choose from
/// item limit counts
/// item filters
/// array to add found item to
/// true if item was valid and added to pool
protected bool FindAndAddRandomItemToLoot(object items, object itemTypeCounts,
LootRequest options, // TODO: items type was [string, ITemplateItem][], itemTypeCounts was Record
List
- result)
{
throw new NotImplementedException();
}
///
/// Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values
///
/// item to get stack count of
/// loot options
/// stack count
protected int GetRandomisedStackCount(TemplateItem item, LootRequest options)
{
throw new NotImplementedException();
}
///
/// Find a random item in items.json and add to result list
///
/// Presets to choose from
/// Item limit counts
/// Items to skip
/// List to add chosen preset to
/// true if preset was valid and added to pool
protected bool FindAndAddRandomPresetToLoot(List presetPool, object itemTypeCounts,
List itemBlacklist, // TODO: type fuckery, itemTypeCounts was Record
List
- result)
{
throw new NotImplementedException();
}
///
/// Sealed weapon containers have a weapon + associated mods inside them + assortment of other things (food/meds)
///
/// sealed weapon container settings
/// List of items with children lists
public List
> GetSealedWeaponCaseLoot(SealedAirdropContainerSettings containerSettings)
{
throw new NotImplementedException();
}
///
/// Get non-weapon mod rewards for a sealed container
///
/// Sealed weapon container settings
/// Details for the weapon to reward player
/// List of item with children lists
protected List> GetSealedContainerNonWeaponModRewards(SealedAirdropContainerSettings containerSettings,
TemplateItem weaponDetailsDb)
{
throw new NotImplementedException();
}
///
/// Iterate over the container weaponModRewardLimits settings and create a list of weapon mods to reward player
///
/// Sealed weapon container settings
/// All items that can be attached/inserted into weapon
/// The weapon preset given to player as reward
/// List of item with children lists
protected List> GetSealedContainerWeaponModRewards(SealedAirdropContainerSettings containerSettings, List linkedItemsToWeapon,
Preset chosenWeaponPreset)
{
throw new NotImplementedException();
}
///
/// Handle event-related loot containers - currently just the halloween jack-o-lanterns that give food rewards
///
///
/// List of item with children lists
public List> GetRandomLootContainerLoot(RewardDetails rewardContainerDetails)
{
throw new NotImplementedException();
}
///
/// Pick a reward item based on the reward details data
///
///
/// Single tpl
protected string PickRewardItem(RewardDetails rewardContainerDetails)
{
throw new NotImplementedException();
}
}
public class ItemLimit
{
[JsonPropertyName("current")]
public double Current { get; set; }
[JsonPropertyName("max")]
public double Max { get; set; }
}