Feature: Configurable subsidy duration

This commit is contained in:
Tyler Trahan
2021-04-22 13:54:32 -04:00
committed by Michael Lutz
parent c2db408d5d
commit d09210e1c6
11 changed files with 70 additions and 28 deletions

View File

@@ -161,7 +161,7 @@ struct SubsidyListWindow : Window {
if (!s->IsAwarded()) {
if (IsInsideMM(pos, 0, cap)) {
/* Displays the two offered towns */
SetupSubsidyDecodeParam(s, true);
SetupSubsidyDecodeParam(s, SubsidyDecodeParamType::Gui);
SetDParam(7, _date - ymd.day + s->remaining * 32);
DrawString(x, right, y + pos * FONT_HEIGHT_NORMAL, STR_SUBSIDIES_OFFERED_FROM_TO);
}
@@ -184,7 +184,7 @@ struct SubsidyListWindow : Window {
for (const Subsidy *s : Subsidy::Iterate()) {
if (s->IsAwarded()) {
if (IsInsideMM(pos, 0, cap)) {
SetupSubsidyDecodeParam(s, true);
SetupSubsidyDecodeParam(s, SubsidyDecodeParamType::Gui);
SetDParam(7, s->awarded);
SetDParam(8, _date - ymd.day + s->remaining * 32);