Don't show time of day under shroud

In the test scenario mouseover (4,19) to see the difference.
This commit is contained in:
josteph 2018-10-20 01:14:33 +00:00
parent 0830d776ec
commit 23bdbae161
2 changed files with 5 additions and 2 deletions

View file

@ -10,6 +10,8 @@
Japanese, Polish, Scottish Gaelic, Slovak, Spanish, Ukrainian.
### Lua API
* Allow specifying custom flags (in particular teleport) when using a custom cost function in wesnoth.find_path
### User Interface
* Don't show in the sidebar the time of day schedule of a shrouded hex. (issue #3638)
### Packaging
* OpenMP support has been removed. It is no longer an optional build-time dependency.
### Units

View file

@ -1077,9 +1077,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>";