Conditional Code Adjustments Re:Biome
When multiple falsey conditions are being checked Biome recommends to check for all the truthy conditions negated. Logic remains untouched, while only using one negation. Apparently easier to comprehend.
This commit is contained in:
parent
11b5c76512
commit
2b826f8b1e
@ -199,11 +199,9 @@ export class BotEquipmentModGenerator
|
||||
const compatibleModsPool = modPool[parentTemplate._id];
|
||||
|
||||
// Null guard against bad input weapon
|
||||
// biome-ignore lint/complexity/useSimplifiedLogicExpression: <explanation>
|
||||
if (
|
||||
!parentTemplate._props.Slots.length &&
|
||||
!parentTemplate._props.Cartridges?.length &&
|
||||
!parentTemplate._props.Chambers?.length
|
||||
!((parentTemplate._props.Slots.length || parentTemplate._props.Cartridges?.length) ||
|
||||
parentTemplate._props.Chambers?.length)
|
||||
)
|
||||
{
|
||||
this.logger.error(
|
||||
|
@ -133,8 +133,8 @@ export class LocationGenerator
|
||||
|
||||
// randomisation is turned off globally or just turned off for this map
|
||||
if (
|
||||
!this.locationConfig.containerRandomisationSettings.enabled ||
|
||||
!this.locationConfig.containerRandomisationSettings.maps[locationId]
|
||||
!(this.locationConfig.containerRandomisationSettings.enabled &&
|
||||
this.locationConfig.containerRandomisationSettings.maps[locationId])
|
||||
)
|
||||
{
|
||||
this.logger.debug(
|
||||
|
@ -410,7 +410,7 @@ export class LootGenerator
|
||||
x._parent === rewardTypeId &&
|
||||
x._type.toLowerCase() === "item" &&
|
||||
!this.itemFilterService.isItemBlacklisted(x._id) &&
|
||||
(!containerSettings.allowBossItems && !this.itemFilterService.isBossItem(x._id)) &&
|
||||
(!(containerSettings.allowBossItems || this.itemFilterService.isBossItem(x._id))) &&
|
||||
!x._props.QuestItem
|
||||
);
|
||||
|
||||
|
@ -424,7 +424,7 @@ export class ProfileFixerService
|
||||
const existsInQuests = pmcProfile.Quests.some((q) => q.qid === backendCounter.qid);
|
||||
|
||||
// if BackendCounter's quest is neither in activeQuests nor Quests it's stale
|
||||
if (!existsInActiveRepeatableQuests && !existsInQuests)
|
||||
if (!(existsInActiveRepeatableQuests || existsInQuests))
|
||||
{
|
||||
counterKeysToRemove.push(key);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user