Feature: Configurable subsidy duration

(cherry picked from commit d09210e1c6)
This commit is contained in:
Tyler Trahan
2021-04-22 13:54:32 -04:00
committed by Jonathan G Rennison
parent 4042480806
commit fb0549ea59
11 changed files with 71 additions and 29 deletions

View File

@@ -158,7 +158,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 - _cur_date_ymd.day + s->remaining * 32);
DrawString(x, right, y + pos * FONT_HEIGHT_NORMAL, STR_SUBSIDIES_OFFERED_FROM_TO);
}
@@ -181,7 +181,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 - _cur_date_ymd.day + s->remaining * 32);