Corrections après tests de combat
Some checks failed
Release Creation / build (release) Failing after 1m34s
Some checks failed
Release Creation / build (release) Failing after 1m34s
This commit is contained in:
@@ -46,6 +46,7 @@ export default class CelestopolActorSheet extends HandlebarsApplicationMixin(fou
|
||||
skillLevel: CelestopolActorSheet.#onSkillLevel,
|
||||
factionLevel: CelestopolActorSheet.#onFactionLevel,
|
||||
toggleArmure: CelestopolActorSheet.#onToggleArmure,
|
||||
toggleWeapon: CelestopolActorSheet.#onToggleWeapon,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -237,6 +238,13 @@ export default class CelestopolActorSheet extends HandlebarsApplicationMixin(fou
|
||||
if (item?.type === "armure") await item.update({ "system.equipped": !item.system.equipped })
|
||||
}
|
||||
|
||||
static async #onToggleWeapon(_event, target) {
|
||||
const uuid = target.closest('[data-item-uuid]')?.dataset.itemUuid
|
||||
if (!uuid) return
|
||||
const item = await fromUuid(uuid)
|
||||
if (item?.type === "weapon") await item.update({ "system.equipped": !item.system.equipped })
|
||||
}
|
||||
|
||||
static #onFactionLevel(_event, target) {
|
||||
if (!this.isEditable) return
|
||||
const factionId = target.dataset.faction
|
||||
|
||||
Reference in New Issue
Block a user