We no longer use the GUI2 draw events. We should implement the appropriate interface provided by top_level_drawable instead. DRAW is still a valid event for now, but would probably be removed in the future.
Added code to convert all `[side]type=` to `[side][leader]` when the `[scenario]` is read, and the rest of the engine code to only work with [leader], this should fix all possible problems with `[leader]` and also simplify the code a bit
Fixes#7985Fixes#3742
This was unique to this class, since the base class only implemented the const version. It was only needed for the whiteboard, and on closer inspection none of of the mutable references therein actually needed to be mutable. Marked them all const and removed the offending getter from game_board.
Note that the non-const overload had the same functionality as the const overload in the base class, only implemented via `find_visible_unit`.
Little hacky, since this supports the case of manually hiding the grids instead of simply not populating them (see #9499), but it prevents needing to change widget::get_best_size while I figure out a more comprehensive solution.
previously the leader= attribute in [side] could be used to
make the engine choose a faction by its leader, similar to how
[side]faction_from_recruit worked.
However this was not documented in the wiki, and the name clash
with the [side][leader] subtag could also cause problems
and is also a litte confusing.
So it was decided to remove it. an alternative approach to fix the
name clash would be to rename it, but i can't think of
real usecases of this feature currently.
Instead, return the number of rows shown from filter_rows_by. We might re-add any_rows_shown in the future, but for now this covers the intended usecase.
This matches the behavior on the client where the events that
happen after end_turn (the "turn end" wml events) happen during
the last sides turn not the next sides turn. In particular this
fixes#2563. It also fixes#3899 because the new logic
automaticially skips empty sides already in init_side and not on
end_turn.
It also changes how description is updated, since carrying that
return value arround specifying whether it was updated was becoming
annoying.
With a few code improvements from soliton.
We now use a modified default carryover calculation,
the main advantage is it now uses the normal carryover
message on endlevel, and shows how it is calculated.
The idea is to make it easier for umc devs to implement
their own carryover / early finish bonus mechanics. Maybe
we can also make use of it in Worls Conquest.