src/town_cmd.cpp
branchnoai
changeset 9517 be1775555bbd
parent 9505 9711235f5693
child 9574 698395509d12
equal deleted inserted replaced
9516:defc90b7898a 9517:be1775555bbd
  1229 	// Get the town zone type
  1229 	// Get the town zone type
  1230 	{
  1230 	{
  1231 		uint rad = GetTownRadiusGroup(t, tile);
  1231 		uint rad = GetTownRadiusGroup(t, tile);
  1232 
  1232 
  1233 		int land = _opt.landscape;
  1233 		int land = _opt.landscape;
  1234 		if (land == LT_HILLY && z >= _opt.snow_line) land = -1;
  1234 		if (land == LT_ARCTIC && z >= _opt.snow_line) land = -1;
  1235 
  1235 
  1236 		bitmask = (1 << rad) + (1 << (land + 12));
  1236 		bitmask = (1 << rad) + (1 << (land + 12));
  1237 	}
  1237 	}
  1238 
  1238 
  1239 	// bits 0-4 are used
  1239 	// bits 0-4 are used
  1696 			210, 150, 110, 80, 50
  1696 			210, 150, 110, 80, 50
  1697 		};
  1697 		};
  1698 		m = _grow_count_values[min(n, 5) - 1];
  1698 		m = _grow_count_values[min(n, 5) - 1];
  1699 	}
  1699 	}
  1700 
  1700 
  1701 	if (_opt.landscape == LT_HILLY) {
  1701 	if (_opt.landscape == LT_ARCTIC) {
  1702 		if (TilePixelHeight(t->xy) >= GetSnowLine() && t->act_food == 0 && t->population > 90)
  1702 		if (TilePixelHeight(t->xy) >= GetSnowLine() && t->act_food == 0 && t->population > 90)
  1703 			return;
  1703 			return;
  1704 	} else if (_opt.landscape == LT_DESERT) {
  1704 	} else if (_opt.landscape == LT_TROPIC) {
  1705 		if (GetTropicZone(t->xy) == TROPICZONE_DESERT && (t->act_food==0 || t->act_water==0) && t->population > 60)
  1705 		if (GetTropicZone(t->xy) == TROPICZONE_DESERT && (t->act_food==0 || t->act_water==0) && t->population > 60)
  1706 			return;
  1706 			return;
  1707 	}
  1707 	}
  1708 
  1708 
  1709 	t->growth_rate = m / (t->num_houses / 50 + 1);
  1709 	t->growth_rate = m / (t->num_houses / 50 + 1);