HomeWildfire Games

Rewrite Gamesetup AIConfig page to use class syntax, decouple settings and move…

Description

Rewrite Gamesetup AIConfig page to use class syntax, decouple settings and move it to the Gamesetup subfolder context, refs #5322, #5387.

This establishes a code architecture where only one class and only one page is responsible per AI setting,
removes the hardcodings from the XML and JS file,
allowing future patches and mods to insert, remove and edit independent AI settings without having to overwrite the existing code.

Differential Revision: https://code.wildfiregames.com/D2577
See also rP23413/D2581 and comments linked there.

Event Timeline

Also:
Removes the hack to Pop and Push the dialog in order to update it.
Update the gameAttributes instantly when changing an AI dropdown, so that the selection isnt lost when another client changes any game setting, preparing for #3806.

Silier added a subscriber: Silier.Oct 15 2020, 7:44 PM
Silier added inline comments.
/ps/trunk/binaries/data/mods/public/gui/gamesetup/Pages/AIConfigPage/Controls/AIDifficulty.js
31

this.playerIndex is undefined for #5844