Open ElectroJr opened 1 year ago
could you not mark an action as manually placed (false by default) then when new action is added sort them all by priority unless they are manually placed
There is actions priority sorting in ActionsSystem.cs
, so it might be broken.
By might I mean definitely, because the current actions sort order is not deterministic (changes on every connection) and sometimes results in harm (priority -100) being sorted like this:
There is actions priority sorting in ActionsSystem.cs, so it might be broken.
Theres currently a bug that should get fixed by #20260, but it won't fix this issue.
could you not mark an action as manually placed (false by default) then when new action is added sort them all by priority unless they are manually placed
I don't think automatically shuffling around actions unless they have been manually placed is a good idea. If something gets assigned to a number on the toolbar a player should be able to assume that the assignment won't unexpectedly change.
Currently the order in which actions get added to the action bar is dependent on the order in which action entities get sent to a player. The client does do some sorting by priority, but that only works if all actions arrived at the same time.
I'm not sure what the best fix is. One option is to just networked the action toolbar assignment, so that the server can help determine the order of actions, but that would cause issues for client-side actions.