Add icons and stuff

This commit is contained in:
2022-12-28 14:10:58 +01:00
parent 5721aaa44e
commit cb91448c3b
14 changed files with 71 additions and 30 deletions

View File

@ -68,9 +68,6 @@ export class HeritiersItemSheet extends ItemSheet {
isGM: game.user.isGM
}
if ( objectData.type == "don") {
formData.sacrifice = await TextEditor.enrichHTML(this.object.system.sacrifice, {async: true})
}
//this.options.editable = !(this.object.origin == "embeddedItem");
console.log("ITEM DATA", formData, this);
return formData;
@ -171,17 +168,17 @@ export class HeritiersItemSheet extends ItemSheet {
this.object.update( { 'system.predilections': pred })
})
html.find('#add-predilection').click(ev => {
let pred = duplicate(this.object.system.predilections)
pred.push( { name: "Nouvelle prédilection", id: randomID(16), used: false })
this.object.update( { 'system.predilections': pred })
html.find('#add-specialite').click(ev => {
let spec = duplicate(this.object.system.specialites)
spec.push( { name: "Nouvelle Spécialité", id: randomID(16), used: false })
this.object.update( { 'system.specialites': spec })
})
html.find('.delete-prediction').click(ev => {
const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index")
let pred = duplicate(this.object.system.predilections)
pred.splice(index,1)
this.object.update( { 'system.predilections': pred })
html.find('.delete-specialite').click(ev => {
const li = $(ev.currentTarget).parents(".specialite-item")
let index = li.data("specialite-index")
let spec = duplicate(this.object.system.specialites)
spec.splice(index,1)
this.object.update( { 'system.specialites': spec })
})
html.find('#add-automation').click(ev => {