mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
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.
This commit is contained in:
@@ -501,7 +501,8 @@ void Camera::setDigging(s32 button)
|
||||
|
||||
void Camera::wield(const ItemStack &item)
|
||||
{
|
||||
if (item.name != m_wield_item_next.name) {
|
||||
if (item.name != m_wield_item_next.name ||
|
||||
item.metadata != m_wield_item_next.metadata) {
|
||||
m_wield_item_next = item;
|
||||
if (m_wield_change_timer > 0)
|
||||
m_wield_change_timer = -m_wield_change_timer;
|
||||
|
Reference in New Issue
Block a user