Release Healer Man 0.1.42

This commit is contained in:
phenom committed 2026-09-13 15:48:12 -04:00
1 parent c3f8a69b51
commit c7e8163790
8 files changed
+271 -64

No files matched your search

+12
View File
@@ -139,6 +139,18 @@ export function bindDesktopSlot(layout: UiLayout, barIndex: number, slotIndex: n
...slot, key: b === barIndex && s === slotIndex ? key : key && slot.key === key ? null : slot.key,
})) })) };
}
export function assignDesktopAbility(layout: UiLayout, barIndex: number, slotIndex: number, abilityId: string | null): UiLayout {
return { ...layout, bars: layout.bars.map((bar, b) => b !== barIndex ? bar : {
...bar, slots: bar.slots.map((slot, s) => s === slotIndex ? { ...slot, abilityId } : slot),
}) };
}
/** Restore abilities only; key chords and the arrangement belong to the UI template. */
export function resetDesktopAbilities(layout: UiLayout, abilityIds: readonly string[], barIndex?: number): UiLayout {
return { ...layout, bars: layout.bars.map((bar, b) => barIndex !== undefined && b !== barIndex ? bar : {
...bar, slots: bar.slots.map((slot, s) => ({ ...slot, abilityId: abilityIds[b * 12 + s] ?? null })),
}) };
}
export function desktopSlotForKey(layout: UiLayout, key: string | null): DesktopActionSlot | null {
if (!layout.wowBars || !key) return null;
// Hidden bars retain their bindings, like WoW; reducing the bar count deactivates them.