Commit Graph

13 Commits

Author SHA1 Message Date
paramat 210a339dce Mapgen files: Update and correct copyright credits 2017-05-26 20:46:03 +01:00
Loïc Blot 91a9382c25 Pass clang-format on various cpp/header files (#5559) 2017-04-23 09:52:40 +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
kwolekr 92705306bf Mapgen: Refactor mapgen creation and management
- Move mapgen creation logic out of EmergeManager and into Mapgen
- Internally represent mapgen type as an enum value, instead of a string
- Remove the need for a MapgenFactory per mapgen
2016-07-03 14:04:11 -04:00
paramat 4adbd69a37 FindSpawnPos: Let mapgens decide what spawn altitude is suitable
To avoid spawn search failing in new specialised mapgens
Increase spawn search range to 4000 nodes
Add getSpawnLevelAtPoint() functions to EmergeManager, class Mapgen
and all mapgens
Remove getGroundLevelAtPoint() functions from all mapgens except mgv6
(possibly to be re-added later in the correct form to return actual
ground level)
Make mgvalleys flag names consistent with other mapgens
Remove now unused 'vertical spawn range' setting
2016-02-09 07:14:45 +00:00
paramat 49073ba2c3 Mapgen: Add propagate_shadow bool to calcLighting
To terminate unwanted shadows from floatlands or realms above
Also add to LuaVoxelManip calc_lighting for use in mapgen mods
Remove the 2 argument calcLighting, mapgens now use the 5
argument form to specify the volumes for propagateSunlight and
spreadLight
In mgsinglenode replace calcLighting with setLighting and
clean-up use of tabs and spaces
2015-12-07 03:18:24 +00:00
paramat 7504cdcfbf Mapgen: Use mapgen-specific names for constants in headers
Update copyright years in all mapgens
Add myself to copyright notices in mgv5 and mgv7
2015-10-09 05:51:47 +01:00
ngosang f6e4c5d9cf Respect game mapgen flags and save world noise params 2015-03-07 15:53:39 -05:00
kwolekr 6b4307791a mapgen: Resolve nodes in ctor rather than makeChunk 2014-10-30 02:29:37 -04:00
kwolekr 5a34f40d80 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.
2014-02-03 22:50:14 -05:00
kwolekr 2e292b67a0 Add Lua on_mapgen_init callback, and minetest.set_mapgen_params API 2013-06-27 22:35:35 -04:00
kwolekr 93474c4218 Remove no virtual dtor warnings, make MapgenParams contain actual NoiseParams 2013-05-19 12:22:20 -04:00
Perttu Ahola 34b185e955 Add singlenode mapgen; generates solely the node 'mapgen_singlenode', defaults to air 2013-03-22 19:16:51 +02:00