PC sheet review + dialog rolls update
All checks were successful
Release Creation / build (release) Successful in 1m3s
All checks were successful
Release Creation / build (release) Successful in 1m3s
This commit is contained in:
@@ -32,7 +32,9 @@ export default class HellbornActorSheet extends HandlebarsApplicationMixin(found
|
||||
editImage: HellbornActorSheet.#onEditImage,
|
||||
toggleSheet: HellbornActorSheet.#onToggleSheet,
|
||||
edit: HellbornActorSheet.#onItemEdit,
|
||||
delete: HellbornActorSheet.#onItemDelete
|
||||
delete: HellbornActorSheet.#onItemDelete,
|
||||
updateCheckboxArray: HellbornActorSheet.#onUpdateCheckboxArray,
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
@@ -184,6 +186,18 @@ export default class HellbornActorSheet extends HandlebarsApplicationMixin(found
|
||||
return fp.browse()
|
||||
}
|
||||
|
||||
static #onUpdateCheckboxArray(event, target) {
|
||||
console.log("Update checkbox array", event, target)
|
||||
let arrayName = target.dataset.name
|
||||
let arrayIdx = Number(target.dataset.index)
|
||||
let dataPath = `system.mortality.${arrayName}`
|
||||
let tab = foundry.utils.duplicate(this.document.system.mortality[arrayName])
|
||||
tab[arrayIdx] = target.checked
|
||||
this.actor.update( { [dataPath]: tab } )
|
||||
// Dump
|
||||
console.log("Array name", arrayName, arrayIdx, target.checked, dataPath)
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit an existing item within the Actor
|
||||
* Start with the uuid, if it's not found, fallback to the id (as Embedded item in the actor)
|
||||
|
||||
Reference in New Issue
Block a user