aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_mapgen.cpp
AgeCommit message (Collapse)Author
2022-12-03Add `minetest.get_mapgen_edges` (#12999)Jude Melton-Houghton
2022-11-23Fix reading schematics after their resolution (#12985)Jude Melton-Houghton
2022-11-09Fix typos and en_US/en_GB inconsistency in various files (#12902)Abdou-31
2022-10-04Consolidate API object code (#12728)Jude Melton-Houghton
Co-authored-by: sfan5 <sfan5@live.de>
2021-09-11Make sure relevant std::stringstreams are set to binarysfan5
2021-03-23Fix broken `BiomeGen` abstraction (#11107)sfan5
2021-03-20Schematic: Properly deal with before/after node resolving and document (#11011)SmallJoker
This fixes an out-of-bounds index access when the node resolver was already applied to the schematic (i.e. biome decoration). Also improves the handling of the two cases: prior node resolving (m_nodenames), and after node resolving (manual lookup)
2021-02-06Reduce ore noise_parms error to deprecation warning (#10921)rubenwardy
Fixes #10914
2021-01-29Settings: Proper priority hierarchySmallJoker
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-21MgOre: Fix invalid field polymorphism (#10846)rubenwardy
2021-01-21Removed some obsolete code (#10562)Zughy
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2020-05-20Allow more than 255 biomes, document new maximum (#9855)Paramat
Change biomemap data type from u8 to u16. New technical (not practical) maximum is 65535 biomes.
2020-05-05Fix remaining issues with mapgen scriptapisfan5
2020-05-05Give the Mapgen on each EmergeThread its own Biome/Ore/Deco/SchemManager copysfan5
2020-04-14scriptapi: Some small optimizations to value pushing (#9669)sfan5
2019-10-29Change some usages of "deprecated" to "obsolete" (#9062)random-geek
"Deprecated" means that something is still in use, but is unsupported and needs to be removed. "Obsolete" means it is already out of use.
2019-08-14Add function `minetest.read_schematic`upsilon
2019-05-21l_mapgen.cpp: Fix LINT broken since b1b40feSmallJoker
2019-05-18Allow multiple cave liquids in a biome definition (#8481)Paramat
This allows games to specify biome cave liquids and avoid the old hardcoded behaviour, but preserves the ability to have multiple cave liquids in one biome, such as lava and water. When multiple cave liquids are defined by the biome definition, make each entire cave use a randomly chosen liquid, instead of every small cave segment using a randomly chosen liquid. Plus an optimisation: Don't place nodes if cave liquid is defined as 'air'
2019-01-06Fix various bugs (Anticheat, Lua helpers) (#8013)SmallJoker
* Fix various bugs (Anticheat, Lua helpers) Anticheat: Use camera position instead of player position for shoot line calculations Lua helpers: Increase 'i' to not overwrite earlier added table values * Remove lag compensation * * 1.5 for larger selection boxes
2018-06-30Modernize lua read (part 2 & 3): C++ templating assurance (#7410)Loïc Blot
* Modernize lua read (part 2 & 3): C++ templating assurance Implement the boolean reader Implement the string reader Also remove unused & unimplemented script_error_handler Add a reader with default value
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.