API: Allow texture modifiers in node registration

If using texture modifiers, you must use the full texture name.
This commit is contained in:
octacian 2017-03-02 17:33:00 -08:00
parent 45f3ca4732
commit 53efb78c81

@ -118,6 +118,7 @@ function microexpansion.register_node(itemstring, def)
-- Update texture -- Update texture
if auto_complete ~= false then if auto_complete ~= false then
for _,i in ipairs(def.tiles) do for _,i in ipairs(def.tiles) do
if #def.tiles[_]:split("^") <= 1 then
local prefix = "" local prefix = ""
if def.type == "ore" then if def.type == "ore" then
prefix = "ore_" prefix = "ore_"
@ -126,6 +127,7 @@ function microexpansion.register_node(itemstring, def)
def.tiles[_] = BASENAME.."_"..prefix..i..".png" def.tiles[_] = BASENAME.."_"..prefix..i..".png"
end end
end end
end
-- Colour description -- Colour description
def.description = desc_colour(def.status, def.description) def.description = desc_colour(def.status, def.description)
-- Update connect_sides -- Update connect_sides