* Moved the combobox (sorry celmin) to the top right in a manner akin
to the search boxes in dialogs with those.
* Switched list headers to using the gold_small label variation.
This replaces the Reset button with a dedicated listbox entry, and
replaces the selection status text with code that sets the initial
selection for the listbox and an icon that's used to display whether a
selection applies globally or only to the current unit.
This does alter some of the code significantly to make it less "clever"
(no more dynamic build) but also less hostile to future modifications
like this.
(CC #5555)
This means that any deprecation message triggered from Lua now explains exactly where it triggered.
The message still triggers only once, so you would need multiple passes to fix every case, but it seems like an improvement.
It was already considered for registering halos, just not for rendering
regular frames. This commit touches the halo code a little so we don't
need to call get_zoom_factor() multiple times per frame.
Closes#5508.
There's already enough randomness in Wesnoth; having the game randomly choose what a unit levels up to in a multiplayer game because it happens to advance on someone else's turn is unnecessary.
This also reduces the need to manually select a unit's advancement path for advancement planning modifications. For example, if you want your Mage to level up into a White Mage, this is now the default and doesn't need to be manually selected by the player.
While implementationally it's very simple, the feedback so far (minimal as it may be) has been negative due to the side effects on existing gameplay mechanics:
* Delaying advancement until the next time it's the advancing unit's side's turn gives enemies a much larger window to kill the unit to prevent it from leveling up.
* The majority of units don't have multiple advancement options, so delaying their advancement as well isn't helpful.
Additionally, leaving this in for 1.16 would mean that it would not be possible to remove it in 1.17 or later without breaking any replays that did use it.
std::distance(A, B) requires A and B to be random access iterators if
the expression B < A is even expected to make any sense. std::map
produces bidirectional iterators instead, so this code was causing UB
when [request_campaign] was used with a From version newer than the To
version (a.k.a. downgrading an add-on).
This fix also allows us to skip a lot of nonsense in the event that From
== To.
As the disengaged state is part-way between the "partial" and "moved" states,
the orb has parts in each color. On the minimap these units are shown in the
partial color (which is also the color that would be used before this change).
This will match the mounted Quenoth units' "disengage" skill, when they
can still move but can't attack. It should also trigger for some UMC abilities
that get extra moves after a character attacks.
During testing, I found that TSG allows some of the bandits to attack on the
first turn of the bandit branch. There's no gameplay change there, but the orbs
make it much clearer that some units can still attack.
I think there are already too many preferences for orbs, so reused the existing
settings for the colors. A new "show disengaged orb" preference is added, which
when disabled shows the old partial orb instead.
Update the orb and ellipse sections of doc/manual/.
Notes about how I created the new orb image:
* create a color range to_ellipse_red with rgb=FF0000,FF0000,000000,FF0000
* wesnoth --render-image 'misc/orb.png~RC(magenta>to_ellipse_red)' images/misc/orb-ellipse-red.png
* open the orb.png and orb-ellipse-red.png images as layers in Gimp, add a layer mask to both of them
* use the layer mask to get each pixel from exactly one of the layers
The change to static_cast for the definition of LUAL_BUFFERSIZE replaces the fix previously used (d0100758f855ec0d8f30dff41e8a8b6ff2d45fda) for Lua 5.3. 5.4 removes the static alternative for LUAL_BUFFERSIZE. A better solution would probably be to disable the old-style-cast warning for luaconf.h, but I can't figure out how to do that so using static_cast is the easiest solution. Do note that change will have to be applied each Lua update like the aforementioned commit.