summaryrefslogtreecommitdiff
path: root/src/craftdef.cpp
Commit message (Collapse)AuthorAge
* Overall improvements to log messages (#9598)sfan52020-04-08
| | | | Hide some unnecessarily verbose ones behind --trace or disable them entirely. Remove duplicate ones. Improve their contents in some places.
* Fix some issues with minetest.clear_craft (#8712)Paul Ouellette2019-08-10
| | | | | | | | | | | * Fix some issues with minetest.clear_craft - Fix memory leak - Fix crafts with an output count not being cleared when clearing by input. - Fix recipe list being reversed when clearing by input. * Add CraftInput::empty()
* Prefix RecipePriority elements with PRIORITY_Paul Ouellette2019-07-27
|
* Initialize priority in CraftDefinition constructorsPaul Ouellette2019-07-27
| | | | | The priority is used by getCraftResult, which may be used before initHash is called.
* Prioritise craft recipesHybridDog2019-05-20
| | | | | | When multiple recipes are applicable, the recipes are prioritised in this order: toolrepair < shapeless with groups < shapeless < shaped with groups < shaped For cooking and fuel, items are prioritised over item groups
* Test crafting hash type only once for a recipeHybridDog2019-05-20
|
* Use unordered_map instead of map for craft definitions (#8432)HybridDog2019-03-31
|
* Speed up the craft definition handling (#8097)Jozef Behran2019-01-13
| | | | | | | | | | | The craft definition handling code that collects the names of the craftable nodes suffers from vector reallocation performance hits, slowing down instances with lots of crafting recipes (VanessaE's DreamBuilder and most public server some to my mind when thinking about this). As in each instance the size of the resulting vector is already known, add a reserve() call before the offending loops to allocate the needed chunk of memory within the result vector in one go, getting rid of the overhead.
* Add disable_repair group to prevent tool repair (#7381)Wuzzy2018-10-16
|
* Don't try to craft a non-existent itemEsteban I. RM2017-10-16
|
* Modernize code: very last fixes (#6290)Loïc Blot2017-08-20
| | | Last modernization fixes
* Modernize src/c* src/d* and src/e* files (#6263)Loïc Blot2017-08-17
| | | | | | | | | | | | | | | | | * Modernize src/c* src/d* and src/e* files * default operator * redundant init * delete default constructors on CraftDefinition childs (never used) * fix some missing init values * const ref fix reported by clang-tidy * ranged-based for loops * simple conditions & returns * empty stl function instead of size * emplace_back stl function instead of push_back + construct temp obj * auto for some iterators * code style fixes * c++ stl headers instead of C stl headers (stdio.h -> cstdio)
* Add ItemStack key-value meta storagerubenwardy2017-02-04
|
* Adding minetest.clear_craftFoghrye42016-07-05
| | | | | Modifications by est31: grammar fixes in doc + error messages and a little style fix, no functional change.
* Clean up StrfndShadowNinja2016-03-19
| | | | | | | | | | | Changes: * Fix indentation. * Pass strings by const reference. * Merge Strfnd and WStrfnd into one class instead of copying them. * Remove trailing spaces. * Fix variable names. * Move to util. * Other miscellaneous style fixes.
* Allow craft replacements to use groupsTeTpaAka2015-11-15
|
* Change i++ to ++iDavid Jones2015-08-25
|
* Fix endless loop since grandparent commitest312015-07-04
|
* Craftdef: Use numbers instead of iteratorsest312015-07-04
| | | | Use numbers instead of iterators to traverse various vectors.
* Fix missing check for 0 in craft replacementsTeTpaAka2015-07-04
|
* Fix bug when craft input isn't replacedTeTpaAka2015-06-22
|
* Fix release build warningest312015-05-08
|
* Remove craftdef serialisationest312015-04-26
| | | | | It isn't needed anymore, sending ICraftDefManager over the network has been obsoleted by protocol version 7.
* Craftdef refactorest312015-04-26
| | | | | Fix style, refactor assert, use '"' instead of "\"", replace code duplicating craftGetItemName, rename iterators.
* craftdef.cpp: Return 0 after assert to make Clang happyLoic Blot2015-04-05
|
* Crafting speedupest312015-04-05
| | | | | | | | | | | | | | | This greatly increases crafting performance, especially in worlds with many mods. Approved by @kwolekr. Introduces a hash-type-layered fall-through mechanism, where every layer specifies one hash algorithm, and the "deeper the fall", the more collisions to expect for the algorithm. One Craft definition only resides at one layer, which improves speed for lower layers (and a complete fail), due to most craft definitions residing at high layers. Due to the fall-through design, the undocumented behaviour that later craft recipes override older ones had to be weaked up a bit, but craft recipes with the same hash and layer will still override.
* Optimize minetest.get_(all)_craft_recipe(s)gregorycu2015-03-20
| | | | Signed off by: ShadowNinja, kwolekr
* Craftdef.cpp: Improve loop and mathematics for CraftDefinitionShaped::checkLoic Blot2015-02-10
|
* Fix getCraftRecipe returing wrong reciep due to way to unspecific output ↵sapier2015-02-02
| | | | matching
* Fix aliases not working in shapeless crafting recipesKahrl2013-08-25
|
* Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl2013-08-14
|
* Added method to get all registered recipes for item(node)RealBadAngel2013-03-05
|
* Update Copyright YearsSfan52013-02-24
|
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
|
* Working group-shapeless and multigroup recipesPerttu Ahola2012-07-26
|
* Add minetest.get_craft_recipe()darkrose2012-07-21
|
* Properly and efficiently use split utility headersPerttu Ahola2012-06-17
|
* Allow groups in crafting recipesPerttu Ahola2012-06-06
|
* Allow replacements in cooking and fuel recipesKahrl2012-06-06
|
* Switch the license to be LGPLv2/later, with small parts still remaining as ↵Perttu Ahola2012-06-05
| | | | GPLv2/later, by agreement of major contributors
* Clean up log messages everywherePerttu Ahola2012-03-11
|
* The huge item definition and item namespace unification patch (itemdef), see ↵Kahrl2012-01-12
| | | | http://c55.me/minetest/wiki/doku.php?id=changes:itemdef
* Add InvRef and InvStack (currently untested and unusable)Perttu Ahola2012-01-02
|
* Catch SerializationError in CCraftDefManager::getCraftResult()Perttu Ahola2011-11-29
|
* Crafting definition in scriptsPerttu Ahola2011-11-29