diff options
author | kwolekr <kwolekr@minetest.net> | 2013-06-15 22:23:06 -0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2013-06-17 03:21:36 -0400 |
commit | 0a8519a26fc7c10b4e7415746e9045caa3ae978f (patch) | |
tree | 27c3bb64a46f3dfeaa0dbc5443b0efe69e37cf37 /src/biome.cpp | |
parent | eccd1fdbeddce60717f8fcbecded5b36387e3b38 (diff) | |
download | minetest-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.cpp | 10 |
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; +} |