summaryrefslogtreecommitdiff
path: root/src/mg_schematic.cpp
AgeCommit message (Collapse)Author
2017-11-08Move files to subdirectories (#6599)Vitaliy
* Move files around
2017-08-19Code modernization: src/m* (part 3)Loic Blot
* empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * remove some unused headers in some cpp variable
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-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.
2017-01-09Environment & IGameDef code refactoring (#4985)Ner'zhul
* Environment code refactoring * Cleanup includes & class declarations in client & server environment to improve build speed * ServerEnvironment::m_gamedef is now a pointer to Server instead of IGameDef, permitting to cleanup many casts. * Cleanup IGameDef * Move ITextureSource* IGameDef::getTextureSource() to Client only. * Also move ITextureSource *IGameDef::tsrc() helper * drop getShaderSource, getSceneManager, getSoundManager & getCamera abstract call * drop unused emerge() call * cleanup server unused functions (mentionned before) * Drop one unused parameter from ContentFeatures::updateTextures * move checkLocalPrivilege to Client * Remove some unnecessary casts * create_formspec_menu: remove IWritableTextureSource pointer, as client already knows it * Fix some comments * Change required IGameDef to Server/Client pointers * Previous change that game.cpp sometimes calls functions with Client + InventoryManager + IGameDef in same functions but it's the same objects * Remove duplicate Client pointer in GUIFormSpecMenu::GUIFormSpecMenu * drop ClientMap::sectorWasDrawn which is unused
2016-10-05Replace various std::map with UNORDERED_MAP + various cleanupsLoic Blot
This is part 2 for 5f084cd98d7b3326b51320455364337539710efd Other improvements: * Use the defined ItemGroupList when used * make Client::checkPrivilege const * inline some trivial functions * Add ActiveObjectMap typedef * Add SettingsEntries typedef
2016-03-30mg_schematic: fix leak in lua API, and small cleanupest31
* Fix leak like behaviour if you load multiple schematics in a loop. * Cleanup check in for, fixing theoretical out of bounds read if Schematic::deserializeFromMts reduced the number of elements in m_nodenames. A != check may need an overflow of the counter before it hits, if origsize is larger than m_nodenames.size(). * Fix function name passed to errorstream: it was wrong. Also use __FUNCTION__ instead of manually using the method name at other places in the function. * Don't shadow the name member in the loop.
2015-11-05Schematics: Add core.place_schematic_on_vmanip APIkwolekr
Fix memory leak in minetest.place_schematic Slightly refactor Schematic code
2015-10-02Mapnode: Replace rotateAlongYAxis with improved versionparamat
Get facedir by using lowest 5 bits of param2 and limiting to 23 More robust, frees up higher param2 bits for other uses Change lookup table and table index to u8
2015-09-22Mapnode: Add rotateAlongYAxisFull supporting 24 facedirsparamat
2015-05-15Schematics: Fix probability values for .mts version 1kwolekr
2015-05-09Schematics: Add per-node force placement optionkwolekr
2015-05-08Tests: Add schematic unittestskwolekr
Improve schematic file-saving interface Add ability to create temporary test files
2015-05-07Schematics: Add indent-with-space option for schematic Lua table serializationkwolekr
2015-05-07NodeResolver: Remove NodeResolveMethodkwolekr
This simplifies NodeResolver logic and makes some interfaces cleaner.
2015-04-17Fix build since: "Remove referenced schematics from Decorations on clear"est31
Fixes build, which has been broken for all platforms (except BSD?) since grandparent 406d9ba87b9f6e57b86c6282bf157e3341aa195c. Thanks to @SmallJoker for pointing out a solution.
2015-04-17Schematics: Remove referenced schematics from Decorations on clearkwolekr
2015-04-17Fix build for < C++11 since last commitest31
Build broke since last commit 479f38973e13680d6a39d9c2a7f29fd330b67d41 for compilers not supporting C++11. Pre C++11, the constructor of std::ifstream only allows C like strings.
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-04-13Schematics: Reorganize (de)serialization and add Lua serialization APIkwolekr
2015-03-31GenElementManager: Pass opaque handles to Lua and rename to ObjDefManagerkwolekr
Add core.clear_registered_schematics() and refactor schematics somewhat
2015-03-23Schematics: Error if unable to open filekwolekr
2015-03-07For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins
NDEBUG is defined), replace those usages with persistent alternatives
2015-01-05Shorten ManualMapVoxelManipulator to MMVManipkwolekr
2014-12-27Set fallback content if resolving content vector requires everythingkwolekr
2014-12-27Redefine NodeResolver interface and replace with callback mechanismkwolekr
2014-12-12Add minetest.clear_registered_decorations() and clear_registered_ores()kwolekr
2014-12-08Fix compiler warning (signed vs. unsigned)Craig Robbins
2014-12-06Schematics: Fix minetest.place_schematic() when defined by a Lua tablekwolekr
2014-11-12Add Generator Element Management frameworkkwolekr
Add BiomeManager, OreManager, DecorationManager, and SchematicManager
2014-11-01Split up mapgen.cppkwolekr