2023-11-28 21:39:24 +00:00
|
|
|
|
|
|
|
import { BladesSheet } from "./blades-sheet.js";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @extends {BladesSheet}
|
|
|
|
*/
|
|
|
|
export class BeamVehicleSheet extends BladesSheet {
|
|
|
|
|
|
|
|
/** @override */
|
|
|
|
static get defaultOptions() {
|
|
|
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
2023-11-28 22:06:09 +00:00
|
|
|
classes: ["beam-saber", "sheet", "actor"],
|
|
|
|
template: "systems/beam-saber/templates/vehicle-sheet.html",
|
2023-11-28 21:39:24 +00:00
|
|
|
width: 900,
|
|
|
|
height: 'auto',
|
|
|
|
tabs: [{navSelector: ".tabs", contentSelector: ".tab-content"}]
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
|
|
|
|
/** @override */
|
|
|
|
getData() {
|
|
|
|
const data = super.getData();
|
|
|
|
data.editable = this.options.editable;
|
|
|
|
const actorData = data.data;
|
|
|
|
data.actor = actorData;
|
|
|
|
data.data = actorData.data;
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
|
|
|
|
/** @override */
|
|
|
|
activateListeners(html) {
|
|
|
|
super.activateListeners(html);
|
|
|
|
|
|
|
|
// Everything below here is only needed if the sheet is editable
|
|
|
|
if (!this.options.editable) return;
|
|
|
|
|
|
|
|
// Update Inventory Item
|
|
|
|
// html.find('.item-body').click(ev => {
|
|
|
|
// const element = $(ev.currentTarget).parents(".item");
|
|
|
|
// const item = this.actor.items.get(element.data("itemId"));
|
|
|
|
// item.sheet.render(true);
|
|
|
|
// });
|
|
|
|
|
|
|
|
// // Delete Inventory Item
|
|
|
|
// html.find('.item-delete').click(ev => {
|
|
|
|
// const element = $(ev.currentTarget).parents(".item");
|
|
|
|
// this.actor.deleteEmbeddedDocuments("Item", [element.data("itemId")]);
|
|
|
|
// element.slideUp(200, () => this.render(false));
|
|
|
|
// });
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|