* New "Apply" button in preferences dialog that is used to quickly apply the GUI2 theme, no restart needed.
* gui initialization reorganized a bit. gui2::init() now responsible for reading themes from file only. Actual theme switching and activation done by gui2::switch_theme(). preferences dependency removed from gui and moved to caller of gui2::init(). gui2 tests updated accordingly.
Opens load map/save map as dialogs in the addon's map directory if an addon is selected.
With no addon selected they open in the editor/maps directory.
* make drop caps utf8 aware and use locale's script font
1. Uses utf8::insert to modify the string so that it works for non-ASCII characters.
2. Use the locale's script font from data/hardwired/fonts.cfg instead of using Oldania always.
* make the algorithm work for multiple start tags in the tip text
* update condition to prevent throwing exception and don't use utf8::size
* adds comment that the tags do not have multibyte characters
These may be less efficient in some cases, and there's even a couple of degenerate cases, but it's definitely easier to use like this.
This also adds an example of the original method, using a string to reference a separate list.
Previously `synced_context::undo_blocked()` sometimes returned the worng result, leading to OOS because `synced_context::undo_blocked()` was used to determine whether we can send action to the other clients.
With this patch `synced_context::undo_blocked()` not doesn't always return true when its called during "local choices".
I am curently not even sure whether that line is needed at all since using the rng should always set is_simultaneous_ to true.
Even tests that don't have "_bug" in the name shouldn't prevent
intentional changes to behavior, I've added a paragraph about that.
Rewrite the non-reservation of "break" and "error" for clarity.
* Eastern Invasion
* fixed Gweddry having the wrong HP values
* fixed the king being neutral instead of lawful
* fixed "Dark Shape" being neutral instead of chaotic
* the king can no longer wield the plague staff
* the king and generals can no longer recall undead veterans
In EI S11, the player encounters an orcish warlord named Dra-Nak. If not killed in S11, he continues pursuing the player in S12, but the current S12 gives him different traits and a different portrait. This PR fixes the issue.
EI's S17b has a gold refund mechanic, allowing enemies to build up large gold reserves in certain situations.
When gold gets high, enemies are supposed to start recruiting higher-level units so they can spend it faster. The former implementation had some inconsistent issues; this should restore the intended behavior.