Minor fixes
All checks were successful
Release Creation / build (release) Successful in 1m27s

This commit is contained in:
2025-03-30 16:23:16 +02:00
parent 8576d25c2c
commit 38e01dad24
10 changed files with 51 additions and 17 deletions

View File

@@ -103,6 +103,21 @@ export default class FTLNomadVehicleSheet extends FTLNomadActorSheet {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newWeapon"), type: "weapon" }])
}
async _onRoll(event, target) {
const rollType = $(event.currentTarget).data("roll-type")
let item
let li
switch (rollType) {
case "damage":
li = $(event.currentTarget).parents(".item");
item = this.actor.items.get(li.data("item-id"));
break
default:
throw new Error(`Unknown roll type ${rollType}`)
}
await this.document.system.roll(rollType, item)
}
async _onDrop(event) {
if (!this.isEditable || !this.isEditMode) return