merge
This commit is contained in:
@@ -1,21 +1,20 @@
|
||||
import { L5RItemSheet } from "./item-sheet.js";
|
||||
import { ItemSheetL5r5e } from "./item-sheet.js";
|
||||
|
||||
/**
|
||||
* @extends {ItemSheet}
|
||||
*/
|
||||
export class L5RFeatSheet extends L5RItemSheet {
|
||||
|
||||
* @extends {ItemSheet}
|
||||
*/
|
||||
export class FeatSheetL5r5e extends ItemSheetL5r5e {
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
return mergeObject(super.defaultOptions, {
|
||||
classes: ["l5r", "sheet", "feat"],
|
||||
template: "systems/l5r/templates/item/feat-sheet.html",
|
||||
template: "systems/l5r5e/templates/item/feat-sheet.html",
|
||||
width: 520,
|
||||
height: 480,
|
||||
tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description"}]
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/** @override */
|
||||
getData() {
|
||||
const sheetData = super.getData();
|
||||
@@ -33,19 +32,18 @@ export class L5RFeatSheet extends L5RItemSheet {
|
||||
*/
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
|
||||
|
||||
// Everything below here is only needed if the sheet is editable
|
||||
if (!this.options.editable) return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update feat with the data from the sheet.
|
||||
* @param event
|
||||
* @param formData
|
||||
* @param event
|
||||
* @param formData
|
||||
*/
|
||||
_updateObject(event, formData) {
|
||||
|
||||
// Update the Item
|
||||
return this.object.update(formData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,46 +1,45 @@
|
||||
/**
|
||||
* Extend the basic ItemSheet with some very simple modifications
|
||||
* @extends {ItemSheet}
|
||||
*/
|
||||
export class L5RItemSheet extends ItemSheet {
|
||||
|
||||
* Extend the basic ItemSheet with some very simple modifications
|
||||
* @extends {ItemSheet}
|
||||
*/
|
||||
export class ItemSheetL5r5e extends ItemSheet {
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
return mergeObject(super.defaultOptions, {
|
||||
classes: ["l5r", "sheet", "item"],
|
||||
template: "systems/l5r/templates/item/item-sheet.html",
|
||||
template: "systems/l5r5e/templates/item/item-sheet.html",
|
||||
width: 520,
|
||||
height: 480,
|
||||
tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description"}]
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||
});
|
||||
}
|
||||
|
||||
getData() {
|
||||
const sheetData = super.getData();
|
||||
|
||||
|
||||
sheetData.data.dtypes = ["String", "Number", "Boolean"];
|
||||
|
||||
|
||||
sheetData.data.isEquipment = true;
|
||||
|
||||
|
||||
return sheetData;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Subscribe to events from the sheet.
|
||||
* @param html HTML content of the sheet.
|
||||
*/
|
||||
* Subscribe to events from the sheet.
|
||||
* @param html HTML content of the sheet.
|
||||
*/
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
|
||||
|
||||
// Everything below here is only needed if the sheet is editable
|
||||
if (!this.options.editable) return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update the item with data from the sheet.
|
||||
* @param event
|
||||
* @param formData
|
||||
*/
|
||||
* Update the item with data from the sheet.
|
||||
* @param event
|
||||
* @param formData
|
||||
*/
|
||||
_updateObject(event, formData) {
|
||||
return this.object.update(formData);
|
||||
}
|
||||
|
||||
@@ -1,4 +1 @@
|
||||
|
||||
export class L5RItem extends Item {
|
||||
|
||||
}
|
||||
export class ItemL5r5e extends Item {}
|
||||
|
||||
@@ -1,48 +1,47 @@
|
||||
import { L5RItemSheet } from "./item-sheet.js";
|
||||
import { ItemSheetL5r5e } from "./item-sheet.js";
|
||||
|
||||
/**
|
||||
* @extends {ItemSheet}
|
||||
*/
|
||||
export class L5RWeaponSheet extends L5RItemSheet {
|
||||
|
||||
* @extends {ItemSheet}
|
||||
*/
|
||||
export class WeaponSheetL5r5e extends ItemSheetL5r5e {
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
return mergeObject(super.defaultOptions, {
|
||||
classes: ["l5r", "sheet", "weapon"],
|
||||
template: "systems/l5r/templates/item/weapon-sheet.html",
|
||||
template: "systems/l5r5e/templates/item/weapon-sheet.html",
|
||||
width: 520,
|
||||
height: 480,
|
||||
tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description"}]
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
getData() {
|
||||
const sheetData = super.getData();
|
||||
sheetData.data.dtypes = ["String", "Number", "Boolean"];
|
||||
|
||||
|
||||
sheetData.data.isWeapon = true;
|
||||
sheetData.data.isEquipment = true;
|
||||
|
||||
|
||||
return sheetData;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Subscribe to events from the sheet.
|
||||
* @param html HTML content of the sheet.
|
||||
*/
|
||||
* Subscribe to events from the sheet.
|
||||
* @param html HTML content of the sheet.
|
||||
*/
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
|
||||
|
||||
// Everything below here is only needed if the sheet is editable
|
||||
if (!this.options.editable) return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update item with values from the sheet.
|
||||
* @param event
|
||||
* @param formData
|
||||
*/
|
||||
* Update item with values from the sheet.
|
||||
* @param event
|
||||
* @param formData
|
||||
*/
|
||||
_updateObject(event, formData) {
|
||||
return this.object.update(formData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user