Skip to content

allow sorting weapons, armor and gear in the actor sheet#112

Open
KrultiNinja wants to merge 1 commit intosuperseva:masterfrom
KrultiNinja:master
Open

allow sorting weapons, armor and gear in the actor sheet#112
KrultiNinja wants to merge 1 commit intosuperseva:masterfrom
KrultiNinja:master

Conversation

@KrultiNinja
Copy link

@KrultiNinja KrultiNinja commented Aug 14, 2024

Hello,

I've seen your answer to the previous pull request, nevertheless..

I suggest 4 small modifications to allow sorting some items (weapons, armor and gear specifically) inside the actor sheet:

  • add of "item-list" and "item" classes to the partial templates of weapons, armor and gear;
  • replacement of "items: actorData.items," by "items: actorData.items.sort((a, b) => (a.sort || 0) - (b.sort || 0))," in the getData function of the actorsheet.js so that the items can effectively be sorted.

Incidentally, it also allows the use of the 'Item Piles" module with mutant year zero, which is great.

Have a good holiday !

@Animator369
Copy link

That's great! But is it possible to do the same for the list of skills in the "Modifiers" tab if skills is translated to another language?

@KrultiNinja
Copy link
Author

I agree it could be useful, but it's way over my programming abilities ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants