Various minor fixes + fix roll result

This commit is contained in:
2024-09-04 08:57:26 +02:00
parent 321052fd33
commit e6bdc427f2
100 changed files with 750 additions and 601 deletions

View File

@ -47,10 +47,19 @@ export class BoLActorSheet extends ActorSheet {
// Equip/Unequip item
html.find('.item-equip').click(this._onToggleEquip.bind(this));
html.find('.create_item').click(ev => {
this.actor.createEmbeddedDocuments('Item', [{ name: "Nouvel Equipement", type: "item" }], { renderSheet: true });
html.find('.create-item').click(ev => {
this.actor.createEmbeddedDocuments('Item', [{ name: game.i18n.localize("BOL.ui.newEquipment"), type: "item" }], { renderSheet: true });
});
html.find('.create-natural-weapon').click(ev => {
let system = foundry.utils.duplicate(game.bol.config.defaultNaturalWeapon)
this.actor.createEmbeddedDocuments('Item', [{ name: game.i18n.localize("BOL.ui.newNaturalWeapon"), type: "item", system }], { renderSheet: true });
});
html.find('.create-natural-protection').click(ev => {
let system = foundry.utils.duplicate(game.bol.config.defaultNaturalProtection)
this.actor.createEmbeddedDocuments('Item', [{ name: game.i18n.localize("BOL.ui.newNaturalProtection"), type: "item", system }], { renderSheet: true });
});
html.find(".toggle-fight-option").click((ev) => {
const li = $(ev.currentTarget).parents(".item")
this.actor.toggleFightOption(li.data("itemId"))

View File

@ -20,6 +20,7 @@ export class BoLActor extends Actor {
}
super.prepareData()
}
/* -------------------------------------------- */
async _preCreate(data, options, user) {