Reveal AI settings in the gamesetup to all players. Based on patch by Imarok, fixes #3911.
Description
Description
Details
Details
- Committed
elexis Apr 21 2016, 10:07 PM - Parents
- rP18077: Add capture animation to champion infantry of different civs
- Branches
- Unknown
- Tags
Event Timeline
/ps/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | ||
---|---|---|
1434 | Since noone else mentioned it yet: dirty hack. It would be nicer to update the existing page with the new GameAttributes rather than assembling the page state, sending the page state to the parent page, closing the child page, opening a new child page with the new parent page data and previous child page data. This has 2 advantages:
|
/ps/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | ||
---|---|---|
1434 | Kinda related to this. More of a side-effect of this implementation.
|
/ps/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | ||
---|---|---|
1434 | Thanks for that hint, I was already wanting to mention that we two saw this PopGuiPage stacktrace, but I never know how to reproduce it other than guessing hotloading could be involved. |
/ps/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | ||
---|---|---|
1434 | Fixed by rP23341. While I wrote the patch to allow the one gui page (gamesetup) to send data to another GUI page (aiconfig), The alternative is to make the aiconfig dialog a GUI object of the gamesetup page, similar to the diplomacy dialog in the session. This has the disadvantage that there is less separation of concerns (aiconfig has full access to GUI page and may unintentionally shadow variables for instance) but the advantage that actually shared concerns can be covered (for example reacting to g_GameAttributes changes). Its not only relevant for this gamesetup subpage but also for pages where the players can select per-player starting resources, heroes, or the MapBrowser (see also D1777). For the mapbrowser for example it would mean it could also reuse the same MapCache and with D2483 it could reuse the GameSettingsControl or PlayerAssignmentsControl without cross context access and cloning. |