尝试访问不存在的颜色时会直接抛出错误,不再等到绘制时
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user