尝试访问不存在的颜色时会直接抛出错误,不再等到绘制时

This commit is contained in:
MrZ626
2021-04-22 00:02:57 +08:00
parent 0a2763e769
commit 1676f36b5b

View File

@@ -65,6 +65,9 @@ for k,v in next,{
}do
COLOR[k]=COLOR[v]
end
setmetatable(COLOR,{__index=function(_,k)
error("No color: "..tostring(k))
end})
do--Random generators