From 53efb78c81ecded0a898eebe91fdaa6995d6ceff Mon Sep 17 00:00:00 2001 From: octacian Date: Thu, 2 Mar 2017 17:33:00 -0800 Subject: [PATCH] API: Allow texture modifiers in node registration If using texture modifiers, you must use the full texture name. --- api.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/api.lua b/api.lua index 6cc2385..5249ffd 100644 --- a/api.lua +++ b/api.lua @@ -118,12 +118,14 @@ function microexpansion.register_node(itemstring, def) -- Update texture if auto_complete ~= false then for _,i in ipairs(def.tiles) do - local prefix = "" - if def.type == "ore" then - prefix = "ore_" - end + if #def.tiles[_]:split("^") <= 1 then + local prefix = "" + if def.type == "ore" then + prefix = "ore_" + end - def.tiles[_] = BASENAME.."_"..prefix..i..".png" + def.tiles[_] = BASENAME.."_"..prefix..i..".png" + end end end -- Colour description