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 => {

View File

@@ -1,18 +1,16 @@
import { HeritiersUtility } from "./heritiers-utility.js";
export const defaultItemImg = {
competence: "systems/fvtt-les-heritiers/assets/icons/competence.webp",
arme: "systems/fvtt-les-heritiers/assets/icons/melee.webp",
competence: "systems/fvtt-les-heritiers/assets/icons/skill.webp",
avantage: "systems/fvtt-les-heritiers/assets/icons/advantage.webp",
desavantage: "systems/fvtt-les-heritiers/assets/icons/disadvantage.webp",
contact: "systems/fvtt-les-heritiers/assets/icons/contact.webp",
pouvoir: "systems/fvtt-les-heritiers/assets/icons/power.webp",
equipement: "systems/fvtt-les-heritiers/assets/icons/equipement.webp",
arme: "systems/fvtt-les-heritiers/assets/icons/melee.webp",
monnaie: "systems/fvtt-les-heritiers/assets/icons/monnaie.webp",
predilection: "systems/fvtt-les-heritiers/assets/icons/predilection.webp",
protection: "systems/fvtt-les-heritiers/assets/icons/protection.webp",
talent: "systems/fvtt-les-heritiers/assets/icons/talent.webp",
historique: "systems/fvtt-les-heritiers/assets/icons/historique.webp",
profil: "systems/fvtt-les-heritiers/assets/icons/profil.webp",
artefact: "systems/fvtt-les-heritiers/assets/icons/artefact.webp",
contact: "systems/fvtt-les-heritiers/assets/icons/contacts.webp",
ressource: "systems/fvtt-les-heritiers/assets/icons/ressources.webp",
talent: "systems/fvtt-les-heritiers/assets/icons/talent.webp"
}
/**