1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-24 12:44:10 +01:00

Feature: Prevent towns from upgrading individually-placed houses (#13270)

This commit is contained in:
Tyler Trahan
2025-02-09 15:37:06 -05:00
committed by GitHub
parent 1ed685b5c1
commit 521b860394
13 changed files with 130 additions and 21 deletions

View File

@@ -168,6 +168,7 @@ public:
td.road_speed = 0;
td.tramtype = STR_NULL;
td.tram_speed = 0;
td.town_can_upgrade = std::nullopt;
td.grf = nullptr;
@@ -300,6 +301,11 @@ public:
this->landinfo_data.push_back(GetString(STR_LANG_AREA_INFORMATION_TRAM_SPEED_LIMIT));
}
/* Tile protection status */
if (td.town_can_upgrade.has_value()) {
this->landinfo_data.push_back(GetString(td.town_can_upgrade.value() ? STR_LAND_AREA_INFORMATION_TOWN_CAN_UPGRADE : STR_LAND_AREA_INFORMATION_TOWN_CANNOT_UPGRADE));
}
/* NewGRF name */
if (td.grf != nullptr) {
SetDParamStr(0, td.grf);