mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[PR] Removing refreshables the user doesn't have during rest actions (#1449)
* Marking up the places that need changing for bug #1160 * Creating a shared method called isItemAvailable and using it in downtime * Explicitely adding the false value rather than relying on undefined returns. Oops * Removing spaces * Removing a needless return line * Adding missing semicolon
This commit is contained in:
parent
605a23ab58
commit
0508bf4188
4 changed files with 47 additions and 37 deletions
|
|
@ -93,7 +93,7 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV
|
|||
}
|
||||
|
||||
getRefreshables() {
|
||||
const actionItems = this.actor.items.reduce((acc, x) => {
|
||||
const actionItems = this.actor.items.filter(x => this.actor.system.isItemAvailable(x)).reduce((acc, x) => {
|
||||
if (x.system.actions) {
|
||||
const recoverable = x.system.actions.reduce((acc, action) => {
|
||||
if (refreshIsAllowed([this.shortrest ? 'shortRest' : 'longRest'], action.uses.recovery)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue