diff options
author | worktycho <work.tycho@gmail.com> | 2015-06-21 13:08:34 +0200 |
---|---|---|
committer | worktycho <work.tycho@gmail.com> | 2015-06-21 13:08:34 +0200 |
commit | 0096327c4ff8f69755a0ca438fcd08171e68c5d7 (patch) | |
tree | 7400062806953c5fc1d8abd3ab9eaa74800d4872 /src/BiomeDef.h | |
parent | Merge pull request #2255 from cuberite/LoadablePieces (diff) | |
parent | Added basic support for loading village prefabs from files. (diff) | |
download | cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.tar cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.tar.gz cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.tar.bz2 cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.tar.lz cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.tar.xz cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.tar.zst cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.zip |
Diffstat (limited to 'src/BiomeDef.h')
-rw-r--r-- | src/BiomeDef.h | 22 |
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); |