aboutsummaryrefslogtreecommitdiff
path: root/src/itemdef.cpp
AgeCommit message (Collapse)Author
2021-03-09Use place_param2 client-side for item appearance & prediction (#11024)sfan5
2020-10-09Add a short_description to be used by mods (#8980)DS
2020-10-01(se)SerializeString: Include max length in the nameSmallJoker
This commit clarifies the maximal length of the serialized strings. It will avoid accidental use of serializeString() when a larger string can be expected. Removes unused Wide String serialization functions
2020-04-19Fix alias handling of get_content_id (#9712)sfan5
fixes #9632
2020-04-14Refactor texture overrides and add new features (#9600)Hugues Ross
* Refactor texture overrides, and add new features: - Texture overrides can support multiple targets in one line - Texture override files can have comment lines - Item images/wield images can be overridden * Formatting changes * Address soime feedback - Pass vectors by const reference - Log syntax errors as warnings - Remove 'C' prefix from TextureOverrideSource * Simplify override target checks with an inline helper function * make linter happy * Apply feedback suggestions Co-Authored-By: rubenwardy <rw@rubenwardy.com> * Remove remaining != 0 checks * Update copyright notice Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: rubenwardy <rw@rubenwardy.com>
2020-04-08Overall improvements to log messages (#9598)sfan5
Hide some unnecessarily verbose ones behind --trace or disable them entirely. Remove duplicate ones. Improve their contents in some places.
2019-08-04Unify OpenGL ES supportsfan5
2019-01-03Proselytize the network. Use IEEE F32 (#8030)SmallJoker
* Proselytize the network. Use IEEE F32 * Remove unused V2F1000 functions
2018-11-28Move client-specific files to 'src/client' (#7902)Quentin Bazin
Update Android.mk Remove 'src/client' from include_directories
2017-08-29Bump minimal protocol version to 36 (#6319)SmallJoker
* Bump minimal protocol version to 36 Item/Node/TileDef, NodeBox, TileAnimation: Remove old compat code * Accept future serialisation versions
2017-08-25Overlays for wield and inventory images (#6107)Dániel Juhász
* Overlays for wield and inventory images
2017-08-20Modernize code: very last fixes (#6290)Loïc Blot
Last modernization fixes
2017-06-16Fix deserialization of ItemDefinition (#5995)Rui
2017-06-14Fix no sound bug (#5968)Rui
2017-06-11Sound: Add pitch option (#5960)Rui
* Sound: Add pitch option
2017-06-11Remove threads.h and replace its definitions with their C++11 equivalents ↵ShadowNinja
(#5957) This also changes threadProc's signature, since C++11 supports arbitrary thread function signatures.
2017-06-10Remove superfluous pointer null checksQrchackOfficial
2017-04-08Hardware coloring for itemstacksDániel Juhász
Adds the possibility to colorize item stacks based on their metadata. In the item/node definition you can specify palette (an image file) and color (fallback color if the item has no palette or metadata). Then you can add palette_index to the metadata. Dropped itemstacks with different colors do not merge.
2017-03-22Some performance optimizations (#5424)Loïc Blot
* Some performance optimizations This is globally removing some memory useless copy * use a const ref return on std::string Settings::get to prevent data copy on getters which doesn't need to copy it * pass some stack created strings to static const as they are not modified anywhere * Camera: return nametags per const ref instead of a list pointer, we only need to read it * INodeDefManager: getAll should be a result ref writer instead of a return copy * INodeDefManager: getAlias should return a const std::string ref * Minimap: unroll a Scolor creation in blitMinimapPixersToImageRadar to prvent many variable construct/destruct which are unneeded (we rewrite the content in the loop) * CNodeDefManager::updateAliases: prevent a idef getall copy * Profiler: constness * rollback_interface: create real_name later, and use const ref * MapBlockMesh updateFastFaceRow: unroll TileSpec next_tile, which has a cost of 1.8% CPU due to variable allocation/destruction, * MapBlockMesh updateFastFaceRow: copy next_tile to tile only if it's a different tilespec * MapBlockMesh updateFastFaceRow: use memcpy to copy next_lights to lights to do it in a single cpu operation
2017-03-19Update server min protocol version to v24 (#5411)Loïc Blot
* Update server min protocol version to v24 It's based on @sfan5 stats. See https://kitsunemimi.pw/tmp/serverlist_stats_2017-03-17.txt v24 was bumped 25/08/14 and 0.4.11 was released 25/12/14 * Drop protocol v23 and lesser code
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-09-08Add minetest.unregister_item and minetest.register_alias_forcepaly2
2016-02-07Use meshes to display inventory itemsRealBadAngel
2015-12-29Revert "Refactoring and code style fixes in preparation of adding mesh typed ↵Sapier
items" This reverts commit f14e7bac54af65e3d3d99f89f23f114b17058e49. Reverted due to missinterpretation of agreement, obvious dislike and me not interested in doing fights for feature I don't actually need
2015-12-29Revert "Add support for using arbitrary meshes as items"Sapier
This reverts commit 91bafceee6606fab79db1bde4cba01b84fed65c7. Reverted due to missinterpretation of agreement, obvious dislike and me not interested in doing fights for feature I don't actually need
2015-12-29Add support for using arbitrary meshes as itemsSapier
2015-12-29Refactoring and code style fixes in preparation of adding mesh typed itemsSapier
2015-11-07Add support for audio feedback if placing node failedBlockMen
2015-10-16Refactor thread utility interfacekwolekr
- Add "thr_" prefix to thread utility functions - Compare threadid_ts in a portable manner, where possible
2015-08-25Change i++ to ++iDavid Jones
2015-05-19Replace instances of std::map<std::string, std::string> with StringMapkwolekr
Also, clean up surrounding code style Replace by-value parameter passing with const refs when possible Fix post-increment of iterators
2015-04-01Move globals from main.cpp to more sane locationsCraig Robbins
Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
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-03-05Replace std::list to std::vector into tile.cpp (m_texture_trash) and move ↵Loic Blot
tile.hpp to src/client/
2015-03-04Use std::vector instead of std::list in StaticObjectList and ↵Loic Blot
MutexedMap::getValues()
2015-02-11Remove workaround in itemdef.cpp to enable/disable/enable "enable_shaders" ↵Craig Robbins
setting * Increase performance (client) * Avoid changing a global value to solve a local problem
2015-02-11Revert "Remove workaround in itemdef.cpp to enable/disable/enable ↵Craig Robbins
"enable_shaders" setting" This reverts commit d25ff8fd2592f457b91e8a61240694af3902d23f.
2015-02-11Remove workaround in itemdef.cpp to enable/disable/enable "enable_shaders" ↵Craig Robbins
setting * Increase performance (client) * Avoid changing a global value to solve a local problem
2014-11-08Implement WieldMeshSceneNode which improves wield mesh renderingKahrl
- Don't create and cache an extruded mesh for every (non-node) item. Instead use a single one per image resolution. - For cubic nodes reuse a single wield mesh too - Improve lighting of the wielded item - Increase far value of wield mesh scene camera, fixes #1770 - Also includes some minor refactorings of Camera and GenericCAO.
2014-10-29Add option to enable mesh caching, add wallmounted for meshes.RealBadAngel
2014-06-29Add support for Android 2.3+sapier
There have been plenty of ppl involved in creating this version. I don't wanna mention names as I'm sure I'd forget someone so I just tell where help has been done: - The partial android versions done by various ppl - Testing on different android devices - reviewing code (especially the in core changes) - testing controls - reviewing texts A big thank you to everyone helping this to be completed!
2014-03-04Fix rendering glitches when far from the center of the mapNovatux
2014-01-10Make MutexQueue use jsemaphore for signalingsapier
2013-12-03Shaders rework.RealBadAngel
2013-11-17Fix Result of processed Request was written to invalid (non existent) ↵sapier
ResultQueue if requesting thread timed out before
2013-11-17Fix multicaller support in RequestQueuesapier
2013-07-20Bump protocol versionPilzAdam
2013-07-20Make range of tools configureablePilzAdam
2013-07-14Change ContentFeatures array to a vectorKahrl