summaryrefslogtreecommitdiff
path: root/src/mg_decoration.cpp
Commit message (Collapse)AuthorAge
* Mapgen files: Update and correct copyright creditsparamat2017-05-26
|
* Clean up numeric.h and split FacePositionCache from itShadowNinja2017-05-06
| | | | | I also optiized FacePositionCache a bit: I removed a map lookup and vector copy from both branches of getFacePosition.
* Simple deco: Allow setting param2 value on placementAuke Kok2016-12-07
| | | | | | | | | | | | | 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.
* Decorations: Generalise 'spawn by' to be used by all decoration typesparamat2016-09-14
| | | | In lua_api.txt, make clear that 'place on' and 'spawn by' can be lists.
* Permit usage of std::unordered_map & std::unorderered_set on c++11 compilers ↵Ner'zhul2016-08-10
| | | | | | | | | (#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
* Decorations: Fix decoration height check errorsparamat2016-08-05
| | | | | | | | | | 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.
* Decoration API: Allow force_placement of simple decorationsparamat2016-03-04
|
* Decoration API: Fix missing low density decorationsparamat2015-11-14
| | | | For a decoration count between 0 and 1 calculate a chance for 1
* Convert usages of PseudoRandom to PcgRandom for ore and deco placementkwolekr2015-11-09
| | | | In addition to being a better random, this fixes #3228
* Schematics: Add core.place_schematic_on_vmanip APIkwolekr2015-11-05
| | | | | Fix memory leak in minetest.place_schematic Slightly refactor Schematic code
* Decoration API: Add flag for placement on liquid surfaceparamat2015-10-23
| | | | | Add findLiquidSurface() function to mapgen.cpp Update lua_api.txt
* Decorations: Remove error message 'chunksize not divisable by sidelen'paramat2015-09-26
| | | | | | | 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.
* Clean up threadingShadowNinja2015-08-23
| | | | | | | | | | | | | | | | | | | | * 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.
* Biome API decorations: 'spawnby' searches a 3D neighbourhoodparamat2015-07-08
| | | | | The neighbours checked are the 8 nodes horizontally surrounding the decoration base and the 8 nodes horizontally surrounding the ground node below the decoration
* Biome API: Enable biome generation to lower world limitparamat2015-06-15
| | | | Decorations: Remove lower limit of water level for placement
* NodeResolver: Remove NodeResolveMethodkwolekr2015-05-07
| | | | This simplifies NodeResolver logic and makes some interfaces cleaner.
* Fix MSVC compatibilitykwolekr2015-04-29
| | | | | | Make sure to include random unittests in android builds, too Use SWAP() macro Ensure that negative ranges are tested as well in random unittests
* DecoSchematic: Fix missing trees in rough terrainparamat2015-04-23
| | | | | | 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
* Schematics: Remove referenced schematics from Decorations on clearkwolekr2015-04-17
|
* Schematics: Refactor NodeResolver and add NodeResolveMethodkwolekr2015-04-16
| | | | | | | | | 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.
* GenElementManager: Pass opaque handles to Lua and rename to ObjDefManagerkwolekr2015-03-31
| | | | Add core.clear_registered_schematics() and refactor schematics somewhat
* mg_decoration: Raise highest allowed deco top to max edge of voxelmanipparamat2015-03-15
| | | | Remove max_y from functions, simplify code
* Biome API: Enable decorations placed on waterparamat2015-03-06
| | | | Add schematic decoration force placement flag
* Shorten ManualMapVoxelManipulator to MMVManipkwolekr2015-01-05
|
* Add minetest.generate_ores() and minetest.generate_decorations()kwolekr2015-01-04
|
* Replace instances of height_min/height_max with y_min/y_max to remove ambiguitykwolekr2014-12-30
|
* Decoration: Add height_min and height_max parameterskwolekr2014-12-28
| | | | | Also set default height_min/height_max to -31000 and 31000, respectively, for ore and biomes
* Redefine NodeResolver interface and replace with callback mechanismkwolekr2014-12-27
|
* Use std::string::empty() instead of size() where applicableAnton2014-12-12
|
* Add minetest.clear_registered_decorations() and clear_registered_ores()kwolekr2014-12-12
|
* Remove get_noiseparams function. read_noiseparams should be used from now onkwolekr2014-12-10
|
* Rewrite generate notification mechanismkwolekr2014-12-06
| | | | | | | Add support for notify-on-decoration Clean up mapgen constructors Clean up mapgen.cpp code style somewhat Remove trailing whitespace from some files
* Add Generator Element Management frameworkkwolekr2014-11-12
| | | | Add BiomeManager, OreManager, DecorationManager, and SchematicManager
* Split up mapgen.cppkwolekr2014-11-01