Nameless abilities are relatively common outside of mainline in
particular as they are used for implementation details of more complex
abilities.
Fixes#3060.
In certain situations, the 'directly_in_event' list was allowed to become empty and cause a crahs because the code was unable to handle amendment tags.
This adds the additional attributes under the multiplayer information sent to wesnothd:
* mp_scenario_addon_id
* mp_scenario_addon_version (host's version)
* mp_era_addon_id
* mp_era_addon_version (host's version)
* active_mod_addon_ids
* active_mod_versions (host's versions)
Instead of a massive wall of chained ORs, have two lists with qualifying
switches, one for those that don't take arguments and another for those
that do so. The latter are expected to have the argument past the '='
character (substituting the unwieldy hardcoded compare() method calls
with substr() comparisons) or in a subsequent command line argument that
we can ignore at this point.
Also added --validate-addon, -h and -v to the list of applicable
switches.
There's a lambda expression that needs to be redone on every loop but
who cares, this is only the command line argument scan phase anyway.
This makes all sections use a formatter class to deal with the issue of
keeping the first column's width consistent within each section (but not
across all sections), so that we don't run into inconveniences later in
the future if any section's entry labels change. It also allows us to
change the list formatting entirely in a single place rather than
multiple places if we ever decide to do so.
This also replaces CVideo::video_settings_report() with a similar but
slightly more detailed report using the new bi list formatter class to
make it look consistent with the other sections, implemented in the bi
module instead of CVideo.
These are currently used directly in CVideo::video_settings_report(),
which we want to remove from this class and implement externally.
This commit also reworks get_dpi_scale_factor() to be implemented in
terms of get_dpi().
CVideo::get_singleton() unconditionally dereferences the thing, which is
UB if it happens to be a null pointer. We need to query whether the
singleton exists in the first place so we can't use that strategy.
this was not documented also it didn't really work, in particular, those added color were not persistent over save-load cycles. Lastly it made little sense to support [color_range] it there.