1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Fix broken BiomeGen abstraction (#11107)

This commit is contained in:
sfan5 2021-03-23 15:43:26 +01:00 committed by GitHub
parent c9eba8440d
commit 2da1eee394
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 92 additions and 187 deletions

View file

@ -99,13 +99,15 @@ public:
u32 gen_notify_on;
const std::set<u32> *gen_notify_on_deco_ids; // shared
BiomeGen *biomegen;
BiomeManager *biomemgr;
OreManager *oremgr;
DecorationManager *decomgr;
SchematicManager *schemmgr;
private:
EmergeParams(EmergeManager *parent, const BiomeManager *biomemgr,
EmergeParams(EmergeManager *parent, const BiomeGen *biomegen,
const BiomeManager *biomemgr,
const OreManager *oremgr, const DecorationManager *decomgr,
const SchematicManager *schemmgr);
};
@ -140,6 +142,8 @@ public:
~EmergeManager();
DISABLE_CLASS_COPY(EmergeManager);
const BiomeGen *getBiomeGen() const { return biomegen; }
// no usage restrictions
const BiomeManager *getBiomeManager() const { return biomemgr; }
const OreManager *getOreManager() const { return oremgr; }
@ -196,6 +200,7 @@ private:
// Managers of various map generation-related components
// Note that each Mapgen gets a copy(!) of these to work with
BiomeGen *biomegen;
BiomeManager *biomemgr;
OreManager *oremgr;
DecorationManager *decomgr;