1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

ObjDefManager, Mapgen SAPI: Huge refactoring

- General code cleanup
 - Unified object creation and loading
 - Specifying objects in APIs is now orthogonal (i.e. anything can take an ID,
   name string, or the raw table definition (and automatically registers if present
This commit is contained in:
kwolekr 2015-03-31 23:27:19 -04:00
parent d1d5618bb8
commit 337e79c656
8 changed files with 319 additions and 171 deletions

View file

@ -26,11 +26,11 @@ struct NoiseParams;
enum BiomeType
{
BIOME_TYPE_NORMAL,
BIOME_TYPE_LIQUID,
BIOME_TYPE_NETHER,
BIOME_TYPE_AETHER,
BIOME_TYPE_FLAT
BIOME_NORMAL,
BIOME_LIQUID,
BIOME_NETHER,
BIOME_AETHER,
BIOME_FLAT
};
class Biome : public ObjDef, public NodeResolver {
@ -68,7 +68,7 @@ public:
return "biome";
}
Biome *create(int btt)
static Biome *create(BiomeType type)
{
return new Biome;
}