Commit Graph

8 Commits

Author SHA1 Message Date
sfan5 c60a146e22
Rework Settings to support arbitrary hierarchies (#11352) 2021-06-23 15:22:31 +02:00
SmallJoker 37a05ec8d6 Settings: Proper priority hierarchy
Remove old defaults system
Introduce priority-based fallback list
Use new functions for map_meta special functions
Change groups to use end tags

Unittest changes:
 * Adapt unittest to the new code
 * Compare Settings objects
2021-01-29 17:32:35 +01:00
SmallJoker f46509d5e2
Remove unused functions reported by cppcheck (#10463)
Run unused functions reported by cppcheck

This change removes a few (but not all) unused functions.
Some unused helper functions were not removed due to their complexity and potential of future use.
2020-10-05 09:07:33 +02:00
Vitaliy 20a85d76d9 Move files to subdirectories (#6599)
* Move files around
2017-11-08 23:56:20 +01:00
David Carlier 48b3bb980d couple of memory leaks fixes. 2016-08-10 16:59:32 +02:00
paramat ea12da939f Mapgen: Remove unused 'flat' and 'trees' flags from mg_flags
When the 'flat' and 'trees' flags were moved into mgv6_spflags they
were left in mg_flags in an attempt to support old mgv6 worlds. However
their appearence in mg_flags causes confusion, also, later, old-world
support was found to be broken for mgv6 worlds with 'notrees'.

This commit cleans up the mess and comes a month after a thread warning
of the change, and explaining the required action, was posted in the
news subforum. Only old mgv6 worlds with 'flat' or 'notrees' are
affected, a small minority of worlds, the required action being
correctly setting these flags in mgv6_spflags.

Disable a section of the 'map settings manager' unit test which is to
be changed as it is causing problems for pull requests.
2016-08-04 06:58:42 +01:00
est31 4ec6671909 test_map_settings_manager: Fix Wunused-result warning 2016-08-04 00:29:06 +02:00
kwolekr 3c63c3044d 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.
2016-07-03 15:38:36 -04:00