update type definitions
This commit is contained in:
parent
628490c6f2
commit
6c3432cb26
4 changed files with 6 additions and 6 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -3119,7 +3119,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"foundry-vtt-types": {
|
"foundry-vtt-types": {
|
||||||
"version": "github:League-of-Foundry-Developers/foundry-vtt-types#e08a7166345d7905ac8324d6f418c05d98a49ebf",
|
"version": "github:League-of-Foundry-Developers/foundry-vtt-types#cc36aef8865034a37e56ac01b27c8a0746253fbb",
|
||||||
"from": "github:League-of-Foundry-Developers/foundry-vtt-types#foundry-0.7.9",
|
"from": "github:League-of-Foundry-Developers/foundry-vtt-types#foundry-0.7.9",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { DS4Item } from "../item/item";
|
||||||
import { DS4Armor, DS4Shield, ItemType } from "../item/item-data";
|
import { DS4Armor, DS4Shield, ItemType } from "../item/item-data";
|
||||||
import { DS4ActorData } from "./actor-data";
|
import { DS4ActorData } from "./actor-data";
|
||||||
|
|
||||||
export class DS4Actor extends Actor<DS4Item, DS4ActorData> {
|
export class DS4Actor extends Actor<DS4ActorData, DS4Item> {
|
||||||
/** @override */
|
/** @override */
|
||||||
prepareDerivedData(): void {
|
prepareDerivedData(): void {
|
||||||
const data = this.data;
|
const data = this.data;
|
||||||
|
|
|
@ -117,17 +117,17 @@ export class DS4ActorSheet extends ActorSheet<unknown, DS4Actor> {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Finally, create the item!
|
// Finally, create the item!
|
||||||
return this.actor.createOwnedItem(itemData as DS4ItemData); // TODO(types): Improve upstream typing of createOwnedItem. It is possible to leave parts out here. Should be fine after https://github.com/League-of-Foundry-Developers/foundry-vtt-types/pull/4/ is merged
|
return this.actor.createOwnedItem(itemData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle changes to properties of an Owned Item from within character sheet.
|
* Handle changes to properties of an Owned Item from within character sheet.
|
||||||
* Can currently properly bind: see getValue().
|
* Can currently properly bind: see getValue().
|
||||||
* Assumes the item property is given as the value of the HTML element property 'data-property'.
|
* Assumes the item property is given as the value of the HTML element property 'data-property'.
|
||||||
* @param {JQuery.ChangeEvent<HTMLFormElement>} ev The originating change event
|
* @param {JQuery.ChangeEvent<HTMLElement>} ev The originating change event
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
private _onItemChange(ev: JQuery.ChangeEvent<HTMLFormElement>): void {
|
private _onItemChange(ev: JQuery.ChangeEvent<HTMLElement>): void {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
console.log("Current target:", $(ev.currentTarget).get(0)["name"]);
|
console.log("Current target:", $(ev.currentTarget).get(0)["name"]);
|
||||||
const el: HTMLFormElement = $(ev.currentTarget).get(0);
|
const el: HTMLFormElement = $(ev.currentTarget).get(0);
|
||||||
|
|
|
@ -33,7 +33,7 @@ Hooks.once("init", async function () {
|
||||||
CONFIG.Item.typeLabels = DS4.i18n.itemTypes;
|
CONFIG.Item.typeLabels = DS4.i18n.itemTypes;
|
||||||
|
|
||||||
// Configure Dice
|
// Configure Dice
|
||||||
CONFIG.Dice.types = [Die, DS4Check];
|
CONFIG.Dice.types = [Die, DS4Check]; // TODO(types) fix upstream
|
||||||
CONFIG.Dice.terms = {
|
CONFIG.Dice.terms = {
|
||||||
c: Coin,
|
c: Coin,
|
||||||
d: Die,
|
d: Die,
|
||||||
|
|
Loading…
Reference in a new issue