Make use of new verifiers (Color and File) (#1510)

* Use codegen for renderable discs

* Utilize color and file verifier

* Add missing property assignment in exoplanets module
This commit is contained in:
Emma Broman
2021-03-02 08:11:49 +01:00
committed by GitHub
parent eec6b15781
commit 29e77534c7
27 changed files with 141 additions and 209 deletions

View File

@@ -310,10 +310,7 @@ int createSingeColorImage(lua_State* L) {
const std::string& key = "color";
ghoul::Dictionary colorDict;
colorDict.setValue(key, d);
TestResult res = DoubleVector3Verifier()(colorDict, key);
// @TODO (emmbr 2020-02-04) A 'ColorVerifier' would be really useful here, to easily
// check that we have a vector with values in [0, 1]
TestResult res = Color3Verifier()(colorDict, key);
if (!res.success) {
return ghoul::lua::luaError(