mirror of https://github.com/OpenTTD/OpenTTD
Change: Ignore min/max years for manual house placer. (#12687)
parent
56ea002283
commit
d1b7619822
|
@ -2837,8 +2837,6 @@ CommandCost CmdPlaceHouse(DoCommandFlag flags, TileIndex tile, HouseID house)
|
||||||
const HouseSpec *hs = HouseSpec::Get(house);
|
const HouseSpec *hs = HouseSpec::Get(house);
|
||||||
if (!hs->enabled) return CMD_ERROR;
|
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);
|
Town *t = ClosestTownFromTile(tile, UINT_MAX);
|
||||||
|
|
||||||
/* cannot build on these slopes... */
|
/* cannot build on these slopes... */
|
||||||
|
|
|
@ -1490,9 +1490,7 @@ public:
|
||||||
bool IsTypeAvailable(int, int id) const override
|
bool IsTypeAvailable(int, int id) const override
|
||||||
{
|
{
|
||||||
const HouseSpec *hs = HouseSpec::Get(id);
|
const HouseSpec *hs = HouseSpec::Get(id);
|
||||||
if (!hs->enabled) return false;
|
return hs->enabled;
|
||||||
if (TimerGameCalendar::year < hs->min_year || TimerGameCalendar::year > hs->max_year) return false;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawType(int x, int y, int, int id) const override
|
void DrawType(int x, int y, int, int id) const override
|
||||||
|
|
Loading…
Reference in New Issue