mirror of
https://github.com/luanti-org/luanti.git
synced 2025-12-20 05:45:20 +01: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:
@@ -53,7 +53,7 @@ enum BiomeV6Type
|
||||
};
|
||||
|
||||
|
||||
struct MapgenV6Params : public MapgenSpecificParams {
|
||||
struct MapgenV6Params : public MapgenParams {
|
||||
u32 spflags;
|
||||
float freq_desert;
|
||||
float freq_beach;
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
content_t c_mossycobble;
|
||||
content_t c_stair_cobble;
|
||||
|
||||
MapgenV6(int mapgenid, MapgenParams *params, EmergeManager *emerge);
|
||||
MapgenV6(int mapgenid, MapgenV6Params *params, EmergeManager *emerge);
|
||||
~MapgenV6();
|
||||
|
||||
virtual MapgenType getType() const { return MAPGEN_V6; }
|
||||
|
||||
Reference in New Issue
Block a user