getting skill bonuses showing

This commit is contained in:
Lyle hayhurst
2021-06-07 19:44:36 -05:00
parent b4fe337824
commit a5655f46dd
2 changed files with 7 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ In propertyinspector/js/common.js starting at line 1274 there's various function
To enable logging on the streamdeck, [follow these instructions](https://developer.elgato.com/documentation/stream-deck/sdk/create-your-own-plugin/) from Elgato. To enable logging on the streamdeck, [follow these instructions](https://developer.elgato.com/documentation/stream-deck/sdk/create-your-own-plugin/) from Elgato.
## Property discovery ## Property discovery
In a Foundry client browser instance, if you go to the dev console, you can browser your tokens via the `canvas.tokens` path, for exmaple `canvas.tokens.children[0].children[0].actor.items`. In a Foundry client browser instance, if you go to the dev console, you can browser your tokens via the `canvas.tokens` path, for example `canvas.tokens.children[0].children[0].actor.data`.
## Module Deployment ## Module Deployment
If you make changes to files in this project, you'll need to copy the changed files to your Foundry install folder, probably found here: `C:\Users\$USER\AppData\Local\FoundryVTT\Data\modules\MaterialDeck`. If you make changes to files in this project, you'll need to copy the changed files to your Foundry install folder, probably found here: `C:\Users\$USER\AppData\Local\FoundryVTT\Data\modules\MaterialDeck`.

View File

@@ -35,8 +35,13 @@ export class wfrp4e {
getFeatures(token,featureType) { getFeatures(token,featureType) {
if (featureType == undefined) featureType = 'any'; if (featureType == undefined) featureType = 'any';
const allItems = token.actor.items; const allItems = token.actor.items;
console.log(allItems);
if (featureType == 'any') return allItems.filter(i => i.type == 'skill' || i.type == 'talent' || i.type == "career" || i.type == 'trait'); if (featureType == 'any') return allItems.filter(i => i.type == 'skill' || i.type == 'talent' || i.type == "career" || i.type == 'trait');
else return allItems.filter(i => i.type == featureType); return allItems.filter(i => i.type == featureType);
}
getFeatureUses(item) {
return {available: `+${item.data.data.total.value}`};
} }
getHP(token) { getHP(token) {