mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Support drag/drop resorting of adversary features (#1469)
This commit is contained in:
parent
c83fe25a47
commit
f11b018bd7
2 changed files with 8 additions and 1 deletions
|
|
@ -93,6 +93,13 @@ export default class AdversarySheet extends DHBaseActorSheet {
|
|||
context.resources.stress.emptyPips =
|
||||
context.resources.stress.max < maxResource ? maxResource - context.resources.stress.max : 0;
|
||||
|
||||
const featureForms = ['passive', 'action', 'reaction'];
|
||||
context.features = this.document.system.features.sort((a, b) =>
|
||||
a.system.featureForm !== b.system.featureForm
|
||||
? featureForms.indexOf(a.system.featureForm) - featureForms.indexOf(b.system.featureForm)
|
||||
: a.sort - b.sort
|
||||
);
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
{{> 'daggerheart.inventory-items'
|
||||
title=tabs.features.label
|
||||
type='feature'
|
||||
collection=document.system.features
|
||||
collection=@root.features
|
||||
hideContextMenu=true
|
||||
canCreate=true
|
||||
showActions=true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue