mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-13 20:21:06 +01:00
set the list display as a user flag
This commit is contained in:
parent
798c07dffe
commit
51602de36d
4 changed files with 8 additions and 7 deletions
|
|
@ -293,7 +293,7 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
|
|||
top: loadout.slice(0, Math.min(2, nrLoadoutCards)),
|
||||
bottom: nrLoadoutCards > 2 ? loadout.slice(2, Math.min(5, nrLoadoutCards)) : [],
|
||||
nrTotal: nrLoadoutCards,
|
||||
listView: this.document.system.layout.listView
|
||||
listView: game.user.getFlag(SYSTEM.id, SYSTEM.FLAGS.displayDomainCardsAsList)
|
||||
},
|
||||
vault: vault.map(x => ({
|
||||
...x,
|
||||
|
|
@ -450,8 +450,9 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
|
|||
}
|
||||
|
||||
static async toggleLoadoutView(_, button) {
|
||||
const listView = !(button.dataset.value === 'true');
|
||||
await this.document.update({ 'system.layout.listView': listView });
|
||||
const newAbilityView = !(button.dataset.value === 'true');
|
||||
await game.user.setFlag(SYSTEM.id, SYSTEM.FLAGS.displayDomainCardsAsList, newAbilityView);
|
||||
this.render();
|
||||
}
|
||||
|
||||
static async attackRoll(event, button) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue