mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Huge overhaul of the entire MapgenParams system
MapgenParams is no longer a polymorphic class, eliminating the need for messy and bug-prone reallocations. Separation between the common and mapgen-specific parameters is now strongly defined. Mapgen parameters objects are now properly encapsulated within the proper subsystems.
This commit is contained in:
parent
a439343844
commit
5a34f40d80
24 changed files with 402 additions and 619 deletions
12
src/map.h
12
src/map.h
|
@ -493,21 +493,13 @@ public:
|
|||
|
||||
bool isSavingEnabled(){ return m_map_saving_enabled; }
|
||||
|
||||
u64 getSeed(){ return m_seed; }
|
||||
|
||||
MapgenParams *getMapgenParams(){ return m_mgparams; }
|
||||
void setMapgenParams(MapgenParams *mgparams){ m_mgparams = mgparams; }
|
||||
|
||||
// Parameters fed to the Mapgen
|
||||
MapgenParams *m_mgparams;
|
||||
u64 getSeed();
|
||||
s16 getWaterLevel();
|
||||
|
||||
virtual s16 updateBlockHeat(ServerEnvironment *env, v3s16 p, MapBlock *block = NULL);
|
||||
virtual s16 updateBlockHumidity(ServerEnvironment *env, v3s16 p, MapBlock *block = NULL);
|
||||
|
||||
private:
|
||||
// Seed used for all kinds of randomness in generation
|
||||
u64 m_seed;
|
||||
|
||||
// Emerge manager
|
||||
EmergeManager *m_emerge;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue