Hardware coloring for itemstacks
authorDániel Juhász <juhdanad@gmail.com>
Fri, 10 Mar 2017 17:25:58 +0000 (18:25 +0100)
committerAuke Kok <sofar@foo-projects.org>
Sun, 9 Apr 2017 01:39:15 +0000 (18:39 -0700)
commit58d83a7bb2f992194c3df304b1dcbb81f98f78c0
tree4beedb69ac8b9b74352ef52c3a1d27004e77bc1d
parentd4e9dd4643607192f5adebeecda86f25074f02cd
Hardware coloring for itemstacks

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.
23 files changed:
builtin/game/item_entity.lua
doc/lua_api.txt
src/camera.cpp
src/client/tile.cpp
src/client/tile.h
src/content_cao.cpp
src/hud.cpp
src/itemdef.cpp
src/itemdef.h
src/nodedef.cpp
src/object_properties.cpp
src/object_properties.h
src/script/common/c_content.cpp
src/script/common/c_content.h
src/script/cpp_api/s_entity.cpp
src/script/lua_api/l_itemstackmeta.cpp
src/script/lua_api/l_metadata.cpp
src/script/lua_api/l_metadata.h
src/script/lua_api/l_nodemeta.cpp
src/script/lua_api/l_object.cpp
src/script/lua_api/l_storage.cpp
src/wieldmesh.cpp
src/wieldmesh.h