From a394be2780d922594afda9090ff90388df00c00b Mon Sep 17 00:00:00 2001 From: Henry Wilson Date: Fri, 21 Oct 2022 08:00:00 +0100 Subject: [PATCH 1/2] Feature: Airport construction GUI displays infrastructure cost --- src/airport_gui.cpp | 8 ++++++++ src/lang/english.txt | 1 + 2 files changed, 9 insertions(+) diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index 318844ac33..f8ef410d85 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -8,6 +8,7 @@ /** @file airport_gui.cpp The GUI for airports. */ #include "stdafx.h" +#include "economy_func.h" #include "window_gui.h" #include "station_gui.h" #include "terraform_gui.h" @@ -439,6 +440,13 @@ public: top += FONT_HEIGHT_NORMAL + ScaleGUITrad(WD_PAR_VSEP_NORMAL); } + if (_settings_game.economy.infrastructure_maintenance) { + Money monthly = _price[PR_INFRASTRUCTURE_AIRPORT] * as->maintenance_cost >> 3; + SetDParam(0, monthly * 12); + DrawString(r.left, r.right, top, STR_STATION_BUILD_INFRASTRUCTURE_COST); + top += FONT_HEIGHT_NORMAL + ScaleGUITrad(WD_PAR_VSEP_NORMAL); + } + /* strings such as 'Size' and 'Coverage Area' */ top = DrawStationCoverageAreaText(r.left, r.right, top, SCT_ALL, rad, false) + ScaleGUITrad(WD_PAR_VSEP_NORMAL); top = DrawStationCoverageAreaText(r.left, r.right, top, SCT_ALL, rad, true) + ScaleGUITrad(WD_PAR_VSEP_NORMAL); diff --git a/src/lang/english.txt b/src/lang/english.txt index 56a1c9df63..52d1b850cc 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -2630,6 +2630,7 @@ STR_STATION_BUILD_COVERAGE_AREA_OFF_TOOLTIP :{BLACK}Don't hi STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP :{BLACK}Highlight coverage area of proposed site STR_STATION_BUILD_ACCEPTS_CARGO :{BLACK}Accepts: {GOLD}{CARGO_LIST} STR_STATION_BUILD_SUPPLIES_CARGO :{BLACK}Supplies: {GOLD}{CARGO_LIST} +STR_STATION_BUILD_INFRASTRUCTURE_COST :{BLACK}Maintainance cost: {GOLD}{CURRENCY_SHORT}/yr # Join station window STR_JOIN_STATION_CAPTION :{WHITE}Join station From 4daad7f34840bcec2a568eb54149286c7f68c892 Mon Sep 17 00:00:00 2001 From: Tyler Trahan Date: Fri, 21 Oct 2022 07:44:41 -0600 Subject: [PATCH 2/2] Change: Don't make wide rivers using original landscape generator --- src/landscape.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/landscape.cpp b/src/landscape.cpp index 3c7ea3a1b9..910f647c46 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -1273,8 +1273,10 @@ static void River_FoundEndNode(AyStar *aystar, OpenListNode *current) } } - /* If the river is a main river, go back along the path to widen it. */ - if (data->main_river) { + /* If the river is a main river, go back along the path to widen it. + * Don't make wide rivers if we're using the original landscape generator. + */ + if (_settings_game.game_creation.land_generator != LG_ORIGINAL && data->main_river) { const uint long_river_length = _settings_game.game_creation.min_river_length * 4; uint current_river_length; uint radius;