From 64ec3dcf93940fcd887a2fbe9ce533eb4f2cfa40 Mon Sep 17 00:00:00 2001 From: stujones11 Date: Fri, 4 Dec 2015 18:42:42 +0000 Subject: [PATCH] Allow armor textures to be specified by the tool definition --- 3d_armor/armor.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3d_armor/armor.lua b/3d_armor/armor.lua index 6446da8..cb6be17 100644 --- a/3d_armor/armor.lua +++ b/3d_armor/armor.lua @@ -171,7 +171,10 @@ armor.set_player_armor = function(self, player) if v == false then local level = def.groups["armor_"..k] if level then - local texture = item:gsub("%:", "_") + local texture = def.texture + if not texture then + texture = item:gsub("%:", "_") + end table.insert(textures, texture..".png") preview = preview.."^"..texture.."_preview.png" armor_level = armor_level + level