summaryrefslogtreecommitdiffstats
path: root/src/BiomeDef.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/BiomeDef.h')
-rw-r--r--src/BiomeDef.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/BiomeDef.h b/src/BiomeDef.h
index cda12556a..32d3a5cfd 100644
--- a/src/BiomeDef.h
+++ b/src/BiomeDef.h
@@ -104,6 +104,28 @@ enum EMCSBiome
biMaxVariantBiome = biNumVariantBiomes - 1, // The maximum biome value
} ;
+// tolua_end
+
+
+
+
+
+/** Hash for EMCSBiome, so that it can be used in std::unordered_map etc. */
+struct BiomeHasher
+{
+public:
+ std::size_t operator() (const EMCSBiome a_Biome) const
+ {
+ return static_cast<std::size_t>(a_Biome);
+ }
+};
+
+
+
+
+
+// tolua_begin
+
/** Translates a biome string to biome enum. Takes either a number or a biome alias (built-in). Returns biInvalidBiome on failure. */
extern EMCSBiome StringToBiome(const AString & a_BiomeString);