Skip to content

Commit

Permalink
Don't show time of day under shroud
Browse files Browse the repository at this point in the history
In the test scenario mouseover (4,19) to see the difference.
  • Loading branch information
jostephd committed Oct 21, 2018
1 parent 63c972f commit 5e6865a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.md
Expand Up @@ -19,6 +19,7 @@
* When a recruited unit is fogged, scroll to the recruiting unit and play recruit
animation. (issue #3577)
* Fix line breaks in first statistics line in unit type pages in the help. (issue #3256)
* Don't show in the sidebar the time of day schedule of a shrouded hex. (issue #3638)

## Version 1.14.5
### AI
Expand Down
5 changes: 3 additions & 2 deletions src/reports.cpp
Expand Up @@ -1082,9 +1082,10 @@ REPORT_GENERATOR(tod_stats, rc)

const map_location& hex = mouseover_hex.valid() ? mouseover_hex : selected_hex;

const std::vector<time_of_day>& schedule = rc.tod().times(hex);
const map_location& tod_schedule_hex = display::get_singleton()->shrouded(hex) ? map_location::null_location() : hex;
const std::vector<time_of_day>& schedule = rc.tod().times(tod_schedule_hex);

int current = rc.tod().get_current_time(hex);
int current = rc.tod().get_current_time(tod_schedule_hex);
int i = 0;
for (const time_of_day& tod : schedule) {
if (i == current) tooltip << "<big><b>";
Expand Down

0 comments on commit 5e6865a

Please sign in to comment.