Skip to content
This repository has been archived by the owner on Apr 15, 2022. It is now read-only.

Commit

Permalink
Update FVTT definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Djphoenix719 committed Dec 11, 2021
1 parent 2a84511 commit f89a8f4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 271 deletions.
265 changes: 0 additions & 265 deletions handwrap_runes.txt

This file was deleted.

3 changes: 2 additions & 1 deletion src/module/loot-app/LootApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export const extendLootSheet = () => {

// @ts-ignore
const item: Item = new (game.items as Items).documentClass(value);
// @ts-ignore
game.items?.set(value._id, item);
this._createBaseItem = value;
}
Expand Down Expand Up @@ -414,7 +415,7 @@ export const extendLootSheet = () => {
return dataUpdates;
}

public async getData(options?: Application.RenderOptions) {
public async getData(options?: ActorSheet.Options) {
const data = (await super.getData(options)) as Record<string, any>;

data['constants'] = {
Expand Down
4 changes: 2 additions & 2 deletions src/module/loot-app/Utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ export async function drawFromSources(count: number, sources: DataSource[], opti
const table = await getItemFromPack<RollTable>(source.tableSource.id, source.id);

// @ts-ignore
const draw = await table.roll({ roll: null, recursive: true });
const [result]: [TableResult] = draw.results;
const draw: any = await table.roll({ roll: null, recursive: true });
const [result]: [LootTableResult] = draw.results;

if (result.data.resultId) {
item = await getItemFromPack(result.data.collection, result.data.resultId);
Expand Down
6 changes: 3 additions & 3 deletions src/types/RollTable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
* limitations under the License.
*/

declare interface TableResult {
data: TableResultData;
declare interface LootTableResult {
data: LootTableResultData;
parent: RollTable;
}

declare interface TableResultData {
declare interface LootTableResultData {
collection: string;
drawn: boolean;
flags: object;
Expand Down

0 comments on commit f89a8f4

Please sign in to comment.