Replaced lists containing unique values with HashSets

Reworked Soft Insert id checks

Improved dogtag id lookup memory usage

Removed wave cleanup code
This commit is contained in:
Chomp
2025-02-17 19:05:47 +00:00
parent ea7b3919c0
commit 1ff8d2cbef
58 changed files with 228 additions and 246 deletions
@@ -301,7 +301,7 @@ public record TaskConditionCounter
public record UnlockedInfo
{
[JsonPropertyName("unlockedProductionRecipe")]
public List<string>? UnlockedProductionRecipe
public HashSet<string>? UnlockedProductionRecipe
{
get;
set;
@@ -97,7 +97,7 @@ public record Reward
* Game editions whitelisted to get reward
*/
[JsonPropertyName("availableInGameEditions")]
public List<string>? AvailableInGameEditions
public HashSet<string>? AvailableInGameEditions
{
get;
set;
@@ -107,7 +107,7 @@ public record Reward
* Game editions blacklisted from getting reward
*/
[JsonPropertyName("notAvailableInGameEditions")]
public List<string>? NotAvailableInGameEditions
public HashSet<string>? NotAvailableInGameEditions
{
get;
set;
@@ -482,7 +482,7 @@ public record Props
}
[JsonPropertyName("ConflictingItems")]
public List<string>? ConflictingItems
public HashSet<string>? ConflictingItems
{
get;
set;
@@ -1509,7 +1509,7 @@ public record Props
}
[JsonPropertyName("weapFireType")]
public List<string>? WeapFireType
public HashSet<string>? WeapFireType
{
get;
set;
@@ -3604,7 +3604,7 @@ public record GridProps
public record GridFilter
{
[JsonPropertyName("Filter")]
public List<string>? Filter
public HashSet<string>? Filter
{
get;
set;
@@ -3755,7 +3755,7 @@ public record SlotFilter
}
[JsonPropertyName("Filter")]
public List<string>? Filter
public HashSet<string>? Filter
{
get;
set;
@@ -733,7 +733,7 @@ public record Spt
* item TPLs blacklisted from being sold on flea for this profile
*/
[JsonPropertyName("blacklistedItemTpls")]
public List<string>? BlacklistedItemTemplates
public HashSet<string>? BlacklistedItemTemplates
{
get;
set;
+1 -1
View File
@@ -7,7 +7,7 @@ public record Money
public const string DOLLARS = "5696686a4bdc2da3298b456a";
public const string GP = "5d235b4d86f7742e017bc88a";
public static List<string> GetMoneyTpls()
public static HashSet<string> GetMoneyTpls()
{
return [ROUBLES, EUROS, DOLLARS, GP];
}
@@ -82,7 +82,7 @@ public record GenerateEquipmentProperties
/// OPTIONAL - Do not generate mods for tpls in this array
/// </summary>
[JsonPropertyName("generateModsBlacklist")]
public List<string>? GenerateModsBlacklist
public HashSet<string>? GenerateModsBlacklist
{
get;
set;
@@ -160,7 +160,7 @@ public record BotConfig : BaseConfig
* Bot roles in this array will be given a dog tag on generation
*/
[JsonPropertyName("botRolesWithDogTags")]
public List<string> BotRolesWithDogTags
public HashSet<string> BotRolesWithDogTags
{
get;
set;
@@ -190,7 +190,7 @@ public record BotConfig : BaseConfig
* Tpls for low profile gas blocks
*/
[JsonPropertyName("lowProfileGasBlockTpls")]
public List<string> LowProfileGasBlockTpls
public HashSet<string> LowProfileGasBlockTpls
{
get;
set;
@@ -200,7 +200,7 @@ public record BotConfig : BaseConfig
* What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/
*/
[JsonPropertyName("disableLootOnBotTypes")]
public List<string> DisableLootOnBotTypes
public HashSet<string> DisableLootOnBotTypes
{
get;
set;
@@ -220,7 +220,7 @@ public record BotConfig : BaseConfig
* Bot roles that must have a unique name when generated vs other bots in raid
*/
[JsonPropertyName("botRolesThatMustHaveUniqueName")]
public List<string> BotRolesThatMustHaveUniqueName
public HashSet<string> BotRolesThatMustHaveUniqueName
{
get;
set;
@@ -702,7 +702,7 @@ public record EquipmentFilters
/// What additional slot ids should be seen as required when choosing a mod to add to a weapon
/// </summary>
[JsonPropertyName("weaponSlotIdsToMakeRequired")]
public List<string>? WeaponSlotIdsToMakeRequired
public HashSet<string>? WeaponSlotIdsToMakeRequired
{
get;
set;
@@ -929,7 +929,7 @@ public record EquipmentFilterDetails
/// Key: mod slot name e.g. mod_magazine, value: item tpls
/// </summary>
[JsonPropertyName("equipment")]
public Dictionary<string, List<string>>? Equipment
public Dictionary<string, HashSet<string>>? Equipment
{
get;
set;
@@ -939,7 +939,7 @@ public record EquipmentFilterDetails
/// Key: equipment slot name e.g. FirstPrimaryWeapon, value: item tpls
/// </summary>
[JsonPropertyName("gear")]
public Dictionary<EquipmentSlots, List<string>>? Gear
public Dictionary<EquipmentSlots, HashSet<string>>? Gear
{
get;
set;
@@ -949,7 +949,7 @@ public record EquipmentFilterDetails
/// Key: cartridge type e.g. Caliber23x75, value: item tpls
/// </summary>
[JsonPropertyName("cartridge")]
public Dictionary<string, List<string>>? Cartridge
public Dictionary<string, HashSet<string>>? Cartridge
{
get;
set;
@@ -335,7 +335,7 @@ public record ServerFeatures
* Keyed to profile type e.g. "Standard" or "SPT Developer"
*/
[JsonPropertyName("createNewProfileTypesBlacklist")]
public List<string> CreateNewProfileTypesBlacklist
public HashSet<string> CreateNewProfileTypesBlacklist
{
get;
set;
@@ -60,7 +60,7 @@ public record InventoryConfig : BaseConfig
* Container Tpls that should be deprioritised when choosing where to take money from for payments
*/
[JsonPropertyName("deprioritisedMoneyContainers")]
public List<string> DeprioritisedMoneyContainers
public HashSet<string> DeprioritisedMoneyContainers
{
get;
set;
@@ -51,7 +51,7 @@ public record LocationConfig : BaseConfig
/// Open zones to add to map
/// </summary>
[JsonPropertyName("openZones")]
public Dictionary<string, List<string>> OpenZones
public Dictionary<string, HashSet<string>> OpenZones
{
get;
set;
@@ -61,7 +61,7 @@ public record LocationConfig : BaseConfig
/// Key = map id, value = item tpls that should only have one forced loot spawn position
/// </summary>
[JsonPropertyName("forcedLootSingleSpawnById")]
public Dictionary<string, List<string>> ForcedLootSingleSpawnById
public Dictionary<string, HashSet<string>> ForcedLootSingleSpawnById
{
get;
set;
@@ -218,7 +218,7 @@ public record LocationConfig : BaseConfig
/// Containers to remove all children from when generating static/loose loot
/// </summary>
[JsonPropertyName("tplsToStripChildItemsFrom")]
public List<string> TplsToStripChildItemsFrom
public HashSet<string> TplsToStripChildItemsFrom
{
get;
set;
@@ -228,7 +228,7 @@ public record LocationConfig : BaseConfig
/// Map ids players cannot visit
/// </summary>
[JsonPropertyName("nonMaps")]
public List<string> NonMaps
public HashSet<string> NonMaps
{
get;
set;
@@ -370,7 +370,7 @@ public record SlotLootSettings
* Item Type whitelist
*/
[JsonPropertyName("whitelist")]
public List<string> Whitelist
public HashSet<string> Whitelist
{
get;
set;
@@ -380,7 +380,7 @@ public record SlotLootSettings
* Item tpl blacklist
*/
[JsonPropertyName("blacklist")]
public List<string> Blacklist
public HashSet<string> Blacklist
{
get;
set;
@@ -62,14 +62,14 @@ public record QuestConfig : BaseConfig
}
[JsonPropertyName("bearOnlyQuests")]
public List<string>? BearOnlyQuests
public HashSet<string>? BearOnlyQuests
{
get;
set;
}
[JsonPropertyName("usecOnlyQuests")]
public List<string>? UsecOnlyQuests
public HashSet<string>? UsecOnlyQuests
{
get;
set;
@@ -79,7 +79,7 @@ public record QuestConfig : BaseConfig
* Quests that the keyed game version do not see/access
*/
[JsonPropertyName("profileBlacklist")]
public Dictionary<string, List<string>>? ProfileBlacklist
public Dictionary<string, HashSet<string>>? ProfileBlacklist
{
get;
set;
@@ -89,7 +89,7 @@ public record QuestConfig : BaseConfig
* key=questid, gameversions that can see/access quest
*/
[JsonPropertyName("profileWhitelist")]
public Dictionary<string, List<string>>? ProfileWhitelist
public Dictionary<string, HashSet<string>>? ProfileWhitelist
{
get;
set;
@@ -266,7 +266,7 @@ public record RepeatableQuestConfig
* Item base types to block when generating rewards
*/
[JsonPropertyName("rewardBaseTypeBlacklist")]
public List<string>? RewardBaseTypeBlacklist
public HashSet<string>? RewardBaseTypeBlacklist
{
get;
set;
@@ -276,7 +276,7 @@ public record RepeatableQuestConfig
* Item tplIds to ignore when generating rewards
*/
[JsonPropertyName("rewardBlacklist")]
public List<string>? RewardBlacklist
public HashSet<string>? RewardBlacklist
{
get;
set;
@@ -228,7 +228,7 @@ public record Dynamic
[JsonPropertyName("ignoreQualityPriceVarianceBlacklist")]
/** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */
public List<string> IgnoreQualityPriceVarianceBlacklist
public HashSet<string> IgnoreQualityPriceVarianceBlacklist
{
get;
set;
@@ -306,7 +306,7 @@ public record Dynamic
[JsonPropertyName("showAsSingleStack")]
/** Item tpls that should be forced to sell as a single item */
public List<string> ShowAsSingleStack
public HashSet<string> ShowAsSingleStack
{
get;
set;
@@ -435,7 +435,7 @@ public record BarterDetails
* Item Tpls to never be turned into a barter
*/
[JsonPropertyName("itemTypeBlacklist")]
public List<string> ItemTypeBlacklist
public HashSet<string> ItemTypeBlacklist
{
get;
set;
@@ -578,7 +578,7 @@ public record RagfairBlacklist
/// Custom blacklist for item Tpls
/// </summary>
[JsonPropertyName("custom")]
public List<string> Custom
public HashSet<string> Custom
{
get;
set;
@@ -638,7 +638,7 @@ public record RagfairBlacklist
/// Custom category blacklist for parent Ids
/// </summary>
[JsonPropertyName("customItemCategoryList")]
public List<string> CustomItemCategoryList
public HashSet<string> CustomItemCategoryList
{
get;
set;
@@ -661,7 +661,7 @@ public record ArmorPlateBlacklistSettings
/// Item slots to NOT remove from items on flea
/// </summary>
[JsonPropertyName("ignoreSlots")]
public List<string> IgnoreSlots
public HashSet<string> IgnoreSlots
{
get;
set;
@@ -724,7 +724,7 @@ public record ArmorSettings
/// What slots are to be removed when removeRemovablePlateChance is true
/// </summary>
[JsonPropertyName("plateSlotIdToRemovePool")]
public List<string> PlateSlotIdToRemovePool
public HashSet<string>? PlateSlotIdToRemovePool
{
get;
set;
@@ -34,14 +34,14 @@ public record ScavCaseConfig : BaseConfig
}
[JsonPropertyName("rewardItemParentBlacklist")]
public List<string> RewardItemParentBlacklist
public HashSet<string> RewardItemParentBlacklist
{
get;
set;
}
[JsonPropertyName("rewardItemBlacklist")]
public List<string> RewardItemBlacklist
public HashSet<string> RewardItemBlacklist
{
get;
set;
@@ -250,7 +250,7 @@ public record FenceConfig
}
[JsonPropertyName("blacklist")]
public List<string> Blacklist
public HashSet<string> Blacklist
{
get;
set;
@@ -50,7 +50,7 @@ public record LootRequest
/// Item tpl blacklist to exclude
/// </summary>
[JsonPropertyName("itemBlacklist")]
public List<string>? ItemBlacklist
public HashSet<string>? ItemBlacklist
{
get;
set;