From 2d47f5fd9f7616511ec9a1971a9e69372ec03c2f Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Sat, 13 Nov 2021 23:35:02 +0100 Subject: [PATCH] colorspec: expose metatable --- minetest/colorspec.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/minetest/colorspec.lua b/minetest/colorspec.lua index 0bb18eb..ba246d9 100644 --- a/minetest/colorspec.lua +++ b/minetest/colorspec.lua @@ -159,7 +159,8 @@ named_colors = { colorspec = {} -local colorspec_metatable = {__index = colorspec} +local metatable = {__index = colorspec} +colorspec.metatable = metatable function colorspec.new(table) return setmetatable({ @@ -167,7 +168,7 @@ function colorspec.new(table) g = assert(table.g), b = assert(table.b), a = table.a or 255 - }, colorspec_metatable) + }, metatable) end colorspec.from_table = colorspec.new