aboutsummaryrefslogtreecommitdiff
path: root/src/biome.cpp
diff options
context:
space:
mode:
authorWeblate <42@minetest.ru>2013-06-21 10:24:16 +0200
committerWeblate <42@minetest.ru>2013-06-21 10:24:16 +0200
commit3af90db5b51da0c37f77fe6410e488c8c27acd67 (patch)
tree12edd6f0661b464e36863517241b5ec0b87b5ec1 /src/biome.cpp
parent58f3cd3eb598a7cf79983fe9e48c738591c6e004 (diff)
parentb1ebd9f79c63cf78b0e0fb2ea6f52d82cdfb95b6 (diff)
downloadminetest-3af90db5b51da0c37f77fe6410e488c8c27acd67.tar.gz
minetest-3af90db5b51da0c37f77fe6410e488c8c27acd67.tar.bz2
minetest-3af90db5b51da0c37f77fe6410e488c8c27acd67.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/biome.cpp')
-rw-r--r--src/biome.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/biome.cpp b/src/biome.cpp
index b50c562a0..bc84d4bc1 100644
--- a/src/biome.cpp
+++ b/src/biome.cpp
@@ -168,3 +168,13 @@ Biome *BiomeDefManager::getBiome(float heat, float humidity, s16 y) {
return biome_closest ? biome_closest : biomes[0];
}
+
+
+u8 BiomeDefManager::getBiomeIdByName(const char *name) {
+ for (size_t i = 0; i != biomes.size(); i++) {
+ if (!strcasecmp(name, biomes[i]->name.c_str()))
+ return i;
+ }
+
+ return 0;
+}