aboutsummaryrefslogtreecommitdiff
path: root/src/mg_decoration.cpp
AgeCommit message (Collapse)Author
2017-11-08Move files to subdirectories (#6599)Vitaliy
* Move files around
2017-10-29Biome API: Add decoration flags for underground decorationsparamat
Add "all_floors" and "all_ceilings" flags for simple and schematic decorations. Decorations are placed on all floor and/or ceiling surfaces. Decorations are placed before dungeon generation so placement in dungeons is not possible. Add 'getSurfaces()' function to mapgen.cpp that returns 2 arrays of y coordinates for all floor and ceiling surfaces in a specified node column. Move 'getHeight()' checks into DecoSimple and DecoSchematic. Delete 'getHeight()' functions.
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-09-17Biome API: Revert biomes, decos, ores being relative to water levelparamat
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.
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-08-20Modernize code: very last fixes (#6290)Loïc Blot
Last modernization fixes
2017-07-26VoxelManip cleanups (const ref, const move) + function removal (#6169)Loïc Blot
* VoxelManip cleanups (const ref, const move) permitting to improve a little bit performance * VoxelArea: precalculate extent (performance enhancement) This permits to reduce extend high cost to zero and drop many v3s16 object creation/removal to calculate extent It rebalance the client thread update to updateFastFaceRow instead of MapBlockMesh generation This will also benefits to mapgen
2017-07-11Biomes/decorations/ores: Make relative to 'water_level' settingparamat
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.
2017-06-18Cpp11 patchset 11: continue working on constructor style migration (#6004)Loïc Blot
2017-06-04C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot
2017-05-26Mapgen files: Update and correct copyright creditsparamat
2017-05-06Clean up numeric.h and split FacePositionCache from itShadowNinja
I also optiized FacePositionCache a bit: I removed a map lookup and vector copy from both branches of getFacePosition.
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-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-08-05Decorations: Fix decoration height check errorsparamat
Fix height check comparison from '>=' to '>'. Fix getHeight() for schematic decorations to account for 'deco place center y' flag and for how normal placement sinks schematic 1 node into the ground. Jungletrees were not being placed at y = 46, y = 47 despite having an acceptable 16 nodes of height above ground surface.
2016-03-04Decoration API: Allow force_placement of simple decorationsparamat
2015-11-14Decoration API: Fix missing low density decorationsparamat
For a decoration count between 0 and 1 calculate a chance for 1
2015-11-09Convert usages of PseudoRandom to PcgRandom for ore and deco placementkwolekr
In addition to being a better random, this fixes #3228
2015-11-05Schematics: Add core.place_schematic_on_vmanip APIkwolekr
Fix memory leak in minetest.place_schematic Slightly refactor Schematic code
2015-10-23Decoration API: Add flag for placement on liquid surfaceparamat
Add findLiquidSurface() function to mapgen.cpp Update lua_api.txt
2015-09-26Decorations: Remove error message 'chunksize not divisable by sidelen'paramat
Sidelen larger than 16 is essential for low density decorations With sidelen > 16 chunksize may not be divisable by sidelen if chunksize is changed, in this situation setting sidelen = chunksize is desirable and should not create error messages.
2015-08-23Clean up threadingShadowNinja
* Rename everything. * Strip J prefix. * Change UpperCamelCase functions to lowerCamelCase. * Remove global (!) semaphore count mutex on OSX. * Remove semaphore count getter (unused, unsafe, depended on internal API functions on Windows, and used a hack on OSX). * Add `Atomic<type>`. * Make `Thread` handle thread names. * Add support for C++11 multi-threading. * Combine pthread and win32 sources. * Remove `ThreadStarted` (unused, unneeded). * Move some includes from the headers to the sources. * Move all of `Event` into its header (allows inlining with no new includes). * Make `Event` use `Semaphore` (except on Windows). * Move some porting functions into `Thread`. * Integrate logging with `Thread`. * Add threading test.
2015-07-08Biome API decorations: 'spawnby' searches a 3D neighbourhoodparamat
The neighbours checked are the 8 nodes horizontally surrounding the decoration base and the 8 nodes horizontally surrounding the ground node below the decoration
2015-06-15Biome API: Enable biome generation to lower world limitparamat
Decorations: Remove lower limit of water level for placement
2015-05-07NodeResolver: Remove NodeResolveMethodkwolekr
This simplifies NodeResolver logic and makes some interfaces cleaner.
2015-04-29Fix MSVC compatibilitykwolekr
Make sure to include random unittests in android builds, too Use SWAP() macro Ensure that negative ranges are tested as well in random unittests
2015-04-23DecoSchematic: Fix missing trees in rough terrainparamat
Move place_on check to before place_center_x/y/z displacement of p Reduce displacement of p by place_center_x/y/z flags to correctly position schematics
2015-04-17Schematics: Remove referenced schematics from Decorations on clearkwolekr
2015-04-16Schematics: Refactor NodeResolver and add NodeResolveMethodkwolekr
NodeResolver name lists now belong to the NodeResolver object instead of the associated NodeDefManager. In addition to minimizing unnecessary abstraction and overhead, this move permits NodeResolvers to look up nodes that they had previously set pending for resolution. So far, this functionality has been used in the case of schematics for serialization/deserialization.
2015-03-31GenElementManager: Pass opaque handles to Lua and rename to ObjDefManagerkwolekr
Add core.clear_registered_schematics() and refactor schematics somewhat
2015-03-15mg_decoration: Raise highest allowed deco top to max edge of voxelmanipparamat
Remove max_y from functions, simplify code
2015-03-06Biome API: Enable decorations placed on waterparamat
Add schematic decoration force placement flag
2015-01-05Shorten ManualMapVoxelManipulator to MMVManipkwolekr
2015-01-04Add minetest.generate_ores() and minetest.generate_decorations()kwolekr
2014-12-30Replace instances of height_min/height_max with y_min/y_max to remove ambiguitykwolekr
2014-12-28Decoration: Add height_min and height_max parameterskwolekr
Also set default height_min/height_max to -31000 and 31000, respectively, for ore and biomes
2014-12-27Redefine NodeResolver interface and replace with callback mechanismkwolekr
2014-12-12Use std::string::empty() instead of size() where applicableAnton
2014-12-12Add minetest.clear_registered_decorations() and clear_registered_ores()kwolekr
2014-12-10Remove get_noiseparams function. read_noiseparams should be used from now onkwolekr
2014-12-06Rewrite generate notification mechanismkwolekr
Add support for notify-on-decoration Clean up mapgen constructors Clean up mapgen.cpp code style somewhat Remove trailing whitespace from some files
2014-11-12Add Generator Element Management frameworkkwolekr
Add BiomeManager, OreManager, DecorationManager, and SchematicManager
2014-11-01Split up mapgen.cppkwolekr