Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neutral team order not respected in sidebar on TWW (and possibly other maps) #12849

Open
doctored opened this issue Aug 21, 2024 · 7 comments
Open
Assignees
Labels
Help Needed Problem A problem, bug, defect - something to fix

Comments

@doctored
Copy link

normal factions are displayed in turn order but neutrals all displayed last. start screen does respect ordering:

Screenshot 2024-08-20 at 6 26 58 PM

but sidebar does not:

Screenshot 2024-08-20 at 6 26 48 PM

would assume this also applies to other maps but have not tested.

@doctored doctored added the Problem A problem, bug, defect - something to fix label Aug 21, 2024
@doctored doctored changed the title Neutral team order not respected sidebar on TWW map Neutral team order not respected in sidebar on TWW (and possibly other maps) Aug 21, 2024
@frigoref
Copy link
Member

Summary: The tab Players shows the players in different sorting orders compared to the start screen (according to step order), e.g., on map total_world_war which seems to be due to code in PlayerOrderComparator.
The two comments here struck me as they seem to contradict each other:

  1. A comparator for {@link GamePlayer} that sorts instances in game play order.
    (describing the purpose of the class matching the expectation of @doctored)
  2. sort based on first step that isn't a bid related step.
    (which is actually implemented and causing the difference).

The Comparator is only used in method PlayerList.getSortedPlayers() which is used in the mentioned StatPanel (tab Players) and EconomyPanel.

It is unclear to me why such a difference would be needed and therefore I am asking for clarification from @DanVanAtta or @asvitkine.

@asvitkine
Copy link
Contributor

I'm not sure the history of the difference, but I suspect it's not intended and making it consistent would be benefitial.

@doctored
Copy link
Author

doctored commented Aug 28, 2024

it changed in 2.7, cant fathom any logic behind making this only not work for neutrals

@doctored
Copy link
Author

doctored commented Sep 9, 2024

not sure if this helps but it seems whatever is breaking this happens when the game is first created. if i open a game saved prior to 2.7 the order is correct in the sidebar

@RenXFlo
Copy link

RenXFlo commented Sep 27, 2024

Hi, if it's possible i would like to take this issue.

@frigoref
Copy link
Member

@RenXFlo go ahead. Happy coding!
Please try to reuse the same sorting code as basis.

@RenXFlo
Copy link

RenXFlo commented Sep 28, 2024

@RenXFlo go ahead. Happy coding! Please try to reuse the same sorting code as basis.

Is there any way of comunicating if im unsure about anything other than coments? Because I have few questions afther looking through classes and I just want to make sure I understand the issue properly without spaming the comment section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Needed Problem A problem, bug, defect - something to fix
Projects
None yet
Development

No branches or pull requests

4 participants