diff --git a/components/lua/utilpackage.cpp b/components/lua/utilpackage.cpp index c135b66092..85492ccf06 100644 --- a/components/lua/utilpackage.cpp +++ b/components/lua/utilpackage.cpp @@ -237,6 +237,7 @@ namespace LuaUtil colorType["asRgba"] = [](const Misc::Color& c) { return Vec4(c.r(), c.g(), c.b(), c.a()); }; colorType["asRgb"] = [](const Misc::Color& c) { return Vec3(c.r(), c.g(), c.b()); }; colorType["asHex"] = [](const Misc::Color& c) { return c.toHex(); }; + colorType[sol::meta_function::equal_to] = [](const Misc::Color& a, const Misc::Color& b) { return a == b; }; sol::table color(lua, sol::create); color["rgba"] = [](float r, float g, float b, float a) { return Misc::Color(r, g, b, a); }; diff --git a/scripts/data/integration_tests/test_lua_api/global.lua b/scripts/data/integration_tests/test_lua_api/global.lua index 31d1b040db..f38c13fa58 100644 --- a/scripts/data/integration_tests/test_lua_api/global.lua +++ b/scripts/data/integration_tests/test_lua_api/global.lua @@ -157,7 +157,7 @@ testing.registerGlobalTest('record creation', function() value = 10, duration = 12, radius = 30, - color = 5, + color = util.color.hex('123456'), name = "TestLight", model = "meshes/marker_door.dae" }