(svn r9823) -Feature: Add support for house property 1F - minimum life span.

This commit is contained in:
maedhros
2007-05-10 16:03:06 +00:00
parent 9643fd7638
commit 3cc31aae86
4 changed files with 9 additions and 3 deletions

View File

@@ -424,6 +424,7 @@ static void TileLoop_Town(TileIndex tile)
if (hs->building_flags & BUILDING_HAS_1_TILE &&
HASBIT(t->flags12, TOWN_IS_FUNDED) &&
CanDeleteHouse(tile) &&
max(_cur_year - GetHouseConstructionYear(tile), 0) >= hs->minimum_life &&
--t->time_until_rebuild == 0) {
t->time_until_rebuild = GB(r, 16, 8) + 192;