The above issue was caused by the fact that image::flush_cache() wasn't called after
reload_changed_game_config() when the addons manager was exited. Using F5 at the tilescreen
caused the image to appear since that callback *did* include image::flush_cache();
reload_changed_game_config() was called in 5 places, 2 of which were followed by flush_cache.
I figured it's safest to just include the latter in the former, since the other three usecases
(multiplayer installed addons before joining a game, a new core was selected, and the addons
manager was exited) all seem like places where flushing the image cache would be appropriate.
The proliferation of game_display::get_singleton() was due to 786233d5c95913889d6f061f3749f80a5efd61c1
where I replaced resources::screen (itself a game_display* pointer) with the game_display singleton.
Using the game_display pointer has already caused one case of UB (issue #2447), so I figured it best to
call the base class pointer in all cases where a game_display-specific function or override was not used.
Was UB when drawing the minimap in the editor since the display object was an editor_disply
not game_display. No reason to access game_display anyway, since is_blindfolded() is defined
in display.
Cropped up in 786233d5c95913889d6f061f3749f80a5efd61c1.
This was caused by the same bug I added a workaround for in a02c568b785f9d30373aef806507da60000ff1c9.
Essentially, the differing size of player_teams_ and team_names_ could cause an index mismatch if
some sides had allow_player=no and debug mode wasn't on. I didn't notice this before since I always
work with debug mode on.
I've reworked the connect_engine handling of team data. Now, the team_name, user_team_name, and an
is-player-allowed-to-be-on-this-team flag are all handled by a data pod. I've completely removed the
player_teams stuff and instead generate an applicable list of teams for the team menu_button to
display at runtime.
To get around the index disparity issue, I save any displayed team option's index (relative to
connect_engine::team_data) in that option's config (the one then passed to the menu_button). This
allows me to get an appropriate value to pass to connect_engine::set_team without any fancy find-
and-adjust calculations.
See this thread, along with a few linked within:
https://forums.wesnoth.org/viewtopic.php?f=12&t=47704
The purpose of this is both to:
a) Make the unit names more descriptive, so new players especially will have an easier time learning them and knowing what they do.
b) Make them eligible for translation, like the units of other factions are.
This commit only renames the files, along with the faction/AoH faction and wmllint.