1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Allow more than 255 biomes, document new maximum (#9855)

Change biomemap data type from u8 to u16.
New technical (not practical) maximum is 65535 biomes.
This commit is contained in:
Paramat 2020-05-20 22:16:14 +01:00 committed by GitHub
parent c47a680db7
commit 42fcfb75e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 55 additions and 45 deletions

View file

@ -97,7 +97,7 @@ Biome *get_or_load_biome(lua_State *L, int index,
BiomeManager *biomemgr);
Biome *read_biome_def(lua_State *L, int index, const NodeDefManager *ndef);
size_t get_biome_list(lua_State *L, int index,
BiomeManager *biomemgr, std::unordered_set<u8> *biome_id_list);
BiomeManager *biomemgr, std::unordered_set<biome_t> *biome_id_list);
Schematic *get_or_load_schematic(lua_State *L, int index,
SchematicManager *schemmgr, StringMap *replace_names);
@ -425,7 +425,7 @@ Biome *read_biome_def(lua_State *L, int index, const NodeDefManager *ndef)
size_t get_biome_list(lua_State *L, int index,
BiomeManager *biomemgr, std::unordered_set<u8> *biome_id_list)
BiomeManager *biomemgr, std::unordered_set<biome_t> *biome_id_list)
{
if (index < 0)
index = lua_gettop(L) + 1 + index;