summaryrefslogtreecommitdiff
path: root/src/mapgen.h
Commit message (Collapse)AuthorAge
* Biome API: Revert biomes, decos, ores being relative to water levelparamat2017-09-17
| | | | | | | Feature is unnecessary and would greatly complicate future development, it would also make 'get biome at pos' extremely complex. Mgv7: Revert option to repeat surface biomes in floatlands, which depended on the above.
* Code modernization: src/m* (part 2)Loic Blot2017-08-19
| | | | | | | | | * empty function * default constructor/destructor * remove unused Map::emergeSector(a,b) * for range-based loops * migrate a dirs[7] table to direction tables * remove various old unused function
* Optimize headers (part 2) (#6272)Loïc Blot2017-08-18
| | | | | | | | | | | | | | * Optimize headers (part 2) * less debug.h in headers * less remoteplayer.h for everybody * Cleanup (part 2) * camera.h: mesh.h * mapgen.h: mapnode.h * serverenvironment.h: mapblock.h * nodedef.h: shader.h
* Modernize various files (src/m*) (#6267)Loïc Blot2017-08-18
| | | | | | | | | | | | * Modernize various files (src/m*) * range-based for loops * code style * C++ headers instead of C headers * Default operators * empty function Thanks to clang-tidy
* C++ modernize: Pragma once (#6264)Loïc Blot2017-08-17
| | | | * Migrate cpp headers to pragma once
* Dungeons: Use biome 'node_stone' if normal stone types not detectedparamat2017-07-30
| | | | | | | Construct dungeons from the node defined as biome 'node_stone' if 'mapgen_stone', 'mapgen_desert_stone' and 'mapgen_sandstone' are not detected. Feature long-intended by kwolekr/hmmmm and present in code as a TODO.
* Biomes/decorations/ores: Make relative to 'water_level' settingparamat2017-07-11
| | | | | | | | Add 'biome_zero_level' argument to 'generateBiomes()', 'deco_zero_level' argument to 'placeAllDecos()' and 'ore_zero_level' to 'placeAllOres()' to allow mapgens to vertically shift the registered biomes, decorations and ores per-mapchunk. Will also allow many realm possibilities in future mapgens.
* Mapgen: Add Carpathian mapgen (#6015)Vaughan Lapsley2017-07-06
|
* CavesRandomWalk: Make 'lava_depth' a mapgen parameterparamat2017-06-22
| | | | | | | As with 'large_cave_depth', lava depth was previously a fixed y value and therefore incompatible with the ability to shift terrain vertically. Add 'lava_depth' mapgen parameter to mgflat, mgfractal, mgv5, mgv7.
* Cpp11 initializers 2 (#5999)Loïc Blot2017-06-17
| | | | | | | | | | * C++11 patchset 10: continue cleanup on constructors * Drop obsolete bool MainMenuData::enable_public (setting is called with cURL in server loop) * More classes cleanup * More classes cleanup + change NULL tests to boolean tests
* (Re)spawn players within 'mapgen_limit'paramat2017-06-11
| | | | | | | | | | | | | Previously, findSpawnPos() did not take the 'mapgen_limit' setting into account, a small limit often resulted in a spawn out in the void. Use the recently added 'calcMapgenEdges()' to get max spawn range through a new mapgenParams function 'getSpawnRangeMax()'. Previously, when a player respawned into a world, 'objectpos_over_limit()' was used as a check, which was inaccurate. Use the recently added 'saoPosOverLimit()' to get exact mapgen edges. Also fix default value of 'm_sao_limit_min'.
* C++11 patchset 6: forbid object copy using assigment/copy function deleters ↵Loïc Blot2017-06-10
| | | | | | | (#5945) C++11 implement function deleting, it's generally used to prevent some object copy In script API use this function removal on ScriptApiBase instead of ScriptApiClient/Server/MainMenu, this affect all ScriptApis Move DISABLE_CLASS_COPY with constructor, the deleted function permit to replace function in its original place
* Properly remove SAO when worldedges are overtaken (#5889)Loïc Blot2017-06-03
| | | | | | | | | | | | * LuaEntitySAO: Remove beyond outermost mapchunk edges Based on a commit by, and with help from, nerzhul. Add 2 functions to class Mapgen: A function to calculate actual mapgen edges, called from the Mapgen constructor. A function called indirectly from content_sao.cpp per entity step to check SAO position is within mapgen edges. * Calculate borders from params not mapgen, which is not available everytime
* Mapgen files: Update and correct copyright creditsparamat2017-05-26
|
* MapgenBasic: Add lava source as commonly used content (#5512)Paramat2017-04-04
| | | | Future mapgens are likely to use this for magma and volcanos. Remove the getting of lava source content id in mgvalleys.
* Cavegen/Mgv5/Mgv7: Add optional giant cavernsparamat2017-04-03
| | | | | | | | | | | | | | Add to MapgenBasic for use by multiple mapgens. Add to mgv5 and mgv7, enabled by default. Similar to mgvalleys caverns but half the scale. Parameters for upper y limit, distance caverns taper to full size, and noise threshold (full cavern size). As with mgvalleys caverns are generated first and classic caves are disabled in any mapchunk containing a cavern, to avoid excessive spreading volumes of liquids. This also avoids floating blobs of liquid where a large classic cave has overgenerated out into a neighbouring previously-generated mapchunk.
* Map generation limit: Make per-worldparamat2017-03-27
| | | | | | | | | | | The setting limits map generation but affects nothing else. Add 'mapgen_limit' to global mapgen parameters. Move 'blockpos_over_mapgen_limit()' to the only place it is called from: map.cpp. Allow teleportation to any part of the world even if over the set mapgen limit. Simplify the reading of this limit in mgvalleys. Remove the 'map_generation_limit' setting.
* Dungeons: Use 'block' instead of 'brick' for nodebox stairsparamat2017-03-05
| | | | | Affects only sandstone dungeons. Nodebox stairs made from 'sandstone_block' look better because every step is undivided.
* Dungeons: Add nodebox stairs to desert and sandstone dungeonsparamat2017-01-26
| | | | | | | | | | Desert and sandstone dungeons have 2 node wide corridors. Previously, nodebox stairs were disabled because dungeon generation code did not support nodebox stairs wider than 1 node, now it does. Add 'stair desert stone' content id to MappgenBasic. Requires 'mapgen stair desert stone' to be added to Minetest Game.
* Mapgen: Make mgv7 the default mapgenparamat2016-12-12
|
* Mapgen: Remove unused 'flat' and 'trees' flags from mg_flagsparamat2016-08-04
| | | | | | | | | | | | | | | | 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.
* Add MapSettingsManager and new mapgen setting script API functionskwolekr2016-07-03
| | | | | | | | | | | | | | | 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.
* Mapgen: Refactor mapgen creation and managementkwolekr2016-07-03
| | | | | | - 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
* Mapgen: Performance improvement and fixes for updateLiquid (#4065)MillersMan2016-06-04
| | | | | | | | - Adds only ~100 nodes per chunk to trans_liquid with similar processing time - Adds liquid nodes themselves instead of potential solid nodes below them - CONTENT_IGNORE nodes are interpreted as if they continue their neighborhood - This allows liquid columns to span multiple chunks without being interrupted - NOTE: Expects an one-node border in generation chunk without liquid changes
* Biomes: Define and use biome_t for biome IDskwolekr2016-06-04
|
* Change internal type for seeds to s32kwolekr2016-06-04
| | | | | This fixes value truncation (and therefore incompatibility) on platforms with an LP32 data model, such as VAX or MS-DOS.
* Mapgen: Combine dungeon generation codekwolekr2016-05-27
|
* Mapgen: Deduplicate common constructor codekwolekr2016-05-27
|
* Cavegen: Move V5-style caves to CavesNoiseIntersectionkwolekr2016-05-27
|
* Fix MgStoneType and BiomeType enum nameskwolekr2016-05-27
|
* Mapgen: Combine generateBiomes, dustTopNodes, and generateCaveskwolekr2016-05-27
| | | | | This commit condenses the above methods into a single implementation used by V7, V5, Flat, Fractal, and Valleys mapgens and introduces MapgenBasic.
* Move biome calculation to BiomeGenkwolekr2016-05-27
| | | | | | | BiomeGen defines an interface that, given a set of BiomeParams, computes biomes for a given area using the algorithm implemented by that specific BiomeGen. This abstracts away the old system where each mapgen supplied the noises required for biome generation.
* FindSpawnPos: Let mapgens decide what spawn altitude is suitableparamat2016-02-09
| | | | | | | | | | | | 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
* Mapgen: Add propagate_shadow bool to calcLightingparamat2015-12-07
| | | | | | | | | | 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
* Mapgen: Add global 'decorations' flagparamat2015-11-21
| | | | | | | | | | Flag is set by default in MapgenParams The global 'trees' flag remains but is now undocumented and unset by default in MapgenParams Add mgv6_spflag 'trees' set by default in defaultsettings.cpp to affect new worlds only This is automatically backwards compatible for existing worlds
* Add DISABLE_CLASS_COPY macro (and use it)kwolekr2015-10-27
| | | | | | | | | Use this macro to disallow copying of an object using the assignment operator or copy constructor. This catches otherwise silent-but-deadly mistakes such as "ServerMap map = env->getMap();" at compile time. If so desired, it is still possible to copy a class, but it now requires an explicit call to memcpy or std::copy.
* Decoration API: Add flag for placement on liquid surfaceparamat2015-10-23
| | | | | Add findLiquidSurface() function to mapgen.cpp Update lua_api.txt
* Mgv5/mgv7 biomes: Reduce heat and humidity noise spreads to former value of 750paramat2015-09-07
|
* Remove unused functions.onkrot2015-08-16
|
* Biome API: Increase heat and humidity noise spreads to 1000paramat2015-06-30
|
* Mapgen objects: Enable heatmap and humidmap for all biome api mapgensparamat2015-06-20
|
* Biome API: Add noise defined biome blendparamat2015-06-18
|
* Biome API, mgv7: Increase heat/humidity spreads. Improve mgv7 noise parametersparamat2015-05-24
|
* Split ObjDef/ObjDefManager out to objdef.cppkwolekr2015-05-18
|
* Mapgen v5/v7: Detect sandstone, enable sandstone brick dungeonsparamat2015-05-17
|
* ObjDefManager: Set replacement object's handle info after calling set()kwolekr2015-05-03
| | | | | Make gamedef optional when constructing an ObjDefManager Add note about object ownership
* Biomes: Remove referenced biomes from Decorations on clearkwolekr2015-04-16
|
* ObjDefManager, Mapgen SAPI: Huge refactoringkwolekr2015-03-31
| | | | | | | - General code cleanup - Unified object creation and loading - Specifying objects in APIs is now orthogonal (i.e. anything can take an ID, name string, or the raw table definition (and automatically registers if present
* GenElementManager: Pass opaque handles to Lua and rename to ObjDefManagerkwolekr2015-03-31
| | | | Add core.clear_registered_schematics() and refactor schematics somewhat
* Add core.register_schematic() and cache schematics on usekwolekr2015-03-23
|