diff --git a/app/imports/client/ui/creature/actions/input/CheckInput.vue b/app/imports/client/ui/creature/actions/input/CheckInput.vue index 5377a3b9..f549b2fc 100644 --- a/app/imports/client/ui/creature/actions/input/CheckInput.vue +++ b/app/imports/client/ui/creature/actions/input/CheckInput.vue @@ -1,43 +1,65 @@ diff --git a/app/imports/client/ui/creature/character/characterSheetTabs/StatsTab.vue b/app/imports/client/ui/creature/character/characterSheetTabs/StatsTab.vue index 2b8ba12a..d2082065 100644 --- a/app/imports/client/ui/creature/character/characterSheetTabs/StatsTab.vue +++ b/app/imports/client/ui/creature/character/characterSheetTabs/StatsTab.vue @@ -415,12 +415,12 @@ import doAction from '/imports/client/ui/creature/actions/doAction'; import getPropertyTitle from '/imports/client/ui/properties/shared/getPropertyTitle'; function walkDown(forest, callback){ - let stack = [...forest]; + let stack = [...forest].reverse(); while(stack.length){ let node = stack.pop(); const { skipChildren } = callback(node) ?? { skipChildren: false }; if (!skipChildren) { - stack.push(...node.children); + stack.push(...[...node.children].reverse()); } } } @@ -557,7 +557,7 @@ export default { if (creature.settings.hideUnusedStats) { filter.hide = { $ne: true }; } - const allProps = CreatureProperties.find(filter, { sort: { left: -1 } }).fetch(); + const allProps = CreatureProperties.find(filter, { sort: { left: 1 } }).fetch(); const forest = docsToForest(allProps); const properties = { folder: {}, attribute: {}, skill: {} }; walkDown(forest, node => {