From d1b7619822d505e1f5efe45ec6b1dcd820dcdcab Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Wed, 15 May 2024 23:17:58 +0100 Subject: [PATCH] Change: Ignore min/max years for manual house placer. (#12687) --- src/town_cmd.cpp | 2 -- src/town_gui.cpp | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 192b369ca7..de252cdb41 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -2837,8 +2837,6 @@ CommandCost CmdPlaceHouse(DoCommandFlag flags, TileIndex tile, HouseID house) const HouseSpec *hs = HouseSpec::Get(house); if (!hs->enabled) return CMD_ERROR; - if (TimerGameCalendar::year < hs->min_year || TimerGameCalendar::year > hs->max_year) return CMD_ERROR; - Town *t = ClosestTownFromTile(tile, UINT_MAX); /* cannot build on these slopes... */ diff --git a/src/town_gui.cpp b/src/town_gui.cpp index 0b8b39e5c6..483ff890c9 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -1490,9 +1490,7 @@ public: bool IsTypeAvailable(int, int id) const override { const HouseSpec *hs = HouseSpec::Get(id); - if (!hs->enabled) return false; - if (TimerGameCalendar::year < hs->min_year || TimerGameCalendar::year > hs->max_year) return false; - return true; + return hs->enabled; } void DrawType(int x, int y, int, int id) const override