list to ienumerable
This commit is contained in:
@@ -209,7 +209,7 @@ public class QuestController(
|
||||
)
|
||||
{
|
||||
var quest = questHelper.GetQuestFromDb(request.QuestId, pmcData);
|
||||
List<string> handoverQuestTypes = ["HandoverItem", "WeaponAssembly"];
|
||||
HashSet<string> handoverQuestTypes = ["HandoverItem", "WeaponAssembly"];
|
||||
var output = eventOutputHolder.GetOutput(sessionID);
|
||||
|
||||
var isItemHandoverQuest = true;
|
||||
|
||||
@@ -197,7 +197,8 @@ public class BotEquipmentModGenerator(
|
||||
);
|
||||
switch (plateSlotFilteringOutcome.Result)
|
||||
{
|
||||
case Result.UNKNOWN_FAILURE or Result.NO_DEFAULT_FILTER:
|
||||
case Result.UNKNOWN_FAILURE
|
||||
or Result.NO_DEFAULT_FILTER:
|
||||
if (logger.IsLogEnabled(LogLevel.Debug))
|
||||
{
|
||||
logger.Debug(
|
||||
@@ -844,8 +845,8 @@ public class BotEquipmentModGenerator(
|
||||
|
||||
return item.Properties.Slots is null
|
||||
|| !item.Properties.Slots.Any()
|
||||
&& item.Properties.Cartridges?.Count == 0
|
||||
&& item.Properties.Chambers?.Count == 0;
|
||||
&& !item.Properties.Cartridges.Any()
|
||||
&& !item.Properties.Chambers.Any();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1342,7 +1343,7 @@ public class BotEquipmentModGenerator(
|
||||
|
||||
// Filter modpool to only items that appear in parents allowed list
|
||||
preFilteredModPool = preFilteredModPool
|
||||
.Where(tpl => parentSlot.Props.Filters[0].Filter.Contains(tpl))
|
||||
.Where(tpl => parentSlot.Props.Filters.First().Filter.Contains(tpl))
|
||||
.ToHashSet();
|
||||
if (preFilteredModPool.Count == 0)
|
||||
{
|
||||
@@ -1554,7 +1555,8 @@ public class BotEquipmentModGenerator(
|
||||
StringComparison.Ordinal
|
||||
)
|
||||
)
|
||||
?.Props.Filters?[0].Filter;
|
||||
?.Props.Filters?.First()
|
||||
.Filter;
|
||||
|
||||
// Mod isn't in existing pool, only add if it has no children and exists inside parent filter
|
||||
if (
|
||||
@@ -1721,7 +1723,7 @@ public class BotEquipmentModGenerator(
|
||||
)
|
||||
{
|
||||
// Find compatible mods and make an array of them
|
||||
var allowedItems = parentSlot.Props.Filters[0].Filter;
|
||||
var allowedItems = parentSlot.Props.Filters.First().Filter;
|
||||
|
||||
// Find mod item that fits slot from sorted mod array
|
||||
var exhaustableModPool = CreateExhaustableArray(allowedItems);
|
||||
@@ -1964,9 +1966,9 @@ public class BotEquipmentModGenerator(
|
||||
modPool[cylinderMagTemplate.Id] = new Dictionary<string, HashSet<MongoId>>();
|
||||
foreach (var camora in camoraSlots)
|
||||
{
|
||||
modPool[cylinderMagTemplate.Id][camora.Name] = camora.Props.Filters?[
|
||||
0
|
||||
].Filter.ToHashSet();
|
||||
modPool[cylinderMagTemplate.Id][camora.Name] = camora
|
||||
.Props.Filters.First()
|
||||
.Filter.ToHashSet();
|
||||
}
|
||||
|
||||
itemModPool = modPool[cylinderMagTemplate.Id];
|
||||
|
||||
@@ -228,7 +228,7 @@ public class BotWeaponGenerator(
|
||||
|
||||
// Add cartridge(s) to gun chamber(s)
|
||||
if (
|
||||
weaponItemTemplate.Properties?.Chambers?.Count > 0
|
||||
(weaponItemTemplate.Properties?.Chambers).Any()
|
||||
&& weaponItemTemplate
|
||||
.Properties.Chambers.FirstOrDefault()
|
||||
.Props.Filters.FirstOrDefault()
|
||||
@@ -768,7 +768,8 @@ public class BotWeaponGenerator(
|
||||
|
||||
var cartridges = weaponTemplate
|
||||
.Properties?.Chambers?.FirstOrDefault()
|
||||
?.Props?.Filters?[0].Filter;
|
||||
?.Props?.Filters?.First()
|
||||
.Filter;
|
||||
if (cartridges is not null)
|
||||
{
|
||||
return cartridges;
|
||||
@@ -845,7 +846,10 @@ public class BotWeaponGenerator(
|
||||
if (!string.IsNullOrEmpty(weaponTemplate.Properties.LinkedWeapon))
|
||||
{
|
||||
var ammoInChamber = itemHelper.GetItem(
|
||||
weaponTemplate.Properties.Chambers[0].Props.Filters[0].Filter.FirstOrDefault()
|
||||
weaponTemplate
|
||||
.Properties.Chambers.First()
|
||||
.Props.Filters.First()
|
||||
.Filter.FirstOrDefault()
|
||||
);
|
||||
return !ammoInChamber.Key ? null : ammoInChamber.Value.Properties.Caliber;
|
||||
}
|
||||
|
||||
@@ -236,8 +236,8 @@ public class FenceBaseAssortGenerator(
|
||||
{
|
||||
// Get the cartridge tpl found inside ammo box
|
||||
var cartridgeTplInBox = rootItemDb
|
||||
.Properties.StackSlots[0]
|
||||
.Props.Filters[0]
|
||||
.Properties.StackSlots.First()
|
||||
.Props.Filters.First()
|
||||
.Filter.FirstOrDefault();
|
||||
|
||||
// Look up cartridge tpl in db
|
||||
@@ -288,9 +288,9 @@ public class FenceBaseAssortGenerator(
|
||||
foreach (var requiredSlot in requiredSlots)
|
||||
{
|
||||
var modItemDbDetails = itemHelper
|
||||
.GetItem(requiredSlot.Props.Filters[0].Plate.Value)
|
||||
.GetItem(requiredSlot.Props.Filters.First().Plate.Value)
|
||||
.Value;
|
||||
var plateTpl = requiredSlot.Props.Filters[0].Plate; // `Plate` property appears to be the 'default' item for slot
|
||||
var plateTpl = requiredSlot.Props.Filters.First().Plate; // `Plate` property appears to be the 'default' item for slot
|
||||
if (plateTpl is null || plateTpl.Value.IsEmpty())
|
||||
// Some bsg plate properties are empty, skip mod
|
||||
{
|
||||
@@ -325,7 +325,7 @@ public class FenceBaseAssortGenerator(
|
||||
{
|
||||
foreach (var plateSlot in plateSlots)
|
||||
{
|
||||
var plateTpl = plateSlot.Props.Filters[0].Plate;
|
||||
var plateTpl = plateSlot.Props.Filters.First().Plate;
|
||||
if (string.IsNullOrEmpty(plateTpl))
|
||||
// Bsg data lacks a default plate, skip adding mod
|
||||
{
|
||||
@@ -337,7 +337,7 @@ public class FenceBaseAssortGenerator(
|
||||
new Item
|
||||
{
|
||||
Id = new MongoId(),
|
||||
Template = plateSlot.Props.Filters[0].Plate.Value, // `Plate` property appears to be the 'default' item for slot
|
||||
Template = plateSlot.Props.Filters.First().Plate.Value, // `Plate` property appears to be the 'default' item for slot
|
||||
ParentId = armor[0].Id,
|
||||
SlotId = plateSlot.Name,
|
||||
Upd = new Upd
|
||||
|
||||
+1
-1
@@ -190,7 +190,7 @@ public class ExternalInventoryMagGen(
|
||||
|
||||
// All possible mags that fit into the weapon excluding blacklisted
|
||||
var magazinePool = magSlot
|
||||
.Props.Filters[0]
|
||||
.Props.Filters.First()
|
||||
.Filter.Where(x => !magazineBlacklist.Contains(x))
|
||||
.Select(x => itemHelper.GetItem(x).Value);
|
||||
if (magazinePool is null)
|
||||
|
||||
@@ -758,7 +758,7 @@ public class BotGeneratorHelper(
|
||||
var excludedFilter = propFilters?.FirstOrDefault()?.ExcludedFilter ?? [];
|
||||
var filter = propFilters?.FirstOrDefault()?.Filter ?? [];
|
||||
|
||||
if (propFilters?.Count == 0)
|
||||
if (!propFilters.Any())
|
||||
// no filters, item is fine to add
|
||||
{
|
||||
return true;
|
||||
|
||||
@@ -37,7 +37,7 @@ public class BotWeaponGeneratorHelper(
|
||||
var firstSlotAmmoTpl =
|
||||
magTemplate
|
||||
.Properties.Cartridges.FirstOrDefault()
|
||||
?.Props.Filters[0]
|
||||
?.Props.Filters.First()
|
||||
.Filter.FirstOrDefault() ?? new MongoId(null);
|
||||
var ammoMaxStackSize =
|
||||
itemHelper.GetItem(firstSlotAmmoTpl).Value?.Properties?.StackMaxSize ?? 1;
|
||||
@@ -53,7 +53,7 @@ public class BotWeaponGeneratorHelper(
|
||||
}
|
||||
else
|
||||
{
|
||||
chamberBulletCount = magTemplate.Properties.Cartridges?[0].MaxCount;
|
||||
chamberBulletCount = magTemplate.Properties.Cartridges?.First().MaxCount;
|
||||
}
|
||||
|
||||
// Get the amount of bullets that would fit in the internal magazine
|
||||
|
||||
@@ -1387,10 +1387,10 @@ public class ItemHelper(
|
||||
/// <param name="ammoBoxDetails">Item template from items db</param>
|
||||
public void AddCartridgesToAmmoBox(List<Item> ammoBox, TemplateItem ammoBoxDetails)
|
||||
{
|
||||
var ammoBoxMaxCartridgeCount = ammoBoxDetails.Properties.StackSlots[0].MaxCount;
|
||||
var ammoBoxMaxCartridgeCount = ammoBoxDetails.Properties.StackSlots.First().MaxCount;
|
||||
var cartridgeTpl = ammoBoxDetails
|
||||
.Properties.StackSlots[0]
|
||||
.Props.Filters[0]
|
||||
.Properties.StackSlots.First()
|
||||
.Props.Filters.First()
|
||||
.Filter.FirstOrDefault();
|
||||
var cartridgeDetails = GetItem(cartridgeTpl);
|
||||
var cartridgeMaxStackSize = cartridgeDetails.Value.Properties.StackMaxSize;
|
||||
@@ -1440,10 +1440,11 @@ public class ItemHelper(
|
||||
/// <param name="ammoBoxDetails">Item template from items db</param>
|
||||
public void AddSingleStackCartridgesToAmmoBox(List<Item> ammoBox, TemplateItem ammoBoxDetails)
|
||||
{
|
||||
var ammoBoxMaxCartridgeCount = ammoBoxDetails.Properties?.StackSlots?[0].MaxCount ?? 0;
|
||||
var cartridgeTpl = ammoBoxDetails.Properties?.StackSlots?[0].Props?.Filters?[
|
||||
0
|
||||
].Filter?.FirstOrDefault();
|
||||
var ammoBoxMaxCartridgeCount = ammoBoxDetails.Properties?.StackSlots?.First().MaxCount ?? 0;
|
||||
var cartridgeTpl = ammoBoxDetails
|
||||
.Properties?.StackSlots?.First()
|
||||
.Props?.Filters?.First()
|
||||
.Filter?.FirstOrDefault();
|
||||
ammoBox.Add(
|
||||
CreateCartridges(ammoBox[0].Id, cartridgeTpl.Value, (int)ammoBoxMaxCartridgeCount, 0)
|
||||
);
|
||||
@@ -1610,7 +1611,7 @@ public class ItemHelper(
|
||||
/// <returns>Tpl of cartridge</returns>
|
||||
protected string? GetRandomValidCaliber(TemplateItem magTemplate)
|
||||
{
|
||||
var ammoTpls = magTemplate.Properties.Cartridges[0].Props.Filters[0].Filter;
|
||||
var ammoTpls = magTemplate.Properties.Cartridges.First().Props.Filters.First().Filter;
|
||||
var calibers = ammoTpls
|
||||
.Where(x => GetItem(x).Key)
|
||||
.Select(x => GetItem(x).Value.Properties.Caliber)
|
||||
|
||||
@@ -18,10 +18,10 @@ public record Globals
|
||||
public LocationInfection LocationInfection { get; set; }
|
||||
|
||||
[JsonPropertyName("bot_presets")]
|
||||
public List<BotPreset> BotPresets { get; set; }
|
||||
public IEnumerable<BotPreset> BotPresets { get; set; }
|
||||
|
||||
[JsonPropertyName("BotWeaponScatterings")]
|
||||
public List<BotWeaponScattering> BotWeaponScatterings { get; set; }
|
||||
public IEnumerable<BotWeaponScattering> BotWeaponScatterings { get; set; }
|
||||
|
||||
[JsonPropertyName("ItemPresets")]
|
||||
public Dictionary<MongoId, Preset> ItemPresets { get; set; }
|
||||
@@ -48,7 +48,7 @@ public record PlayerSettings
|
||||
public double MinStepSoundVolumeMultiplier { get; set; }
|
||||
|
||||
[JsonPropertyName("MovementRolloffMultipliers")]
|
||||
public List<MovementRolloffMultiplier> MovementRolloffMultipliers { get; set; }
|
||||
public IEnumerable<MovementRolloffMultiplier> MovementRolloffMultipliers { get; set; }
|
||||
|
||||
[JsonPropertyName("OutdoorRolloffMult")]
|
||||
public double OutdoorRolloffMultiplier { get; set; }
|
||||
@@ -88,7 +88,7 @@ public record RadioBroadcastSettings
|
||||
public bool EnabledBroadcast { get; set; }
|
||||
|
||||
[JsonPropertyName("RadioStations")]
|
||||
public List<RadioStation> RadioStations { get; set; }
|
||||
public IEnumerable<RadioStation> RadioStations { get; set; }
|
||||
}
|
||||
|
||||
public record RadioStation
|
||||
@@ -181,10 +181,10 @@ public record ArtilleryMapSettings
|
||||
public double InitCalledShellingTime { get; set; }
|
||||
|
||||
[JsonPropertyName("ShellingZones")]
|
||||
public List<ShellingZone> ShellingZones { get; set; }
|
||||
public IEnumerable<ShellingZone> ShellingZones { get; set; }
|
||||
|
||||
[JsonPropertyName("Brigades")]
|
||||
public List<Brigade> Brigades { get; set; }
|
||||
public IEnumerable<Brigade> Brigades { get; set; }
|
||||
|
||||
[JsonPropertyName("ArtilleryShellingAirDropSettings")]
|
||||
public ArtilleryShellingAirDropSettings ArtilleryShellingAirDropSettings { get; set; }
|
||||
@@ -235,7 +235,7 @@ public record ShellingZone
|
||||
public XYZ ExplosionDistanceRange { get; set; }
|
||||
|
||||
[JsonPropertyName("AlarmStages")]
|
||||
public List<AlarmStage> AlarmStages { get; set; }
|
||||
public IEnumerable<AlarmStage> AlarmStages { get; set; }
|
||||
|
||||
[JsonPropertyName("BeforeShellingSignalTime")]
|
||||
public double BeforeShellingSignalTime { get; set; }
|
||||
@@ -268,7 +268,7 @@ public record Brigade
|
||||
public double Id { get; set; }
|
||||
|
||||
[JsonPropertyName("ArtilleryGuns")]
|
||||
public List<ArtilleryGun> ArtilleryGuns { get; set; }
|
||||
public IEnumerable<ArtilleryGun> ArtilleryGuns { get; set; }
|
||||
}
|
||||
|
||||
public record ArtilleryGun
|
||||
@@ -1329,7 +1329,7 @@ public record Exp
|
||||
public Level Level { get; set; }
|
||||
|
||||
[JsonPropertyName("loot_attempts")]
|
||||
public List<LootAttempt> LootAttempts { get; set; }
|
||||
public IEnumerable<LootAttempt> LootAttempts { get; set; }
|
||||
|
||||
// Confirmed in client
|
||||
[JsonPropertyName("expForLevelOneDogtag")]
|
||||
@@ -1408,7 +1408,7 @@ public record MatchEnd
|
||||
public double TransitExperienceReward { get; set; }
|
||||
|
||||
[JsonPropertyName("transit_mult")]
|
||||
public List<Dictionary<string, double>> TransitMultiplier { get; set; }
|
||||
public IEnumerable<Dictionary<string, double>> TransitMultiplier { get; set; }
|
||||
}
|
||||
|
||||
public record Kill
|
||||
@@ -1507,7 +1507,7 @@ public record Armor
|
||||
public Dictionary<string, object>? ExtensionData { get; set; }
|
||||
|
||||
[JsonPropertyName("class")]
|
||||
public List<Class> Classes { get; set; }
|
||||
public IEnumerable<Class> Classes { get; set; }
|
||||
}
|
||||
|
||||
public record Class
|
||||
@@ -1529,7 +1529,7 @@ public record Mastering
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonPropertyName("Templates")]
|
||||
public List<MongoId> Templates { get; set; }
|
||||
public IEnumerable<MongoId> Templates { get; set; }
|
||||
|
||||
[JsonPropertyName("Progress")]
|
||||
public double Progress { get; set; }
|
||||
@@ -1558,7 +1558,7 @@ public record Customization
|
||||
public Dictionary<string, WildFeet> Feet { get; set; }
|
||||
|
||||
[JsonPropertyName("CustomizationVoice")]
|
||||
public List<CustomizationVoice> VoiceOptions { get; set; }
|
||||
public IEnumerable<CustomizationVoice> VoiceOptions { get; set; }
|
||||
|
||||
[JsonPropertyName("BodyParts")]
|
||||
public BodyParts BodyParts { get; set; }
|
||||
@@ -2281,7 +2281,7 @@ public record Stimulator
|
||||
|
||||
public double BuffLoopTime { get; set; }
|
||||
|
||||
public Dictionary<string, List<Buff>> Buffs { get; set; }
|
||||
public Dictionary<string, IEnumerable<Buff>> Buffs { get; set; }
|
||||
}
|
||||
|
||||
public record Buff
|
||||
@@ -2762,7 +2762,7 @@ public record RagFair
|
||||
public float RenewPricePerHour { get; set; }
|
||||
|
||||
[JsonPropertyName("maxActiveOfferCount")]
|
||||
public List<MaxActiveOfferCount> MaxActiveOfferCount { get; set; }
|
||||
public IEnumerable<MaxActiveOfferCount> MaxActiveOfferCount { get; set; }
|
||||
|
||||
[JsonPropertyName("balancerRemovePriceCoefficient")]
|
||||
public float BalancerRemovePriceCoefficient { get; set; }
|
||||
@@ -2810,7 +2810,7 @@ public record RagFair
|
||||
public double ChangePriceCoef { get; set; }
|
||||
|
||||
[JsonPropertyName("ItemRestrictions")]
|
||||
public List<ItemGlobalRestrictions> ItemRestrictions { get; set; }
|
||||
public IEnumerable<ItemGlobalRestrictions> ItemRestrictions { get; set; }
|
||||
|
||||
[JsonPropertyName("balancerUserItemSaleCooldownEnabled")]
|
||||
public bool BalancerUserItemSaleCooldownEnabled { get; set; }
|
||||
@@ -3117,7 +3117,7 @@ public record RequirementReferences
|
||||
public Dictionary<string, object>? ExtensionData { get; set; }
|
||||
|
||||
[JsonPropertyName("Alpinist")]
|
||||
public List<Alpinist> Alpinists { get; set; }
|
||||
public IEnumerable<Alpinist> Alpinists { get; set; }
|
||||
}
|
||||
|
||||
public record Alpinist
|
||||
@@ -3398,7 +3398,7 @@ public record BtrMapConfig
|
||||
public string MapID { get; set; }
|
||||
|
||||
[JsonPropertyName("pathsConfigurations")]
|
||||
public List<PathConfig> PathsConfigurations { get; set; }
|
||||
public IEnumerable<PathConfig> PathsConfigurations { get; set; }
|
||||
}
|
||||
|
||||
public record PathConfig
|
||||
@@ -3542,7 +3542,7 @@ public record SkillsSettings
|
||||
public WeaponSkills Revolver { get; set; }
|
||||
|
||||
[JsonPropertyName("SMG")]
|
||||
public List<object> SMG { get; set; }
|
||||
public IEnumerable<object> SMG { get; set; }
|
||||
|
||||
[JsonPropertyName("Assault")]
|
||||
public WeaponSkills Assault { get; set; }
|
||||
@@ -3554,16 +3554,16 @@ public record SkillsSettings
|
||||
public WeaponSkills Sniper { get; set; }
|
||||
|
||||
[JsonPropertyName("LMG")]
|
||||
public List<object> LMG { get; set; }
|
||||
public IEnumerable<object> LMG { get; set; }
|
||||
|
||||
[JsonPropertyName("HMG")]
|
||||
public List<object> HMG { get; set; }
|
||||
public IEnumerable<object> HMG { get; set; }
|
||||
|
||||
[JsonPropertyName("Launcher")]
|
||||
public List<object> Launcher { get; set; }
|
||||
public IEnumerable<object> Launcher { get; set; }
|
||||
|
||||
[JsonPropertyName("AttachedLauncher")]
|
||||
public List<object> AttachedLauncher { get; set; }
|
||||
public IEnumerable<object> AttachedLauncher { get; set; }
|
||||
|
||||
[JsonPropertyName("Melee")]
|
||||
public MeleeSkill Melee { get; set; }
|
||||
@@ -3572,58 +3572,58 @@ public record SkillsSettings
|
||||
public WeaponSkills DMR { get; set; }
|
||||
|
||||
[JsonPropertyName("BearAssaultoperations")]
|
||||
public List<object> BearAssaultoperations { get; set; }
|
||||
public IEnumerable<object> BearAssaultoperations { get; set; }
|
||||
|
||||
[JsonPropertyName("BearAuthority")]
|
||||
public List<object> BearAuthority { get; set; }
|
||||
public IEnumerable<object> BearAuthority { get; set; }
|
||||
|
||||
[JsonPropertyName("BearAksystems")]
|
||||
public List<object> BearAksystems { get; set; }
|
||||
public IEnumerable<object> BearAksystems { get; set; }
|
||||
|
||||
[JsonPropertyName("BearHeavycaliber")]
|
||||
public List<object> BearHeavycaliber { get; set; }
|
||||
public IEnumerable<object> BearHeavycaliber { get; set; }
|
||||
|
||||
[JsonPropertyName("BearRawpower")]
|
||||
public List<object> BearRawpower { get; set; }
|
||||
public IEnumerable<object> BearRawpower { get; set; }
|
||||
|
||||
[JsonPropertyName("BipodErgonomicsBonusPerLevel")]
|
||||
public double BipodErgonomicsBonusPerLevel { get; set; }
|
||||
|
||||
[JsonPropertyName("UsecArsystems")]
|
||||
public List<object> UsecArsystems { get; set; }
|
||||
public IEnumerable<object> UsecArsystems { get; set; }
|
||||
|
||||
[JsonPropertyName("UsecDeepweaponmodding_Settings")]
|
||||
public List<object> UsecDeepweaponmodding_Settings { get; set; }
|
||||
public IEnumerable<object> UsecDeepweaponmodding_Settings { get; set; }
|
||||
|
||||
[JsonPropertyName("UsecLongrangeoptics_Settings")]
|
||||
public List<object> UsecLongrangeoptics_Settings { get; set; }
|
||||
public IEnumerable<object> UsecLongrangeoptics_Settings { get; set; }
|
||||
|
||||
[JsonPropertyName("UsecNegotiations")]
|
||||
public List<object> UsecNegotiations { get; set; }
|
||||
public IEnumerable<object> UsecNegotiations { get; set; }
|
||||
|
||||
[JsonPropertyName("UsecTactics")]
|
||||
public List<object> UsecTactics { get; set; }
|
||||
public IEnumerable<object> UsecTactics { get; set; }
|
||||
|
||||
[JsonPropertyName("BotReload")]
|
||||
public List<object> BotReload { get; set; }
|
||||
public IEnumerable<object> BotReload { get; set; }
|
||||
|
||||
[JsonPropertyName("CovertMovement")]
|
||||
public CovertMovement CovertMovement { get; set; }
|
||||
|
||||
[JsonPropertyName("FieldMedicine")]
|
||||
public List<object> FieldMedicine { get; set; }
|
||||
public IEnumerable<object> FieldMedicine { get; set; }
|
||||
|
||||
[JsonPropertyName("Search")]
|
||||
public Search Search { get; set; }
|
||||
|
||||
[JsonPropertyName("Sniping")]
|
||||
public List<object> Sniping { get; set; }
|
||||
public IEnumerable<object> Sniping { get; set; }
|
||||
|
||||
[JsonPropertyName("ProneMovement")]
|
||||
public List<object> ProneMovement { get; set; }
|
||||
public IEnumerable<object> ProneMovement { get; set; }
|
||||
|
||||
[JsonPropertyName("FirstAid")]
|
||||
public List<object> FirstAid { get; set; }
|
||||
public IEnumerable<object> FirstAid { get; set; }
|
||||
|
||||
[JsonPropertyName("LightVests")]
|
||||
public ArmorSkills LightVests { get; set; }
|
||||
@@ -3632,19 +3632,19 @@ public record SkillsSettings
|
||||
public ArmorSkills HeavyVests { get; set; }
|
||||
|
||||
[JsonPropertyName("WeaponModding")]
|
||||
public List<object> WeaponModding { get; set; }
|
||||
public IEnumerable<object> WeaponModding { get; set; }
|
||||
|
||||
[JsonPropertyName("AdvancedModding")]
|
||||
public List<object> AdvancedModding { get; set; }
|
||||
public IEnumerable<object> AdvancedModding { get; set; }
|
||||
|
||||
[JsonPropertyName("NightOps")]
|
||||
public List<object> NightOps { get; set; }
|
||||
public IEnumerable<object> NightOps { get; set; }
|
||||
|
||||
[JsonPropertyName("SilentOps")]
|
||||
public List<object> SilentOps { get; set; }
|
||||
public IEnumerable<object> SilentOps { get; set; }
|
||||
|
||||
[JsonPropertyName("Lockpicking")]
|
||||
public List<object> Lockpicking { get; set; }
|
||||
public IEnumerable<object> Lockpicking { get; set; }
|
||||
|
||||
[JsonPropertyName("WeaponTreatment")]
|
||||
public WeaponTreatment WeaponTreatment { get; set; }
|
||||
@@ -3653,22 +3653,22 @@ public record SkillsSettings
|
||||
public MagDrills MagDrills { get; set; }
|
||||
|
||||
[JsonPropertyName("Freetrading")]
|
||||
public List<object> Freetrading { get; set; }
|
||||
public IEnumerable<object> Freetrading { get; set; }
|
||||
|
||||
[JsonPropertyName("Auctions")]
|
||||
public List<object> Auctions { get; set; }
|
||||
public IEnumerable<object> Auctions { get; set; }
|
||||
|
||||
[JsonPropertyName("Cleanoperations")]
|
||||
public List<object> Cleanoperations { get; set; }
|
||||
public IEnumerable<object> Cleanoperations { get; set; }
|
||||
|
||||
[JsonPropertyName("Barter")]
|
||||
public List<object> Barter { get; set; }
|
||||
public IEnumerable<object> Barter { get; set; }
|
||||
|
||||
[JsonPropertyName("Shadowconnections")]
|
||||
public List<object> Shadowconnections { get; set; }
|
||||
public IEnumerable<object> Shadowconnections { get; set; }
|
||||
|
||||
[JsonPropertyName("Taskperformance")]
|
||||
public List<object> Taskperformance { get; set; }
|
||||
public IEnumerable<object> Taskperformance { get; set; }
|
||||
|
||||
[JsonPropertyName("Perception")]
|
||||
public Perception Perception { get; set; }
|
||||
@@ -3692,7 +3692,7 @@ public record SkillsSettings
|
||||
public AimDrills AimDrills { get; set; }
|
||||
|
||||
[JsonPropertyName("BotSound")]
|
||||
public List<object> BotSound { get; set; }
|
||||
public IEnumerable<object> BotSound { get; set; }
|
||||
|
||||
[JsonPropertyName("TroubleShooting")]
|
||||
public TroubleShooting TroubleShooting { get; set; }
|
||||
@@ -3823,7 +3823,7 @@ public record Crafting
|
||||
public Dictionary<string, object>? ExtensionData { get; set; }
|
||||
|
||||
[JsonPropertyName("DependentSkillRatios")]
|
||||
public List<DependentSkillRatio> DependentSkillRatios { get; set; }
|
||||
public IEnumerable<DependentSkillRatio> DependentSkillRatios { get; set; }
|
||||
|
||||
[JsonPropertyName("PointsPerCraftingCycle")]
|
||||
public double PointsPerCraftingCycle { get; set; }
|
||||
@@ -3908,7 +3908,7 @@ public record Endurance
|
||||
public double GainPerFatigueStack { get; set; }
|
||||
|
||||
[JsonPropertyName("DependentSkillRatios")]
|
||||
public List<DependentSkillRatio> DependentSkillRatios { get; set; }
|
||||
public IEnumerable<DependentSkillRatio> DependentSkillRatios { get; set; }
|
||||
|
||||
[JsonPropertyName("QTELevelMultipliers")]
|
||||
public Dictionary<string, Dictionary<string, double>> QTELevelMultipliers { get; set; }
|
||||
@@ -3920,7 +3920,7 @@ public record Strength
|
||||
public Dictionary<string, object>? ExtensionData { get; set; }
|
||||
|
||||
[JsonPropertyName("DependentSkillRatios")]
|
||||
public List<DependentSkillRatio> DependentSkillRatios { get; set; }
|
||||
public IEnumerable<DependentSkillRatio> DependentSkillRatios { get; set; }
|
||||
|
||||
[JsonPropertyName("SprintActionMin")]
|
||||
public double SprintActionMin { get; set; }
|
||||
@@ -3941,7 +3941,7 @@ public record Strength
|
||||
public double PushUpMax { get; set; }
|
||||
|
||||
[JsonPropertyName("QTELevelMultipliers")]
|
||||
public List<QTELevelMultiplier> QTELevelMultipliers { get; set; }
|
||||
public IEnumerable<QTELevelMultiplier> QTELevelMultipliers { get; set; }
|
||||
|
||||
[JsonPropertyName("FistfightAction")]
|
||||
public double FistfightAction { get; set; }
|
||||
@@ -4088,7 +4088,7 @@ public record WeaponTreatment
|
||||
public double SkillPointsPerRepair { get; set; }
|
||||
|
||||
[JsonPropertyName("Filter")]
|
||||
public List<object> Filter { get; set; }
|
||||
public IEnumerable<object> Filter { get; set; }
|
||||
|
||||
[JsonPropertyName("WearAmountRepairGunsReducePerLevel")]
|
||||
public double WearAmountRepairGunsReducePerLevel { get; set; }
|
||||
@@ -4151,7 +4151,7 @@ public record Perception
|
||||
public Dictionary<string, object>? ExtensionData { get; set; }
|
||||
|
||||
[JsonPropertyName("DependentSkillRatios")]
|
||||
public List<SkillRatio> DependentSkillRatios { get; set; }
|
||||
public IEnumerable<SkillRatio> DependentSkillRatios { get; set; }
|
||||
|
||||
[JsonPropertyName("OnlineAction")]
|
||||
public double OnlineAction { get; set; }
|
||||
|
||||
@@ -361,25 +361,25 @@ public record QuestConditionCounterCondition
|
||||
public object? Value { get; set; }
|
||||
|
||||
[JsonPropertyName("weapon")]
|
||||
public List<string>? Weapon { get; set; }
|
||||
public HashSet<string>? Weapon { get; set; }
|
||||
|
||||
[JsonPropertyName("distance")]
|
||||
public CounterConditionDistance? Distance { get; set; }
|
||||
|
||||
[JsonPropertyName("equipmentInclusive")]
|
||||
public List<List<string>>? EquipmentInclusive { get; set; }
|
||||
public IEnumerable<List<string>>? EquipmentInclusive { get; set; }
|
||||
|
||||
[JsonPropertyName("weaponModsInclusive")]
|
||||
public List<List<string>>? WeaponModsInclusive { get; set; }
|
||||
public IEnumerable<List<string>>? WeaponModsInclusive { get; set; }
|
||||
|
||||
[JsonPropertyName("weaponModsExclusive")]
|
||||
public List<List<string>>? WeaponModsExclusive { get; set; }
|
||||
public IEnumerable<List<string>>? WeaponModsExclusive { get; set; }
|
||||
|
||||
[JsonPropertyName("enemyEquipmentInclusive")]
|
||||
public List<List<string>>? EnemyEquipmentInclusive { get; set; }
|
||||
public IEnumerable<List<string>>? EnemyEquipmentInclusive { get; set; }
|
||||
|
||||
[JsonPropertyName("enemyEquipmentExclusive")]
|
||||
public List<List<string>>? EnemyEquipmentExclusive { get; set; }
|
||||
public IEnumerable<List<string>>? EnemyEquipmentExclusive { get; set; }
|
||||
|
||||
[JsonPropertyName("weaponCaliber")]
|
||||
public List<string>? WeaponCaliber { get; set; }
|
||||
|
||||
@@ -49,7 +49,7 @@ public record Reward
|
||||
public bool? FindInRaid { get; set; }
|
||||
|
||||
[JsonPropertyName("gameMode")]
|
||||
public List<string>? GameMode { get; set; }
|
||||
public IEnumerable<string>? GameMode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Game editions whitelisted to get reward
|
||||
|
||||
@@ -88,7 +88,7 @@ public record Props
|
||||
private string? _unlootableFromSlot;
|
||||
|
||||
[JsonPropertyName("AllowSpawnOnLocations")]
|
||||
public List<string>? AllowSpawnOnLocations { get; set; }
|
||||
public IEnumerable<string>? AllowSpawnOnLocations { get; set; }
|
||||
|
||||
[JsonPropertyName("BeltMagazineRefreshCount")]
|
||||
public double? BeltMagazineRefreshCount { get; set; }
|
||||
@@ -257,7 +257,7 @@ public record Props
|
||||
public int? ExtraSizeUp { get; set; }
|
||||
|
||||
[JsonPropertyName("FlareTypes")]
|
||||
public List<string>? FlareTypes { get; set; }
|
||||
public IEnumerable<string>? FlareTypes { get; set; }
|
||||
|
||||
[JsonPropertyName("ExtraSizeDown")]
|
||||
public int? ExtraSizeDown { get; set; }
|
||||
@@ -313,7 +313,7 @@ public record Props
|
||||
}
|
||||
|
||||
[JsonPropertyName("UnlootableFromSide")]
|
||||
public List<PlayerSideMask>? UnlootableFromSide { get; set; }
|
||||
public IEnumerable<PlayerSideMask>? UnlootableFromSide { get; set; }
|
||||
|
||||
// Type confirmed via client
|
||||
[JsonPropertyName("AnimationVariantsNumber")]
|
||||
@@ -362,10 +362,10 @@ public record Props
|
||||
public bool? CanPutIntoDuringTheRaid { get; set; }
|
||||
|
||||
[JsonPropertyName("CantRemoveFromSlotsDuringRaid")]
|
||||
public List<EquipmentSlots>? CantRemoveFromSlotsDuringRaid { get; set; }
|
||||
public IEnumerable<EquipmentSlots>? CantRemoveFromSlotsDuringRaid { get; set; }
|
||||
|
||||
[JsonPropertyName("KeyIds")]
|
||||
public List<string>? KeyIds { get; set; }
|
||||
public IEnumerable<string>? KeyIds { get; set; }
|
||||
|
||||
[JsonPropertyName("TagColor")]
|
||||
public double? TagColor { get; set; }
|
||||
@@ -464,7 +464,7 @@ public record Props
|
||||
public double? SightModesCount { get; set; }
|
||||
|
||||
[JsonPropertyName("OpticCalibrationDistances")]
|
||||
public List<double>? OpticCalibrationDistances { get; set; }
|
||||
public IEnumerable<double>? OpticCalibrationDistances { get; set; }
|
||||
|
||||
[JsonPropertyName("ScopesCount")]
|
||||
public double? ScopesCount { get; set; }
|
||||
@@ -473,10 +473,10 @@ public record Props
|
||||
public object? AimSensitivity { get; set; } // TODO: object here
|
||||
|
||||
[JsonPropertyName("Zooms")]
|
||||
public List<List<double>>? Zooms { get; set; }
|
||||
public IEnumerable<List<double>>? Zooms { get; set; }
|
||||
|
||||
[JsonPropertyName("CalibrationDistances")]
|
||||
public List<List<double>>? CalibrationDistances { get; set; }
|
||||
public IEnumerable<List<double>>? CalibrationDistances { get; set; }
|
||||
|
||||
[JsonPropertyName("Intensity")]
|
||||
public double? Intensity { get; set; }
|
||||
@@ -560,7 +560,7 @@ public record Props
|
||||
public double? MagAnimationIndex { get; set; }
|
||||
|
||||
[JsonPropertyName("Cartridges")]
|
||||
public List<Slot>? Cartridges { get; set; }
|
||||
public IEnumerable<Slot>? Cartridges { get; set; }
|
||||
|
||||
[JsonPropertyName("CanFast")]
|
||||
public bool? CanFast { get; set; }
|
||||
@@ -630,10 +630,10 @@ public record Props
|
||||
public double? ContainerSpawnChanceModifier { get; set; }
|
||||
|
||||
[JsonPropertyName("SpawnFilter")]
|
||||
public List<object>? SpawnFilter { get; set; } // TODO: object here
|
||||
public IEnumerable<object>? SpawnFilter { get; set; } // TODO: object here
|
||||
|
||||
[JsonPropertyName("containType")]
|
||||
public List<object>? ContainType { get; set; } // TODO: object here
|
||||
public IEnumerable<object>? ContainType { get; set; } // TODO: object here
|
||||
|
||||
[JsonPropertyName("sizeWidth")]
|
||||
public double? SizeWidth { get; set; }
|
||||
@@ -648,7 +648,7 @@ public record Props
|
||||
public string? SpawnTypes { get; set; }
|
||||
|
||||
[JsonPropertyName("lootFilter")]
|
||||
public List<object>? LootFilter { get; set; } // TODO: object here
|
||||
public IEnumerable<object>? LootFilter { get; set; } // TODO: object here
|
||||
|
||||
[JsonPropertyName("spawnRarity")]
|
||||
public string? SpawnRarity { get; set; }
|
||||
@@ -660,7 +660,7 @@ public record Props
|
||||
public double? MaxCountSpawn { get; set; }
|
||||
|
||||
[JsonPropertyName("openedByKeyID")]
|
||||
public List<string>? OpenedByKeyID { get; set; }
|
||||
public IEnumerable<string>? OpenedByKeyID { get; set; }
|
||||
|
||||
[JsonPropertyName("RigLayoutName")]
|
||||
public string? RigLayoutName { get; set; }
|
||||
@@ -669,7 +669,7 @@ public record Props
|
||||
public double? MaxDurability { get; set; }
|
||||
|
||||
[JsonPropertyName("armorZone")]
|
||||
public List<string>? ArmorZone { get; set; }
|
||||
public IEnumerable<string>? ArmorZone { get; set; }
|
||||
|
||||
// Type confirmed via client
|
||||
[JsonPropertyName("armorClass")]
|
||||
@@ -677,10 +677,10 @@ public record Props
|
||||
public int? ArmorClass { get; set; }
|
||||
|
||||
[JsonPropertyName("armorColliders")]
|
||||
public List<string>? ArmorColliders { get; set; }
|
||||
public IEnumerable<string>? ArmorColliders { get; set; }
|
||||
|
||||
[JsonPropertyName("armorPlateColliders")]
|
||||
public List<string>? ArmorPlateColliders { get; set; }
|
||||
public IEnumerable<string>? ArmorPlateColliders { get; set; }
|
||||
|
||||
[JsonPropertyName("bluntDamageReduceFromSoftArmor")]
|
||||
public bool? BluntDamageReduceFromSoftArmor { get; set; }
|
||||
@@ -801,7 +801,7 @@ public record Props
|
||||
public double? shotgunDispersion { get; set; }
|
||||
|
||||
[JsonPropertyName("Chambers")]
|
||||
public List<Slot>? Chambers { get; set; }
|
||||
public IEnumerable<Slot>? Chambers { get; set; }
|
||||
|
||||
[JsonPropertyName("CameraSnap")]
|
||||
public double? CameraSnap { get; set; }
|
||||
@@ -835,7 +835,7 @@ public record Props
|
||||
public XYZ? RotationCenterNoStock { get; set; }
|
||||
|
||||
[JsonPropertyName("ShotsGroupSettings")]
|
||||
public List<ShotsGroupSettings>? ShotsGroupSettings { get; set; }
|
||||
public IEnumerable<ShotsGroupSettings>? ShotsGroupSettings { get; set; }
|
||||
|
||||
[JsonPropertyName("FoldedSlot")]
|
||||
public string? FoldedSlot { get; set; }
|
||||
@@ -1226,7 +1226,7 @@ public record Props
|
||||
|
||||
// Confirmed on client - MongoId
|
||||
[JsonPropertyName("TargetItemFilter")]
|
||||
public List<MongoId>? TargetItemFilter { get; set; }
|
||||
public IEnumerable<MongoId>? TargetItemFilter { get; set; }
|
||||
|
||||
[JsonPropertyName("RepairQuality")]
|
||||
public double? RepairQuality { get; set; }
|
||||
@@ -1434,7 +1434,7 @@ public record Props
|
||||
public double? MalfFeedChance { get; set; }
|
||||
|
||||
[JsonPropertyName("StackSlots")]
|
||||
public List<StackSlot>? StackSlots { get; set; }
|
||||
public IEnumerable<StackSlot>? StackSlots { get; set; }
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public string? Type { get; set; }
|
||||
@@ -1497,7 +1497,7 @@ public record Props
|
||||
public bool? RemoveShellAfterFire { get; set; }
|
||||
|
||||
[JsonPropertyName("RepairStrategyTypes")]
|
||||
public List<RepairStrategyType>? RepairStrategyTypes { get; set; }
|
||||
public IEnumerable<RepairStrategyType>? RepairStrategyTypes { get; set; }
|
||||
|
||||
[JsonPropertyName("IsEncoded")]
|
||||
public bool? IsEncoded { get; set; }
|
||||
@@ -1539,10 +1539,10 @@ public record Props
|
||||
public bool? AvailableAsDefault { get; set; }
|
||||
|
||||
[JsonPropertyName("ProfileVersions")]
|
||||
public List<string>? ProfileVersions { get; set; }
|
||||
public IEnumerable<string>? ProfileVersions { get; set; }
|
||||
|
||||
[JsonPropertyName("Side")]
|
||||
public List<string>? Side { get; set; }
|
||||
public IEnumerable<string>? Side { get; set; }
|
||||
|
||||
[JsonPropertyName("BipodCameraSnapMultiplier")]
|
||||
public double? BipodCameraSnapMultiplier { get; set; }
|
||||
@@ -1578,7 +1578,7 @@ public record WeaponRecoilSettings
|
||||
public bool? Enable { get; set; }
|
||||
|
||||
[JsonPropertyName("Values")]
|
||||
public List<WeaponRecoilSettingValues>? Values { get; set; }
|
||||
public IEnumerable<WeaponRecoilSettingValues>? Values { get; set; }
|
||||
}
|
||||
|
||||
public record WeaponRecoilSettingValues
|
||||
@@ -1623,7 +1623,7 @@ public record WeaponRecoilTransformationCurve
|
||||
public Dictionary<string, object>? ExtensionData { get; set; }
|
||||
|
||||
[JsonPropertyName("Keys")]
|
||||
public List<WeaponRecoilTransformationCurveKey>? Keys { get; set; }
|
||||
public IEnumerable<WeaponRecoilTransformationCurveKey>? Keys { get; set; }
|
||||
}
|
||||
|
||||
public record WeaponRecoilTransformationCurveKey
|
||||
@@ -1695,7 +1695,7 @@ public record GridProps
|
||||
public Dictionary<string, object>? ExtensionData { get; set; }
|
||||
|
||||
[JsonPropertyName("filters")]
|
||||
public List<GridFilter>? Filters { get; set; }
|
||||
public IEnumerable<GridFilter>? Filters { get; set; }
|
||||
|
||||
[JsonPropertyName("cellsH")]
|
||||
public int? CellsH { get; set; }
|
||||
@@ -1779,7 +1779,7 @@ public record SlotProps
|
||||
public Dictionary<string, object>? ExtensionData { get; set; }
|
||||
|
||||
[JsonPropertyName("filters")]
|
||||
public List<SlotFilter>? Filters { get; set; }
|
||||
public IEnumerable<SlotFilter>? Filters { get; set; }
|
||||
|
||||
[JsonPropertyName("MaxStackCount")]
|
||||
public double? MaxStackCount { get; set; }
|
||||
@@ -1800,10 +1800,10 @@ public record SlotFilter
|
||||
public MongoId? Plate { get; set; }
|
||||
|
||||
[JsonPropertyName("armorColliders")]
|
||||
public List<string>? ArmorColliders { get; set; }
|
||||
public IEnumerable<string>? ArmorColliders { get; set; }
|
||||
|
||||
[JsonPropertyName("armorPlateColliders")]
|
||||
public List<string>? ArmorPlateColliders { get; set; }
|
||||
public IEnumerable<string>? ArmorPlateColliders { get; set; }
|
||||
|
||||
[JsonPropertyName("Filter")]
|
||||
public HashSet<MongoId>? Filter { get; set; }
|
||||
@@ -1851,7 +1851,7 @@ public record StackSlotProps
|
||||
public Dictionary<string, object>? ExtensionData { get; set; }
|
||||
|
||||
[JsonPropertyName("filters")]
|
||||
public List<SlotFilter>? Filters { get; set; }
|
||||
public IEnumerable<SlotFilter>? Filters { get; set; }
|
||||
}
|
||||
|
||||
public record RandomLootSettings
|
||||
@@ -1866,13 +1866,13 @@ public record RandomLootSettings
|
||||
public bool? AllowToSpawnQuestItems { get; set; }
|
||||
|
||||
[JsonPropertyName("countByRarity")]
|
||||
public List<object>? CountByRarity { get; set; } // TODO: object here
|
||||
public IEnumerable<object>? CountByRarity { get; set; } // TODO: object here
|
||||
|
||||
[JsonPropertyName("excluded")]
|
||||
public RandomLootExcluded? Excluded { get; set; }
|
||||
|
||||
[JsonPropertyName("filters")]
|
||||
public List<object>? Filters { get; set; } // TODO: object here
|
||||
public IEnumerable<object>? Filters { get; set; } // TODO: object here
|
||||
|
||||
[JsonPropertyName("findInRaid")]
|
||||
public bool? FindInRaid { get; set; }
|
||||
@@ -1890,13 +1890,13 @@ public record RandomLootExcluded
|
||||
public Dictionary<string, object>? ExtensionData { get; set; }
|
||||
|
||||
[JsonPropertyName("categoryTemplates")]
|
||||
public List<object>? CategoryTemplates { get; set; } // TODO: object here
|
||||
public IEnumerable<object>? CategoryTemplates { get; set; } // TODO: object here
|
||||
|
||||
[JsonPropertyName("rarity")]
|
||||
public List<string>? Rarity { get; set; }
|
||||
public IEnumerable<string>? Rarity { get; set; }
|
||||
|
||||
[JsonPropertyName("templates")]
|
||||
public List<object>? Templates { get; set; } // TODO: object here
|
||||
public IEnumerable<object>? Templates { get; set; } // TODO: object here
|
||||
}
|
||||
|
||||
public record EffectsHealth
|
||||
|
||||
@@ -25,7 +25,7 @@ public record EndLocalRaidRequestData : IRequestData
|
||||
/// Insured items left in raid by player
|
||||
/// </summary>
|
||||
[JsonPropertyName("lostInsuredItems")]
|
||||
public List<Item>? LostInsuredItems { get; set; }
|
||||
public IEnumerable<Item>? LostInsuredItems { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Items sent via traders to player, keyed to service e.g. BTRTransferStash
|
||||
|
||||
@@ -1282,14 +1282,14 @@ public class FenceService(
|
||||
foreach (var requiredSlot in softInsertSlots)
|
||||
{
|
||||
var modItemDbDetails = itemHelper
|
||||
.GetItem(requiredSlot.Props.Filters[0].Plate.Value)
|
||||
.GetItem(requiredSlot.Props.Filters.First().Plate.Value)
|
||||
.Value;
|
||||
|
||||
var durabilityValues = GetRandomisedArmorDurabilityValues(
|
||||
modItemDbDetails,
|
||||
traderConfig.Fence.ArmorMaxDurabilityPercentMinMax
|
||||
);
|
||||
var plateTpl = requiredSlot.Props.Filters[0].Plate ?? string.Empty; // "Plate" property appears to be the 'default' item for slot
|
||||
var plateTpl = requiredSlot.Props.Filters.First().Plate ?? string.Empty; // "Plate" property appears to be the 'default' item for slot
|
||||
if (plateTpl.IsEmpty())
|
||||
// Some bsg plate properties are empty, skip mod
|
||||
{
|
||||
@@ -1348,7 +1348,7 @@ public class FenceService(
|
||||
{
|
||||
foreach (var plateSlot in plateSlots)
|
||||
{
|
||||
var plateTpl = plateSlot.Props.Filters[0].Plate;
|
||||
var plateTpl = plateSlot.Props.Filters.First().Plate;
|
||||
if (plateTpl == null || plateTpl.Value.IsEmpty())
|
||||
// Bsg data lacks a default plate, skip randomising for this mod
|
||||
{
|
||||
|
||||
@@ -251,7 +251,7 @@ public class InsuranceService(
|
||||
/// <returns>InsuranceEquipmentPkg list</returns>
|
||||
public List<InsuranceEquipmentPkg> MapInsuredItemsToTrader(
|
||||
MongoId sessionId,
|
||||
List<Item> lostInsuredItems,
|
||||
IEnumerable<Item> lostInsuredItems,
|
||||
PmcData pmcProfile
|
||||
)
|
||||
{
|
||||
|
||||
@@ -1168,7 +1168,7 @@ public class LocationLifecycleService(
|
||||
string locationName
|
||||
)
|
||||
{
|
||||
if (request.LostInsuredItems?.Count > 0)
|
||||
if (request.LostInsuredItems is not null && request.LostInsuredItems.Any())
|
||||
{
|
||||
var mappedItems = insuranceService.MapInsuredItemsToTrader(
|
||||
sessionId,
|
||||
|
||||
@@ -299,7 +299,7 @@ public class CustomItemService(
|
||||
var wall = itemHelper.GetItem(wallId);
|
||||
if (wall.Key)
|
||||
{
|
||||
wall.Value.Properties.Grids.First().Props.Filters[0].Filter.Add(newItemId);
|
||||
wall.Value.Properties.Grids.First().Props.Filters.First().Filter.Add(newItemId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -328,7 +328,7 @@ public class CustomItemService(
|
||||
var weaponSlots = weapon.Value.Properties.Slots;
|
||||
foreach (var slot in weaponSlots)
|
||||
{
|
||||
baseWeaponModObject[slot.Name] = [.. slot.Props.Filters[0].Filter];
|
||||
baseWeaponModObject[slot.Name] = [.. slot.Props.Filters.First().Filter];
|
||||
}
|
||||
|
||||
// Get PMCs
|
||||
|
||||
@@ -130,7 +130,7 @@ public class RagfairLinkedItemService(
|
||||
|
||||
// Get the first cylinder filter tpl
|
||||
var cylinderTpl =
|
||||
cylinderMod.Props?.Filters?[0].Filter?.FirstOrDefault() ?? new MongoId(null);
|
||||
cylinderMod.Props?.Filters?.First().Filter?.FirstOrDefault() ?? new MongoId(null);
|
||||
|
||||
if (!cylinderTpl.IsValidMongoId())
|
||||
{
|
||||
@@ -181,7 +181,7 @@ public class RagfairLinkedItemService(
|
||||
var result = new HashSet<MongoId>();
|
||||
|
||||
var chambers = item.Properties?.Chambers;
|
||||
if (chambers is null || chambers.Count == 0)
|
||||
if (chambers is null || !chambers.Any())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
@@ -207,7 +207,7 @@ public class RagfairLinkedItemService(
|
||||
var result = new HashSet<MongoId>();
|
||||
|
||||
var cartridges = item.Properties?.Cartridges;
|
||||
if (cartridges is null || cartridges.Count == 0)
|
||||
if (cartridges is null || !cartridges.Any())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -358,12 +358,12 @@ public class ItemTplMongoIdGenerator(
|
||||
// Add mag size for magazines
|
||||
if (itemHelper.IsOfBaseclass(item.Id, BaseClasses.MAGAZINE))
|
||||
{
|
||||
suffix = $"{item.Properties?.Cartridges?[0].MaxCount?.ToString()}RND";
|
||||
suffix = $"{item.Properties?.Cartridges?.First().MaxCount?.ToString()}RND";
|
||||
}
|
||||
// Add pack size for ammo boxes
|
||||
else if (itemHelper.IsOfBaseclass(item.Id, BaseClasses.AMMO_BOX))
|
||||
{
|
||||
suffix = $"{item.Properties.StackSlots[0]?.MaxCount.ToString()}RND";
|
||||
suffix = $"{item.Properties.StackSlots.First()?.MaxCount.ToString()}RND";
|
||||
}
|
||||
|
||||
// Add "DAMAGED" for damaged items
|
||||
@@ -404,14 +404,20 @@ public class ItemTplMongoIdGenerator(
|
||||
|
||||
private string GetAmmoBoxPrefix(TemplateItem item)
|
||||
{
|
||||
var ammoTpl = item.Properties?.StackSlots?[0]?.Props?.Filters?[0]?.Filter?.FirstOrDefault();
|
||||
var ammoTpl = item
|
||||
.Properties?.StackSlots?.First()
|
||||
?.Props?.Filters?.First()
|
||||
?.Filter?.FirstOrDefault();
|
||||
|
||||
return GetAmmoPrefix(_items[ammoTpl.Value]);
|
||||
}
|
||||
|
||||
private string GetMagazinePrefix(TemplateItem item)
|
||||
{
|
||||
var ammoTpl = item.Properties?.Cartridges?[0]?.Props?.Filters?[0]?.Filter?.FirstOrDefault();
|
||||
var ammoTpl = item
|
||||
.Properties?.Cartridges?.First()
|
||||
?.Props?.Filters?.First()
|
||||
?.Filter?.FirstOrDefault();
|
||||
|
||||
return GetAmmoPrefix(_items[ammoTpl.Value]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user