summaryrefslogtreecommitdiffstats
path: root/src/BiomeDef.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-10-26 19:58:16 +0100
committerMattes D <github@xoft.cz>2014-10-26 19:58:16 +0100
commit7e1d603080146047bade80ee70982dbe569cdf30 (patch)
tree603fdb3ba672d943450f197fea869fb9e5590f34 /src/BiomeDef.h
parentAdded IsBiomeVeryCold() and IsBiomeCold() functions. (diff)
downloadcuberite-7e1d603080146047bade80ee70982dbe569cdf30.tar
cuberite-7e1d603080146047bade80ee70982dbe569cdf30.tar.gz
cuberite-7e1d603080146047bade80ee70982dbe569cdf30.tar.bz2
cuberite-7e1d603080146047bade80ee70982dbe569cdf30.tar.lz
cuberite-7e1d603080146047bade80ee70982dbe569cdf30.tar.xz
cuberite-7e1d603080146047bade80ee70982dbe569cdf30.tar.zst
cuberite-7e1d603080146047bade80ee70982dbe569cdf30.zip
Diffstat (limited to '')
-rw-r--r--src/BiomeDef.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/BiomeDef.h b/src/BiomeDef.h
index dfab50663..84751cfd7 100644
--- a/src/BiomeDef.h
+++ b/src/BiomeDef.h
@@ -113,6 +113,12 @@ extern AString BiomeToString(int a_Biome);
/** Returns true if the biome has no downfall - deserts and savannas */
extern bool IsBiomeNoDownfall(EMCSBiome a_Biome);
+/** Returns true if the biome is an ocean biome. */
+inline bool IsBiomeOcean(int a_Biome)
+{
+ return ((a_Biome == biOcean) || (a_Biome == biDeepOcean));
+}
+
/** Returns true if the biome is very cold
(has snow on ground everywhere, turns top water to ice, has snowfall instead of rain everywhere).
Doesn't report mildly cold biomes (where it snows above certain elevation), use IsBiomeCold() for those. */