From a7484b13895f677c85c1869b90df8a326582bd87 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 1 May 2022 01:09:21 +0200 Subject: [PATCH] working coloring --- mods/ITEMS/mcl_armor/leather.lua | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/mods/ITEMS/mcl_armor/leather.lua b/mods/ITEMS/mcl_armor/leather.lua index c13e578ec..89a98f61c 100644 --- a/mods/ITEMS/mcl_armor/leather.lua +++ b/mods/ITEMS/mcl_armor/leather.lua @@ -1,11 +1,4 @@ local S = minetest.get_translator(minetest.get_current_modname()) -local colorize_value = 125 ---local modifier = "[colorize::"..colorize_value - -local str = string - -local longdesc = S("This is a piece of equippable armor which reduces the amount of damage you receive.") -local usage = S("To equip it, put it on the corresponding armor slot in your inventory menu.") local colors = { -- { ID, decription, wool, dye } @@ -38,16 +31,12 @@ local function calculate_color(first, last) end local function get_texture_function(texture) - local function get_texture(obj, itemstack) - minetest.chat_send_all("called") + local function get_texture(_, itemstack) local color = itemstack:get_meta():get_string("color") - minetest.chat_send_all("|"..color.."|") if color == "" or color == nil then - minetest.chat_send_all("No color: "..texture) return texture else - minetest.chat_send_all("Color: "..texture.."^[colorize:"..color..":"..colorize_value) - return texture.."^[colorize:"..color..":"..colorize_value + return texture.."^[multiply:"..color end end return get_texture