Opened 13 years ago

Closed 13 years ago

#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
Component: Atlas editor Keywords: atlas, ui
Cc: Patch:

Description

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.

Change History (2)

comment:1 by historic_bruno, 13 years ago

Owner: set to historic_bruno
Status: newassigned

comment:2 by ben, 13 years ago

Resolution: fixed
Status: assignedclosed

(In [10064]) Fixes Atlas player panel getting out of sync with simulation. Fixes #927. Fixes object panel not being notified of map loading. Fixes bug where opening a new map before using the player panel prevented default player data being displayed for new players. Fixes wxGTK 2.8 bug: wxChoicebook control doesn't update the choice control when adding/removing pages. Notifies player that deleting player in Atlas will delete all their objects (and gives them the option). Changes DeleteObject to DeleteObjects to support multiple selections. Implements undo for map resize (experimental). Removes annoying debug message from attempted undo of map settings. Tweaks a few Atlas UI controls.

Note: See TracTickets for help on using tickets.