forked from townforge/townforge
game: print in-game years and real days in research screen
This commit is contained in:
parent
a3ce8f4290
commit
484f1dd6c5
@ -91,7 +91,11 @@ UIResearchDialog::DiscoveryWidget::DiscoveryWidget(UIResearchDialog::DiscoveryIt
|
||||
descWidget->SetTextColor(color);
|
||||
TBTextField *patentTimeWidget = GetWidgetByIDAndType<TBTextField>(TBIDC("patent-time"));
|
||||
if (d.patent_time > 0)
|
||||
patentTimeWidget->SetText(("Patent: " + std::to_string(d.patent_time / (86400 / DIFFICULTY_TARGET_V2)) + " days").c_str());
|
||||
{
|
||||
const std::string years = std::to_string(d.patent_time / 10080);
|
||||
const std::string days = std::to_string(d.patent_time / (86400 / DIFFICULTY_TARGET_V2));
|
||||
patentTimeWidget->SetText(("Patent: " + years + " in-game years (" + days + " days)").c_str());
|
||||
}
|
||||
else
|
||||
patentTimeWidget->SetText("No patent");
|
||||
patentTimeWidget->SetTextColor(color);
|
||||
|
Loading…
Reference in New Issue
Block a user