Add item
This commit is contained in:
@@ -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");
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user