Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidebar time of day help shows incorrect schedule #4072

Open
nemaara opened this issue May 11, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@nemaara
Copy link
Contributor

commented May 11, 2019

In a situation where a scenario has two time-of-day schedules (e.g. using a time area), if you click on the big 1/6 next to the time of day image for the second schedule (i.e. not the scenario's default one, but the time area), it brings up the help menu listing the plain scenario default time.

Example:

image
image

Both of these give this schedule, despite the second one being an illuminated hex.

image

(Also I guess the listed schedules are in the wrong order? In this scenario, the ToD should start at second watch, not dawn).

TSG-The Tides of War.gz

@nemaara nemaara added Bug UI Help labels May 11, 2019

@jostephd

This comment has been minimized.

Copy link
Member

commented May 11, 2019

(Also I guess the listed schedules are in the wrong order? In this scenario, the ToD should start at second watch, not dawn).

This part is because the scenario uses current_time=5:

#define DEFAULT_SCHEDULE_SECOND_WATCH
{DEFAULT_SCHEDULE}
current_time=5
#enddef

#define DEFAULT_SCHEDULE
{DAWN}
{MORNING}
{AFTERNOON}
{DUSK}
{FIRST_WATCH}
{SECOND_WATCH}
#enddef

If the scenario had specified {SECOND_WATCH} first, it'd be first in the help screen.

@jostephd

This comment has been minimized.

Copy link
Member

commented May 11, 2019

if you click on the big 1/6 next to the time of day image for the second schedule

That help topic is referenced here:

return text_report(text.str(), tooltip.str(), "..schedule");

And defined here:

const std::vector<time_of_day>& times = resources::tod_manager->times();
for (const time_of_day& time : times)
{
const std::string id = "time_of_day_" + time.id;
const std::string image = "<img>src='" + time.image + "'</img>";
std::stringstream text;
toplevel << make_link(time.name.str(), id) << jump_to(160) <<
image << jump(30) << time.lawful_bonus << '\n';
text << image << '\n' <<
time.description.str() << '\n' <<
lawful_bonus_label << ' ' << time.lawful_bonus << '\n' <<
'\n' << make_link(_("Schedule"), "..schedule");
topics.emplace_back(time.name.str(), id, text.str());
}
topics.emplace_back(tod_schedule_heading, "..schedule", toplevel.str());

Maybe we can make the help show both the default time schedule of the scenario and the time schedules of any time area that intersects with the unshrouded parts of the map?

@nemaara

This comment has been minimized.

Copy link
Contributor Author

commented May 11, 2019

Maybe we can make the help show both the default time schedule of the scenario and the time schedules of any time area that intersects with the unshrouded parts of the map?

It still might be better to have it only be the selected time schedule, because in some addon campaigns (like mine, Genesis), the presence of several unshrouded ToD schedules might make it really messy. Then again, if there's a good way to fit 3-4 in the help menu, it could still work.

Your comment about the schedule order makes sense, thanks for clarifying.

@jostephd

This comment has been minimized.

Copy link
Member

commented May 11, 2019

It still might be better to have it only be the selected time schedule, because in some addon campaigns (like mine, Genesis), the presence of several unshrouded ToD schedules might make it really messy. Then again, if there's a good way to fit 3-4 in the help menu, it could still work.

We could have subpages, like the variations of Walking Corpse. I suppose we also need some sort of titles for the time areas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.