Move Color to Scripting.

This commit is contained in:
hispidence 2022-01-21 21:09:23 +00:00
parent 416be03d95
commit 7c484d2510
11 changed files with 16 additions and 20 deletions

View file

@ -0,0 +1,13 @@
#pragma once
#define index_error_maker(CPP_TYPE, LUA_CLASS_NAME) [](CPP_TYPE & item, sol::object key) \
{ \
std::string err = "Attempted to read non-existant var \"" + key.as<std::string>() + "\" from " + LUA_CLASS_NAME; \
ScriptAssert(false, err);\
}
#define newindex_error_maker(CPP_TYPE, LUA_CLASS_NAME) [](CPP_TYPE & item, sol::object key) \
{ \
std::string err = "Attempted to set non-existant var \"" + key.as<std::string>() + "\" of " + LUA_CLASS_NAME; \
ScriptAssert(false, err);\
}