aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_mapgen.cpp
AgeCommit message (Collapse)Author
2018-04-07Biome API / dungeons: Add biome-defined dungeon nodesParamat
Add new biome fields 'node_dungeon', 'node_dungeon_alt', 'node_dungeon_stair'. If 'node_dungeon' is not defined dungeons fall back to classic behaviour. Remove messy and imprecise dungeon material code from 'generateBiomes()'. Code deciding dungeon materials is now in 'generateDungeons()' and uses the biome at mapchunk centre for more precision. Remove hardcoded 'MG_STONE' types as long intended.
2018-04-05Biome API / cavegen: Add definable cave liquid for a biome (#7192)Paramat
Add 'node_cave_liquid' as a new field in biome registration. If field is absent cave liquids fall back to classic behaviour.
2018-03-26Mapgen: Remove unused mgv7 code and some unused biometypesParamat
2018-03-11Biome API: Add 'get_biome_name(biome_id)' APIparamat
Change name of default biome to a more suitable lowercase 'default'.
2018-03-10Spawn level: Add 'get_spawn_level(x, z)' APIparamat
Returns a suitable player spawn y co-ordinate for unmodified terrain.
2018-03-09Biomes: Add 'min_pos'/'max_pos' xyz biome limitsparamat
'y_min' and 'y_max' are still accepted for compatibility.
2018-03-03Gennotify: Add 'minetest.get_decoration_id' APIparamat
Returns the decoration ID for the provided decoration name string. For use with gennotify, to know the decoration IDs for use in 'minetest.set_gen_notify'.
2018-02-27Place schematic (on vmanip): Enable use of 'place center' flagsparamat
For 'place schematic' and 'place schematic on vmanip' APIs. Fix 'place center' code to properly centre schematics. Fix some comments.
2018-02-10Node definition manager refactor (#7016)Dániel Juhász
* Rename IWritableNodeDefManager to NodeDefManager * Make INodeDefManager functions const * Use "const *NodeDefManager" instead of "*INodeDefManager" * Remove unused INodeDefManager class * Merge NodeDefManager and CNodeDefManager * Document NodeDefManager
2018-01-16Biomes: Add 'get heat', 'get humidity', 'get biome data' APIsparamat
'get biome data' returns biome id, heat and humidity. Clean up nearby lines in lua_api.txt.
2018-01-05Biomes: Add vertical biome blend (#6853)Paramat
Add 'vertical blend' parameter to biome registration that defines how many nodes above the biome's 'y max' limit the blend will extend.
2017-11-19Stratum ore: Add option for a constant thickness stratumparamat
Add a 'stratum thickness' integer parameter, as an alternative to providing a 2nd noise parameter for thickness variation.
2017-11-08Move files to subdirectories (#6599)Vitaliy
* Move files around
2017-10-10Simple decorations: Make 'place_offset_y' usable with simple decorationsparamat
Necessary for placing the base cube of 'plantlike_rooted' drawtype in the seabed instead of on it. Useful for placing decorations sunk into, or buried in, the ground.
2017-10-09Simple decorations: Add 'param2_max' parameter for random param2paramat
If 'param2_max' is not used, parameter 'param2' works as before for compatibility. If 'param2_max' is used, 'param2' and 'param2_max' become the lower and upper bounds of a per-decoration random param2.
2017-10-01Stratum ore: Allow use with no noise for simple horizontal strataparamat
If either of the 2 noise parameters are omitted the ore will occur from y_min to y_max in a simple horizontal stratum. As this does not compute noise performance improves, and is ideal for placing many layers. Clean up some nearby ore documentation.
2017-09-10Schematic decorations: Add 'place_offset_y' placement parameterparamat
For precise control of schematic vertical position relative to the 'place_on' node. Avoids workarounds that add empty nodes to a schematic and therefore reduce performance. Also remove long-unused decoration cutoff code.
2017-09-03Ores: Add stratum ore (#6352)Paramat
Creates a single undulating ore stratum that is continuous across mapchunk borders and horizontally spans the world. Due to being continuous is ideal for creating bands of alternative stone type running through cliffs and mountains, or underground layers. Add missing documentation of 'ore_param2' parameter.
2017-08-20Modernize code: very last fixes (#6290)Loïc Blot
Last modernization fixes
2017-08-20Modernize source code: last part (#6285)Loïc Blot
* Modernize source code: last par * Use empty when needed * Use emplace_back instead of push_back when needed * For range-based loops * Initializers fixes * constructors, destructors default * c++ C stl includes
2017-06-04C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot
2017-05-08read_schematic_replacements: ensure fields are strings (#5726)Loïc Blot
* read_schematic_replacements: ensure fields are strings add a type check before reading strings on read_schematic_replacements deserializer * throw LuaError instead of asserting the whole client
2017-03-16Get biome list: Downgrade missing biome message to infostreamparamat
It is harmless for a biome listed in an ore or decoration registration to be missing. Now that we are registering certain biomes or not based on options (such as floatland biomes), the biome lists in ore and decoration registrations trigger these error messages, avoiding these error messages would need a large amount of duplication of ore and decoration registrations.
2017-03-11Light calculation: New bulk node lighting codeDániel Juhász
This commit introduces a new bulk node lighting algorithm to minimize lighting bugs during l-system tree generation, schematic placement and non-mapgen-object lua voxelmanip light calculation. If the block above the changed area is not loaded, it gets loaded to avoid lighting bugs. Light is updated as soon as write_to_map is called on a voxel manipulator, therefore update_map does nothing.
2016-12-20Mod security: Allow read-only access to all mod pathsShadowNinja
2016-12-08Simple decorations: Fix range check for deco->deco_param2Auke Kok
Allow any int value, and properly range check it before casting.
2016-12-07Simple deco: Allow setting param2 value on placementAuke Kok
Schematics can already be placed with a param2 value, but not simple 1-node plant decorations of the simple type. This adds a `param2` field to the simple deco type that is checked to be between 0 and 255, and put to the placed node at mapgen. This can be used to put a degrotate value in, or e.g. a fill value for leveltype nodes, or a place_param2 value at mapgen placement, or vary the shape of meshoptions plantlike drawtype.
2016-10-06Use more unordered_maps to improve performance in c++11 buildsLoic Blot
2016-09-14Decorations: Generalise 'spawn by' to be used by all decoration typesparamat
In lua_api.txt, make clear that 'place on' and 'spawn by' can be lists.
2016-08-10Permit usage of std::unordered_map & std::unorderered_set on c++11 compilers ↵Ner'zhul
(#4430) This fallback to std::map & std::set for older compilers Use UNORDERED_SET as an example in decoration and ore biome sets Use UNORDERED_MAP as an example in nameidmapping
2016-07-03Add MapSettingsManager and new mapgen setting script API functionskwolekr
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-06-05Biome API: Add per-biome riverbed material and depthparamat
Mgvalleys: Remove riverbed sand placement from base terrain generation Riverbed material placement moved to MapgenBasic::generateBiomes() Document fields and add note that the biome API is still unstable
2016-05-27Fix MgStoneType and BiomeType enum nameskwolekr
2016-05-27Move biome calculation to BiomeGenkwolekr
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.
2015-12-07Fix threshold typeest31
Fix the type of the threshold value for mapgen. The commit a78dd7f2b6b0e1fefdbaa1ae21b722dd4459e4f4 "Fix spelling of noise_threshold" has changed it to be read as int, but it can have non-integral values too. Thanks to @kwolekr for pointing this out.
2015-12-06Fix spelling of noise_thresholdJun Zhang
2015-11-05Schematics: Add core.place_schematic_on_vmanip APIkwolekr
Fix memory leak in minetest.place_schematic Slightly refactor Schematic code
2015-10-25SAPI: Throw runtime error instead of if l_get_mapgen_object called in ↵kwolekr
incorrect thread
2015-10-25SAPI: Mark all Lua API functions requiring envlockkwolekr
2015-10-04Allow setting chunksize in core.set_mapgen_paramskwolekr
2015-10-04Define and use limit constants for Irrlicht fixed-width typeskwolekr
2015-10-02Add get_biome_id(biome_name) callbackDuane Robertson
It returns the index used in mg->biomemap for a given biome name. The biomemap is useless without this unless you re-register all existing biomes, which could cause problems for anyone else trying to use biomemap. With this, you can quickly create a lookup table of ids and names.
2015-09-17Ore: Add puff ore typekwolekr
2015-09-13Ore: Add ore sheet column height range selectionkwolekr
Modders are now able to select the range of ore column height, and the midpoint at which they 'grow' starting from. This commit adds three new parameters for the 'sheet' ore type: column_height_min, column_height_max, and column_midpoint_factor. clust_size is now deprecated for this ore type.
2015-08-03Biome API: Make fallback biome stone and water, disable fillerparamat
2015-07-25Fix MSVC number conversion warningSmallJoker
2015-06-20Mapgen objects: Enable heatmap and humidmap for all biome api mapgensparamat
2015-05-28Make get_biome_list() error message more helpfulkwolekr
2015-05-28Add some missing getter functions to the lua APITeTpaAka
ObjectRef: get_properties get_armor_groups get_animation get_attach get_bone_position Players: get_physics_override hud_get_hotbar_itemcount hud_get_hotbar_image hud_get_hotbar_selected_image get_sky get_day_night_ratio get_local_animation get_eye_offset Global: minetest.get_gen_notify minetest.get_noiseparams
2015-05-17Fix null dereference when loading schematic from definition without a ↵kwolekr
NodeDefManager