mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-19 03:05:29 +02:00
Add MapSettingsManager and new mapgen setting script API functions
This commit refactors the majority of the Mapgen settings system. - MapgenParams is now owned by MapSettingsManager, itself a part of ServerMap, instead of the EmergeManager. - New Script API functions added: core.get_mapgen_setting core.get_mapgen_setting_noiseparams, core.set_mapgen_setting, and core.set_mapgen_setting_noiseparams. - minetest.get/set_mapgen_params are deprecated by the above new functions. - It is now possible to view and modify any arbitrary mapgen setting from a mod, rather than the base MapgenParams structure. - MapgenSpecificParams has been removed.
This commit is contained in:
@@ -46,7 +46,7 @@ class BiomeGenOriginal;
|
||||
//extern Profiler *mapgen_profiler;
|
||||
|
||||
|
||||
struct MapgenValleysParams : public MapgenSpecificParams {
|
||||
struct MapgenValleysParams : public MapgenParams {
|
||||
u32 spflags;
|
||||
s16 large_cave_depth;
|
||||
s16 massive_cave_depth;
|
||||
@@ -88,7 +88,7 @@ struct TerrainNoise {
|
||||
class MapgenValleys : public MapgenBasic {
|
||||
public:
|
||||
|
||||
MapgenValleys(int mapgenid, MapgenParams *params, EmergeManager *emerge);
|
||||
MapgenValleys(int mapgenid, MapgenValleysParams *params, EmergeManager *emerge);
|
||||
~MapgenValleys();
|
||||
|
||||
virtual MapgenType getType() const { return MAPGEN_VALLEYS; }
|
||||
|
Reference in New Issue
Block a user