Ticket #927 (closed defect: fixed)
[ATLAS] Increasing number of players is broken
|Reported by:||historic_bruno||Owned by:||historic_bruno|
|Priority:||Should Have||Milestone:||Alpha 7|
If you open a map in Atlas with e.g. 2 players, and increase that to 3 players, the PlayerManager? component won't get updated because that only happens when a map is loaded. So PlayerManager? and the player settings in Atlas are out of sync, which hasn't been a problem until lately. Now that we have territories and build limits, there will be warnings if you try to place a building for the newly created player (their ID doesn't exist) and even incorrect rendering of its territory borders.
A possible solution is to reload the map (at least run simulation init?) when the number of players is changed, which shouldn't happen too often. Or we can try to add some special logic to manually add/remove players, which seems like a hack.
Also I've noticed two related bugs that affect the Atlas UI:
- When you load a map, the player dropdown on the object panel doesn't get updated to the correct number of players.
- If you load a map and then increase the number of players, the default player data is not always loaded in the player panel. It seems like this worked in the past, maybe not.