Add MapSettingsManager and new mapgen setting script API functions
authorkwolekr <kwolekr@minetest.net>
Fri, 24 Jun 2016 22:15:56 +0000 (18:15 -0400)
committerkwolekr <kwolekr@minetest.net>
Sun, 3 Jul 2016 19:38:36 +0000 (15:38 -0400)
commit3c63c3044d5e4ca36c2649c530f31622581d90fd
treeb7924100f14f5626c11d534e2ad3602e269ac1df
parent92705306bfb4994107a43514f29997cea15d48dc
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.
31 files changed:
build/android/jni/Android.mk
doc/lua_api.txt
src/CMakeLists.txt
src/emerge.cpp
src/emerge.h
src/map.cpp
src/map.h
src/map_settings_manager.cpp [new file with mode: 0644]
src/map_settings_manager.h [new file with mode: 0644]
src/mapgen.cpp
src/mapgen.h
src/mapgen_flat.cpp
src/mapgen_flat.h
src/mapgen_fractal.cpp
src/mapgen_fractal.h
src/mapgen_singlenode.h
src/mapgen_v5.cpp
src/mapgen_v5.h
src/mapgen_v6.cpp
src/mapgen_v6.h
src/mapgen_v7.cpp
src/mapgen_v7.h
src/mapgen_valleys.cpp
src/mapgen_valleys.h
src/script/lua_api/l_mapgen.cpp
src/script/lua_api/l_mapgen.h
src/script/lua_api/l_vmanip.cpp
src/server.cpp
src/subgame.cpp
src/unittest/CMakeLists.txt
src/unittest/test_map_settings_manager.cpp [new file with mode: 0644]