Skip to content
This repository has been archived by the owner on Jul 10, 2021. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
espositos committed Feb 18, 2021
2 parents d26286e + bf56e31 commit 2e6b69b
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [0.10.34] 2020-02-18
### Added
- SW5e class features thanks to Therasin/Zasshem

## [0.10.33] 2020-02-06
### Added
- Option to toggle between drop-up and drop-down categories
Expand Down
1 change: 1 addition & 0 deletions lang/br.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"tokenactionhud.tools": "Ferramentas",

"tokenactionhud.features": "Talentos",
"tokenactionhud.classFeatures": "Características da aula",
"tokenactionhud.levelAbbreviation": "Lvl",

"tokenactionhud.blocklistLabel": "Lista Bloquiada (somente esconder) ou Lista Permitida (somente exibir)",
Expand Down
1 change: 1 addition & 0 deletions lang/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"tokenactionhud.magicItems": "魔法物品",
"tokenactionhud.feats": "专长",
"tokenactionhud.features": "特性",
"tokenactionhud.classFeatures": "班级特色",
"tokenactionhud.free": "自由",
"tokenactionhud.inconsumables": "非消耗品",
"tokenactionhud.instinct": "直感",
Expand Down
1 change: 1 addition & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"tokenactionhud.magicItems": "Magic Items",
"tokenactionhud.feats": "Feats",
"tokenactionhud.features": "Features",
"tokenactionhud.classFeatures": "Class Features",
"tokenactionhud.free": "Free",
"tokenactionhud.inconsumables": "Inconsumables",
"tokenactionhud.instinct": "Instinct",
Expand Down
1 change: 1 addition & 0 deletions lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"tokenactionhud.dmg": "Dañ",
"tokenactionhud.feats": "Dotes",
"tokenactionhud.features": "Dotes",
"tokenactionhud.classFeatures": "Características de clase",
"tokenactionhud.inconsumables": "Consumibles",
"tokenactionhud.instinct": "Instinto",
"tokenactionhud.monsterMoves": "Movimientos de Monstruo",
Expand Down
1 change: 1 addition & 0 deletions lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"tokenactionhud.equipment": "Equipement",
"tokenactionhud.magicItems": "Objets Magiques",
"tokenactionhud.feats": "Dons",
"tokenactionhud.classFeatures": "Capacités de classe",
"tokenactionhud.features": "Capacités",
"tokenactionhud.free": "Libre",
"tokenactionhud.inconsumables": "Non consommables",
Expand Down
1 change: 1 addition & 0 deletions lang/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"tokenactionhud.magicItems": "魔法アイテム",
"tokenactionhud.feats": "特技",
"tokenactionhud.features": "特徴",
"tokenactionhud.classFeatures": "クラスの特徴",
"tokenactionhud.free": "無料",
"tokenactionhud.inconsumables": "非消耗品",
"tokenactionhud.instinct": "直感",
Expand Down
1 change: 1 addition & 0 deletions lang/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"tokenactionhud.equipment": "장비",
"tokenactionhud.magicItems": "매직 아이템",
"tokenactionhud.feats": "피트",
"tokenactionhud.classFeatures": "Class Features",
"tokenactionhud.features": "특징",
"tokenactionhud.free": "자유",
"tokenactionhud.inconsumables": "비소모품",
Expand Down
1 change: 1 addition & 0 deletions lang/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"tokenactionhud.equipment": "Ekwipunek",
"tokenactionhud.magicItems": "Magiczne Przedmioty",
"tokenactionhud.feats": "Feats",
"tokenactionhud.classFeatures": "Class Features",
"tokenactionhud.features": "Features",
"tokenactionhud.free": "Darmowe",
"tokenactionhud.inconsumables": "Inconsumables",
Expand Down
14 changes: 13 additions & 1 deletion scripts/actions/sw5e/sw5e-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,20 @@ export class ActionHandlerSw5e extends ActionHandler {
let items = this._getItemList(actor, tokenId);
let powers = this._getPowersList(actor, tokenId);
let feats = this._getFeatsList(actor, tokenId);
let classFeatures = this._getClassFeaturesList(actor, tokenId);
let skills = this._getSkillsList(actor.data.data.skills, tokenId);
let utility = this._getUtilityList(actor, tokenId);

let itemsTitle = this.i18n('tokenactionhud.inventory');
let powersTitle = this.i18n('tokenactionhud.powers');
let featsTitle = this.i18n('tokenactionhud.features');
let classFeaturesTitle = this.i18n('tokenactionhud.classFeatures');
let skillsTitle = this.i18n('tokenactionhud.skills');

this._combineCategoryWithList(result, itemsTitle, items);
this._combineCategoryWithList(result, powersTitle, powers);
this._combineCategoryWithList(result, featsTitle, feats);
this._combineCategoryWithList(result, classFeaturesTitle, classFeatures);
this._combineCategoryWithList(result, skillsTitle, skills);

let savesTitle = this.i18n('tokenactionhud.saves');
Expand Down Expand Up @@ -305,7 +308,7 @@ export class ActionHandlerSw5e extends ActionHandler {
if (c?.concentration)
power.info2 += this.i18n('SW5E.Concentration').charAt(0).toUpperCase();
}
/** FEATS **/

/** @private */
Expand All @@ -316,6 +319,15 @@ export class ActionHandlerSw5e extends ActionHandler {

return feats;
}

/** @private */
_getClassFeaturesList(actor, tokenId) {
let validClassfeature = this._filterLongerActions(actor.data.items.filter(i => i.type == 'classfeature'));
let sortedClassfeature = this._sortByItemSort(validClassfeature);
let classfeatures = this._categoriseFeats(tokenId, actor, sortedClassfeature);

return classfeatures;
}

/** @private */
_categoriseFeats(tokenId, actor, feats) {
Expand Down

0 comments on commit 2e6b69b

Please sign in to comment.