Do some cleanup

This commit is contained in:
Johannes Loher 2021-02-07 11:51:36 +01:00
parent 98568de676
commit d5db788c31
14 changed files with 91 additions and 109 deletions

View file

@ -3,7 +3,7 @@ import { DS4Item } from "./item";
import { isDS4ItemDataTypePhysical } from "./item-data";
/**
* Extend the basic ItemSheet with some very simple modifications
* The Sheet class for DS4 Items
*/
// TODO(types): Remove first generic parameter once https://github.com/League-of-Foundry-Developers/foundry-vtt-types/pull/273 is merged
export class DS4ItemSheet extends ItemSheet<unknown, DS4Item> {
@ -41,8 +41,6 @@ export class DS4ItemSheet extends ItemSheet<unknown, DS4Item> {
return `${path}/${this.item.data.type}-sheet.hbs`;
}
/* -------------------------------------------- */
/** @override */
getData(): ItemSheet.Data<DS4Item> {
const data = {
@ -56,8 +54,6 @@ export class DS4ItemSheet extends ItemSheet<unknown, DS4Item> {
return data;
}
/* -------------------------------------------- */
/** @override */
setPosition(options: Partial<Application.Position> = {}): Application.Position {
const position = super.setPosition(options);
@ -71,8 +67,6 @@ export class DS4ItemSheet extends ItemSheet<unknown, DS4Item> {
return position;
}
/* -------------------------------------------- */
/** @override */
activateListeners(html: JQuery): void {
super.activateListeners(html);
@ -84,9 +78,9 @@ export class DS4ItemSheet extends ItemSheet<unknown, DS4Item> {
/**
* Handle management of ActiveEffects.
* @param event The originating click event
* @param event - he originating click event
*/
private async _onManageActiveEffect(event: JQuery.ClickEvent): Promise<unknown> {
protected async _onManageActiveEffect(event: JQuery.ClickEvent): Promise<unknown> {
event.preventDefault();
if (this.item.isOwned) {
@ -110,7 +104,7 @@ export class DS4ItemSheet extends ItemSheet<unknown, DS4Item> {
/**
* Create a new ActiveEffect for the item using default data.
*/
private async _createActiveEffect(): Promise<ActiveEffect.Data> {
protected async _createActiveEffect(): Promise<ActiveEffect.Data> {
const label = `New Effect`;
const createData = {