Make dragging features work more seamlessly

This commit is contained in:
Carlos Fernandez 2026-06-18 22:54:11 -04:00
parent 961e124ef2
commit a6b53b9c0d
3 changed files with 26 additions and 2 deletions

View file

@ -54,7 +54,7 @@ export default class DHAdversarySettings extends DHBaseActorSettings {
async _prepareContext(options) {
const context = await super._prepareContext(options);
const featureForms = ['passive', 'action', 'reaction'];
const featureForms = Object.keys(CONFIG.DH.ITEM.featureForm);
context.features = context.document.system.features.sort((a, b) =>
a.system.featureForm !== b.system.featureForm
? featureForms.indexOf(a.system.featureForm) - featureForms.indexOf(b.system.featureForm)