Skip to content

Commit

Permalink
Status table: In replays with "View: Full Map", show all sides' gold …
Browse files Browse the repository at this point in the history
…status

Note that all sides' gold status is already shown whenever debug mode is
active.

Fixes part of #4134

(cherry picked from commit 3767097)
  • Loading branch information
jostephd committed Oct 10, 2019
1 parent 611dfd1 commit 515d7fe
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/gui/dialogs/game_stats.cpp
Expand Up @@ -97,11 +97,12 @@ void game_stats::pre_show(window& window)
std::string leader_name;
std::string leader_image;

const bool see_all = game_config::debug || (resources::controller && resources::controller->get_display().show_everything());
if(leader) {
const bool visible = leader->is_visible_to_team(leader->get_location(), viewing_team_, board_, false);
const bool visible = leader->is_visible_to_team(leader->get_location(), viewing_team_, board_, see_all);

// Add leader image. If it's fogged/[hides], show only a random leader image.
if(visible || known || game_config::debug) {
if(visible || known) {
leader_image = leader->absolute_image() + leader->image_mods();
leader_name = leader->name();
} else {
Expand Down Expand Up @@ -133,9 +134,9 @@ void game_stats::pre_show(window& window)
row_data_stats.emplace("team_name", column_stats);

// Only fill in the rest of the info if the side is known...
if(known || game_config::debug) {
if(known || see_all) {
std::string gold_str;
if(game_config::debug || !enemy || !viewing_team_.uses_fog()) {
if(see_all || !enemy || !viewing_team_.uses_fog()) {
gold_str = utils::half_signed_value(team.gold());
}

Expand Down

0 comments on commit 515d7fe

Please sign in to comment.