aboutsummaryrefslogtreecommitdiff
path: root/src/biome.cpp
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2013-06-15 22:23:06 -0400
committerkwolekr <kwolekr@minetest.net>2013-06-17 03:21:36 -0400
commit0a8519a26fc7c10b4e7415746e9045caa3ae978f (patch)
tree27c3bb64a46f3dfeaa0dbc5443b0efe69e37cf37 /src/biome.cpp
parenteccd1fdbeddce60717f8fcbecded5b36387e3b38 (diff)
downloadminetest-0a8519a26fc7c10b4e7415746e9045caa3ae978f.tar.gz
minetest-0a8519a26fc7c10b4e7415746e9045caa3ae978f.tar.bz2
minetest-0a8519a26fc7c10b4e7415746e9045caa3ae978f.zip
Add initial Decoration support, many misc. improvements & modifications
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;
+}