This commit is contained in:
2022-03-15 20:57:51 +01:00
parent 2137f88823
commit e59a815eaf
3 changed files with 35 additions and 9 deletions

View File

@@ -111,17 +111,21 @@ export class PegasusActorSheet extends ActorSheet {
// Update Inventory Item
html.find('.item-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item");
let itemId = li.data("item-id");
const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id")
const item = this.actor.items.get( itemId );
item.sheet.render(true);
});
// Delete Inventory Item
html.find('.item-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item");
PegasusUtility.confirmDelete(this, li);
});
const li = $(ev.currentTarget).parents(".item")
PegasusUtility.confirmDelete(this, li)
})
html.find('.item-add').click(ev => {
let dataType = $(ev.currentTarget).data("type")
this.actor.createEmbeddedDocuments('Item', [{ name: "NewItem", type: dataType }], { renderSheet: true })
})
html.find('.spec-group-activate').click(ev => {
const li = $(ev.currentTarget).parents(".item");
let itemId = li.data("item-id");

View File

@@ -32,12 +32,12 @@ Hooks.once("init", async function () {
/* -------------------------------------------- */
game.settings.register("fvtt-pegasus-rpg", "dice-max-level", {
name: "Maximum level value for dices lists",
hint: "Se the maximum level value for dices lists",
hint: "Set the maximum level value for dices lists",
scope: "world",
config: true,
default: 20,
type: Number
});
})
/* -------------------------------------------- */
// Set an initiative formula for the system