From 1f74a68cd52d65cb296645c5c83a4d2817c2a9e0 Mon Sep 17 00:00:00 2001 From: sanguinerarogue Date: Tue, 17 Dec 2024 22:08:28 -0700 Subject: [PATCH] Fixes WF --- ui/core/components/individual_sim_ui/consumes_picker.ts | 7 ++----- ui/core/components/inputs/consumables.ts | 3 ++- ui/core/player.ts | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ui/core/components/individual_sim_ui/consumes_picker.ts b/ui/core/components/individual_sim_ui/consumes_picker.ts index 6b960a358..c0104dc9f 100644 --- a/ui/core/components/individual_sim_ui/consumes_picker.ts +++ b/ui/core/components/individual_sim_ui/consumes_picker.ts @@ -46,10 +46,7 @@ export class ConsumesPicker extends Component { const potionsOptions = ConsumablesInputs.makePotionsInput(relevantStatOptions(ConsumablesInputs.POTIONS_CONFIG, this.simUI), 'Potions'); const conjuredOptions = ConsumablesInputs.makeConjuredInput(relevantStatOptions(ConsumablesInputs.CONJURED_CONFIG, this.simUI)); - const pickers = [ - buildIconInput(potionsElem, this.simUI.player, potionsOptions), - buildIconInput(potionsElem, this.simUI.player, conjuredOptions), - ]; + const pickers = [buildIconInput(potionsElem, this.simUI.player, potionsOptions), buildIconInput(potionsElem, this.simUI.player, conjuredOptions)]; TypedEvent.onAny([this.simUI.player.professionChangeEmitter]).on(() => this.updateRow(row, pickers)); this.updateRow(row, pickers); @@ -95,7 +92,7 @@ export class ConsumesPicker extends Component { const pickers = [buildIconInput(imbuesElem, this.simUI.player, mhImbueOptions), buildIconInput(imbuesElem, this.simUI.player, ohImbueOptions)]; - TypedEvent.onAny([this.simUI.player.gearChangeEmitter]).on(() => this.updateRow(row, pickers)); + TypedEvent.onAny([this.simUI.player.gearChangeEmitter, this.simUI.player.raceChangeEmitter]).on(() => this.updateRow(row, pickers)); this.updateRow(row, pickers); } diff --git a/ui/core/components/inputs/consumables.ts b/ui/core/components/inputs/consumables.ts index e820597d3..98499193e 100644 --- a/ui/core/components/inputs/consumables.ts +++ b/ui/core/components/inputs/consumables.ts @@ -76,7 +76,8 @@ function makeConsumeInputFactory( ), equals: (a: T, b: T) => a == b, zeroValue: 0 as T, - changedEvent: (player: Player) => TypedEvent.onAny([player.consumesChangeEmitter, player.gearChangeEmitter, player.professionChangeEmitter]), + changedEvent: (player: Player) => + TypedEvent.onAny([player.consumesChangeEmitter, player.gearChangeEmitter, player.professionChangeEmitter, player.raceChangeEmitter]), showWhen: (player: Player) => !args.showWhen || args.showWhen(player), getValue: (player: Player) => player.getConsumes()[args.consumesFieldName] as T, setValue: (eventID: EventID, player: Player, newValue: number) => { diff --git a/ui/core/player.ts b/ui/core/player.ts index e7fce4fc3..d79f74d43 100644 --- a/ui/core/player.ts +++ b/ui/core/player.ts @@ -1157,8 +1157,8 @@ export class Player { } } - for(const zoneName in RaidFilterOption) { - const zoneId = parseInt(RaidFilterOption[zoneName]) + for (const zoneName in RaidFilterOption) { + const zoneId = parseInt(RaidFilterOption[zoneName]); if (!filters.sources.includes(SourceFilterOption.SourceRaid) || !filters.raids.includes(zoneId)) { itemData = filterItems( itemData,