Skip to content

Commit 4627641

Browse files
committedMar 16, 2017
Get biome list: Downgrade missing biome message to infostream
It is harmless for a biome listed in an ore or decoration registration to be missing. Now that we are registering certain biomes or not based on options (such as floatland biomes), the biome lists in ore and decoration registrations trigger these error messages, avoiding these error messages would need a large amount of duplication of ore and decoration registrations.
1 parent 14aa990 commit 4627641

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎src/script/lua_api/l_mapgen.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ size_t get_biome_list(lua_State *L, int index,
419419
if (is_single) {
420420
Biome *biome = get_or_load_biome(L, index, biomemgr);
421421
if (!biome) {
422-
errorstream << "get_biome_list: failed to get biome '"
422+
infostream << "get_biome_list: failed to get biome '"
423423
<< (lua_isstring(L, index) ? lua_tostring(L, index) : "")
424424
<< "'." << std::endl;
425425
return 1;
@@ -438,7 +438,7 @@ size_t get_biome_list(lua_State *L, int index,
438438
Biome *biome = get_or_load_biome(L, -1, biomemgr);
439439
if (!biome) {
440440
fail_count++;
441-
errorstream << "get_biome_list: failed to get biome '"
441+
infostream << "get_biome_list: failed to get biome '"
442442
<< (lua_isstring(L, -1) ? lua_tostring(L, -1) : "")
443443
<< "'" << std::endl;
444444
continue;
@@ -927,7 +927,7 @@ int ModApiMapgen::l_register_decoration(lua_State *L)
927927
//// Get biomes associated with this decoration (if any)
928928
lua_getfield(L, index, "biomes");
929929
if (get_biome_list(L, -1, biomemgr, &deco->biomes))
930-
errorstream << "register_decoration: couldn't get all biomes " << std::endl;
930+
infostream << "register_decoration: couldn't get all biomes " << std::endl;
931931
lua_pop(L, 1);
932932

933933
//// Get node name(s) to 'spawn by'
@@ -1092,7 +1092,7 @@ int ModApiMapgen::l_register_ore(lua_State *L)
10921092
//// Get biomes associated with this decoration (if any)
10931093
lua_getfield(L, index, "biomes");
10941094
if (get_biome_list(L, -1, bmgr, &ore->biomes))
1095-
errorstream << "register_ore: couldn't get all biomes " << std::endl;
1095+
infostream << "register_ore: couldn't get all biomes " << std::endl;
10961096
lua_pop(L, 1);
10971097

10981098
//// Get noise parameters if needed

0 commit comments

Comments
 (0)
Please sign in to comment.